Hi,
I have just created a SQL server database with tables/stored procedure etc.
I need a simple way of installing this database in several client locations
based on server name or instance name.
Can this be done directly from ADO sending a script to SQL server ?
The actual creation of the database can be left to the client, and then ADO
need to create the structure if creating a database is difficult.
Any ideas ?
BTW: I dont want to ship any extra components other than the standard ADO
package.
David
Dmitriy Antonov - 28 Dec 2005 07:33 GMT
> Hi,
>
[quoted text clipped - 15 lines]
>
> David
One way is to create one big TSQL script or a bunch of smaller ones then run
it as any other TSQL statement (you'll have to use Master DB to create DB in
the first steps and then use newly created DB for all other steps)
Another way is to prepare DB as template and then ship MDB file (with or
without LDB). Then you can attach it using sp_attach_db or
sp_attach_single_file_db procedures.
There are also SQL-DMO and ADOX libraries, which, probably, can be used here
too.
Dmitriy.