I am not sure if this helps you but this is what I did in
CFMX7.
1. Create a database in MS SQL Server call it DB_MASTER (it
will server as a template.)
2) Run the command to create your new database from the
template DB_MASTER
<cfquery name="createDB" datasource="#datasource#">
RESTORE DATABASE #trim(DBName)#
FROM DB_MASTER
WITH RECOVERY,
MOVE 'DB_MASTER_data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL$#trim(MSSQLserverName)#\Data\#trim(DBName)#_data.mdf',
MOVE 'DB_MASTER_log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL$#trim(MSSQLserverName)#\Data\#trim(DBName)#_log.ldf'
</cfquery>
3. Now run the script that will create a datasource to the
new database you just created in step two. After running the script
below you can alter the new database as you wish GET, DELETE,
UPDATE, CREATE TABLE .......
<cfscript>
adminObj =
createObject("component","cfide.adminapi.administrator");
adminObj.login("[YOUR_CF_ADMIN_LOGIN]");
myObj =
createObject("component","cfide.adminapi.datasource");
myObj.setMSSQL(driver="MSSQLServer",
name="[YOUR_DATASOURCE_NAME]", host = "127.0.0.1", port =
"1433",
database = "[YOUR_NEW_DATABASE_NAME]", username =
"[USER_NAME]", password="[PASSWORD]", login_timeout = "30",
timeout = "20", interval = 7, buffer = "64000", blob_buffer
= "64000", setStringParameterAsUnicode = "false",
description = "", pooling = true, maxpooledstatements =
1000, enableMaxConnections = "true",
maxConnections = "300", enable_clob = true, enable_blob =
true, disable = false, storedProc = true,
alter = false, grant = true, select = true, update = true,
create = true, delete = true, drop = false,
revoke = false );
</cfscript>
I hope the code gets there in this message if not just email
me at
gmcruz at email dot com