Generate Database script from SQLPubWiz.Create Database from Script through SQLCMD

1.Open Command Prompt.

Execute this Command

"C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Publishing\1.4\sqlpubwiz.exe" script -C "Data Source=BHAVESH\SQLEXPRESS;Initial Catalog=DBNAME;User Id =sa;Password=bhavesh;" DBNAMEFILENAME.sql

It will generate output.

2.Create Database by executing this query.

--First Create Database.

--Execute this command to create database and schemas.


Output something like this...


For any help for SQLPUBWIZ or SQLCMD

just execute this commands...

  • sqlpubwiz help
  • sqlpubwiz /? 
  • SQLCMD /?

No comments:

Post a Comment

Dear User,

Thank you very much for your kind response