But when I do, the output .sql file is only 1,842 kB in size - over 1,000 kB smaller or about 1/3 the size less.
Hi,
When you use Generate SQL Server Script, please turn Script Data to "True" in Table/View options. Thus, it will copy the data from your database in the script.
Thanks.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
You scripts are generated with options you choose for your objects with both tools. The default settings in them may be different, which will generated different syntax. You can walk through the Options when you generate your script line by line to satisfy
your need. You should be safe to get the script of your database after you confirm your selections.
The default settings in them may be different, which will generated different syntax.
Deviating from the default settings of the Database Publishing Wizard and generating different output, is cause for concern that not everything wil be scripted.
limno
You can walk through the Options when you generate your script line by line to satisfy your need.
I know, however there are 32 options in the Advanced section. The Database Publishing Wizard took care of these details for us with the "Publish to provider" option in Visual Studio 2010.
Any good reason for taking away such a great tool such as the Database Publishing Wizard ?
Will the Database Publishing Wizard work with SQL Server 2012?
Keep it Simp...
Member
549 Points
264 Posts
Generate and Publish Scripts vs Database Publishing Wizard
Aug 27, 2012 06:03 AM|LINK
I used to use Database Publishing Wizard in Visual Studio 2010 to produce a schema only .sql script file of my database, file size was 2,914 kB.
When I did a clean install of SQL Server 2012 I ran the .sql script to recreate the database.
I just discovered that Database Publishing Wizard is discontinued, and that I need to use the Generate and Publish Scripts within SSMS 2012.
But when I do, the output .sql file is only 1,842 kB in size - over 1,000 kB smaller or about 1/3 the size less.
I have not changed the database at all, and am only generating schema in both cases i.e. no data.
Why is the new Generate and Publish Scripts tool missing so much SQL code?
PS. My main concern is it's not scripting the entire schema. If it's just more efficient, I'm happy with that.
Chen Yu - MS...
All-Star
21600 Points
2493 Posts
Microsoft
Re: Generate and Publish Scripts vs Database Publishing Wizard
Aug 30, 2012 08:42 AM|LINK
Hi,
When you use Generate SQL Server Script, please turn Script Data to "True" in Table/View options. Thus, it will copy the data from your database in the script.
Thanks.
Feedback to us
Develop and promote your apps in Windows Store
Keep it Simp...
Member
549 Points
264 Posts
Re: Generate and Publish Scripts vs Database Publishing Wizard
Aug 30, 2012 09:25 AM|LINK
Chen Yu, as I said in the origianl post: I have not changed the database at all, and am only generating schema in both cases i.e. no data
I do not want the data. The data is development test data. I only need and want the schema.
limno
All-Star
117340 Points
8005 Posts
Moderator
MVP
Re: Generate and Publish Scripts vs Database Publishing Wizard
Aug 30, 2012 02:08 PM|LINK
You scripts are generated with options you choose for your objects with both tools. The default settings in them may be different, which will generated different syntax. You can walk through the Options when you generate your script line by line to satisfy your need. You should be safe to get the script of your database after you confirm your selections.
Format your SQL query with instant sql formatter:
http://www.dpriver.com/pp/sqlformat.htm
Keep it Simp...
Member
549 Points
264 Posts
Re: Generate and Publish Scripts vs Database Publishing Wizard
Aug 31, 2012 01:15 AM|LINK
Deviating from the default settings of the Database Publishing Wizard and generating different output, is cause for concern that not everything wil be scripted.
I know, however there are 32 options in the Advanced section. The Database Publishing Wizard took care of these details for us with the "Publish to provider" option in Visual Studio 2010.
Any good reason for taking away such a great tool such as the Database Publishing Wizard ?
Will the Database Publishing Wizard work with SQL Server 2012?
Keep it Simp...
Member
549 Points
264 Posts
Re: Generate and Publish Scripts vs Database Publishing Wizard
Sep 03, 2012 08:20 AM|LINK
Can Microsoft please provide what the settings should be to match the Database Publishing Wizard?
I've just spent a couple of hours troubleshooting an error that came back to the script being different (for Full Text Search).
Keep it Simp...
Member
549 Points
264 Posts
Re: Generate and Publish Scripts vs Database Publishing Wizard
Sep 05, 2012 10:21 AM|LINK
BUMP