Create an Database in an MSDE Database

Databases are located in the C:\All Programs\Microsoft SQL Server directory and have an *.mdf extension associated to a log file with an *.ldf extension.

 

What do you want to do?

hdarrow.gif  Create a new database

 

 

Create a New Database

ClicknDECiDE databases are located in the C:\All Programs\Microsoft SQL Server\ directory and have an *.mdf extension associated to a log file with an *.ldf extension. To create a new database, please perform the steps below. In this example we will create the testdb database.

Note: use uppercase characters if required in the following command lines, for example for -U -P or -Q.

  1. Select Start> All Programs> Accessories> Command Prompt to open a DOS Window.

  2. Type the database directory: C:\All Programs\Microsoft SQL Server

  3. Type the command: OSQL -U sa

  4. Press ENTER.

  5. Enter the Password.

  6. Press ENTER. The following command line will appear: >1

  7. Type the command:
    1> Create database testdb

  8. Press ENTER. The following command line will appear: >2

  9. Type the command:
    2> go

  10. Press ENTER. A message will be displayed if the command is successful and the command line will return to >1.

  11. Type the following command to quit:
    1> Exit

  12. Press ENTER. The prompt will return to: C:\All Programs\Microsoft SQL Server

 

htop.gif Top of Page 

See Also