none
how i create database in sql server 2000 on dos command and in import sql script in created database on dos command.

    Question

  • Hi, All

    how i create database in sql server 2000 on dos command and in import sql script in created database on dos command.

    Thanks

    • Moved by Pavel Celba Tuesday, July 02, 2013 10:15 PM SQL Server related question
    Tuesday, July 02, 2013 4:49 PM

All replies

  • OSQL utility is there to connect from dos to create database.

    http://msdn.microsoft.com/en-us/library/aa214012%28v=sql.80%29.aspx

    Osql -Syourinstancename -U username -P password -Q"Create database yourdb"

    To import sql script(to create database objects), you need to call the script files in osql.

    Osql -Syourinstancename -U username -P password  -d yournewdatabsename -i"your script input files.sql"


    Srinivasan

    Wednesday, July 03, 2013 3:33 AM