Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In SQL Server 2008 R2 script data missing on Script Wizard

In my SQL Server 2008 R2

Script Option Screen of Script Wizard under section Table/View Options Look I find Script Data row and want to turn the option to True but I fail.

I don't find any script data option. Why script data option missing on my SQL Server 2008 R2? Is there any command to generate the insert data option.

Why this problem arise? how to solve it? Thanks in advance

like image 396
shamim Avatar asked Dec 06 '10 15:12

shamim


People also ask

How can I see the script of a database?

Select the View in the Object Explorer, right click, and select Script View as -> Create to -> New Query Editor Window. That will create a script to create the view in a new window.


2 Answers

It looks like they removed it from that location. You can still do it by:

  • Right clicking on the DB
  • Click on tasks
  • Click on generate scripts
  • Go through the wizard and select your tables
  • On the options page click the Advanced button
  • Change the "Types of data to script" option, from the default "Schema only" to "Schema and data".
like image 191
shamim Avatar answered Sep 28 '22 03:09

shamim


In SQL Server 2008 R2 you can go on the DB, right click on DB -> Tasks -> Generate scripts. This is the wizard for scripting the objects (with or without data). Follow the stepts described on the first page. At the third stept, "Set Scripting Options", after you choose your way to save /publish your data, you go on "Advanced" and there, for General Options, at line "Types of data to script" you can choose to script also your data ("Schema and data").

i.stack.imgur.com/tFqfO.jpg

like image 20
gabriela sarbu Avatar answered Sep 28 '22 03:09

gabriela sarbu