Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create empty DB in MSDE? 2

Status
Not open for further replies.

Terabithia

Programmer
Aug 31, 2004
70
US
I need to create an empty SQL DB using MSDE, that an application will then add its own tables to. Can I do this, and if so, how?

Thanks
 
Yes you can do this. From the command line run osql -S {servername} -E
That should connect you do the database server.
Then type this;
Code:
create database {databasename}
go
exit
That will create a database with whatever name you put in for {databasename}. Something to note, do not use spaces in the database name. SQL doesn't like it.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Thanks, it worked perfectly.

Where would I find documentation on the commands available to use with osql?

Thanks again.

 
You can run any Transact SQL statement with OSQL. To see a list of command line parameters, get to the command prompt and type OSQL ?. If you have Books On Line (BOL), there is a good section about the osql utility.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top