Sample code I'm using:

<cfquery name="qr" datasource="#request.ds#">
        RESTORE DATABASE [#theDBName#]
        FROM DISK='#request.BackupDBFolder#\#theBaseDB#.bak'
        WITH 
                MOVE 'master_default_dat' TO 
'#request.SitesDBFolder#\#theDBName#.mdf', 
                MOVE 'master_default_log' TO 
'#request.SitesDBFolder#\#theDBName#.ldf'
</cfquery>



At 02:21 PM 11/10/2006, Mik Muller wrote:
>To: [email protected]
>From: Mik Muller <[EMAIL PROTECTED]>
>Subject: restoring a db without an existing odbc connection
>In-Reply-To: <[EMAIL PROTECTED]>
>References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
>
>
>Hey all,
>
>I'm looking for a way to restore a db as the first db in an application I have 
>written. The app normally restores DBs as a way of automatically creating new 
>sites, but if this is a new box and code determines the main manager DB 
>doesn't exist, how does one restore a DB... without an existing ODBC to 
>connect to the DB server through? I'm talking specifically about SQL Server on 
>Win2003.
>
>Any advice?
>
>Thanks,
>
>Michael

--------
Michael Muller
Admin, MontagueMA.net Website
work (413) 863-0030
cell (413) 320-5336
fax (518) 713-1569
skype: michaelBmuller
email [EMAIL PROTECTED]
http://www.MontagueMA.net

Eschew Obfuscation



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to