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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-01-07 : 08:50:24
|
| Jason Cavaliere writes "Hi Guys! We're trying to setup an instalation program for our application, which includes creating a database on the server. I have run the "generate SQL script" from Enterprise manager to get all of hte necessary information, and the script is about 30,000 lines long. It runds fine in Query Analyzer, but when I try to run it through an ADODBconnection.execute() statement via VB, the application freezes up. Is there another way that I can distribute the database?Thanks! -Jason Cavaliere" |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-01-07 : 09:55:44
|
| take a look at the command line utility isql or osql.Edited by - ValterBorges on 01/07/2003 09:56:33 |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-01-07 : 10:07:12
|
| You could also create the database as a "template", with all the tables, views etc. and little or no data (however much is needed to make it functional) You could then detach it using sp_detach_db and include the MDF (and LDF) files in your distribution package (or a plain old zip file) Once the files are unpacked, you can write a little .sql file to use sp_attach_db to attach those files to the new server. The only thing you'd need to add is some SQL to include any custom logins that are required for the new database.Take a look in Books Online for "sp_detach_db" and its related topics. |
 |
|
|
|
|
|