Ask a Question related to Coldfusion Database Access, Design and Development.
-
michaelmuller #1
Creating a database
I have the following script that creates a MS SQL database programmatically,
written primarily by an associate of mine, that works. Now I need to populate
the database with the default content.
What would be the best way of creating the DB:
1. Use "restore" of a backup file from a Db that I would like to replicate
(and how would I accomplish this?)
2. Is there a DB copy command in SQL that works like CREATE DATABASE?
Here's the create database scripts:
<cfquery name="qc" datasource="#request.ds#">
create database {db_name}
</cfquery>
<cfquery name="qc" datasource="#request.ds#">
sp_addlogin @loginame='{username}, @passwd='{password}', @defdb='{db_name}'
</cfquery>
<cfquery name="qc" datasource="#request.ds#">
use {db_name}
</cfquery>
<cfquery name="qc" datasource="#request.ds#">
sp_adduser @loginame='{username}'
</cfquery>
<cfquery name="qc" datasource="#request.ds#">
sp_addrolemember @rolename='db_datareader', @membername='{username}'
</cfquery>
<cfquery name="qc" datasource="#request.ds#">
sp_addrolemember @rolename='db_datawriter', @membername='{username}'
</cfquery>
At this point can I just pump in the BACKUP file from a DB I'd like to copy
into this new database?
Any advice would be great.
michaelmuller Guest
-
Creating Database
Hello, I'm brand new to ColdFusion, and I'm trying to go through the tutorials to learn more about it. I've installed it just fine to my Mac, OX... -
Creating a Database Dynamically
Is there a way to create an access database or table dynamically? -
creating a database?
I am also new to coldfusion and have a similar question to this one. If I "CREATE" a new System DSN in ODBC (which of course will be empty;no... -
Question about creating a database
I need to make a database of employees and their contact info. I've been playing around with different methods and xtras like V12 xtra and myExel... -
Creating a picture database
Hello everyone, I am new to Filemaker, and I was wondering if anyone could help me with a problem. I am trying to make a database of several...



Reply With Quote

