Wednesday, March 28, 2012

running a script to create a database in MSDE

I've been able to create a CD where it installs MSDE 2000
sp3 on a user machine. I need to create a database on the
users machine, how do I incorporate the SQL script to
create the database? Do I call the script within the
setup.ini file? Any sample anywhere I can take a look at?
Thank you,
Randers
hi Randers,
Randers wrote:
> I've been able to create a CD where it installs MSDE 2000
> sp3 on a user machine. I need to create a database on the
> users machine, how do I incorporate the SQL script to
> create the database? Do I call the script within the
> setup.ini file? Any sample anywhere I can take a look at?
> Thank you,
> Randers
unfortunately is not that easy as you are trying to do... nothing from the
box...
you can perhaps run oSql.exe to execute your DDL sql script, or a home built
app of yours you pass the path to your script and execute it via an
ADO/Ado.Net connection, or have a look at
http://msdn.microsoft.com/msdnmag/is...baseinstaller/ for
a custom made database installation task...
another approach is relying on tools such as
http://www.red-gate.com/sql/sql_packager.htm
or you could redistribute a full backup of your database made on your
distribution environment and, via osql.exe and/or a home built app of yours
relying on ADO/Ado.Net connection restore it on the destination instance...
the very same path could be performed using the .Mdf and .Ldf detached
database files and reattache them using sp_attach_db system stored
procedures...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

No comments:

Post a Comment