views:

40

answers:

3

How to create new database with SQL Server Express 2008 without using Management Studio?

Do i need to download sp1?

A: 

You could connect to it in code (.net express or something) with a connectionstring, then run an sql script to create a db (see http://msdn.microsoft.com/en-us/library/ms176061.aspx).

But why can't you use the management studio?

SteveCav
on executing managemnt studio i m getting message tht i need to download sp1..can i do without using management studio.
remo
+4  A: 

You can use the SqlCmd utility from the command line to execute SQL.

Open a command prompt and then type SqlCmd.exe and press enter, you should then get 1) which means you are connected.

Once connected execute

1) CREATE DATABASE dbname
2) GO
Chris Diver
A: 

Use CREATE DATABASE via sqlcmd or another other database connection (even VBA from Excel...)

gbn