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
 Transact-SQL (2005)
 create a database using a .bat file

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-02-21 : 14:19:31
Hi,

How would I go about creating a database from the command prompt using a .bat file?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-21 : 15:03:09
Call sql statement with sqlcmd in .bat file.
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-02-21 : 17:54:15
thanks, I just used osql to run a query.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-21 : 17:56:17
Better to use sqlcmd for sql2k5.
Go to Top of Page
   

- Advertisement -