Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 How to deploy an empty database?

Author  Topic 

Cameron_c
Starting Member

2 Posts

Posted - 2008-09-27 : 19:56:09
Hello everyone,
I am trying to work out how to deploy my database with my application.
I can write a little BAT file to run a little sql script to restore a backup, but I need to know where the backup has been placed.

I know where it is in the BAT file (relative to the %ProgramFiles%), but how do I communicate the environment variable value into the sql?

One choice is to copy from the application folder into a known folder (say C:\), do the restore, and then delete the copy.
It just seems a bit cumbersome.

I am really fishing for ideas here.
Any thoughts would be appreciated.

Thanks,
   

- Advertisement -