Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to create new database without using management studio

Tags:

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

Do i need to download sp1?

like image 259
remo Avatar asked Jul 09 '10 05:07

remo


People also ask

How can I use SQL Server without management studio?

If there is no need for user interface and the command line is OK then we can use SQLCMD tool. This tool can be downloaded by searching “SQL Server feature pack” in any search engine. Here are the results as of today in google. Based on your need, you can choose the version.

Can I create my own database with SQL?

Select Databases from the SQL navigation menu. Click Create database. In the New database dialog, specify the name of the database. Click Create.

How do I replace SQL Server Management Studio?

On the Edit menu, point to Find and Replace, and then click Quick Replace to open the dialog box with both find options and replace options. Toolbar buttons and shortcut keys are also available to open the Find and Replace dialog box.

How do you create a new database?

Right-click Databases, and then select New Database. In New Database, enter a database name. To create the database by accepting all default values, select OK; otherwise, continue with the following optional steps. To change the owner name, select (...) to select another owner.


2 Answers

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
like image 63
Chris Diver Avatar answered Sep 18 '22 09:09

Chris Diver


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

like image 22
gbn Avatar answered Sep 19 '22 09:09

gbn