It has been a long time that I have not written any articles in my blog. I was busy with my marriage on June 8th and also from conjunctivitis. I will be uploading some good snaps in the blog after once I received the photos.
Today my friends umesh and syam came and ask me how to generate insert scripts from the SQL Server. I explained them with a simple example. I think this will help you too.
Steps:
1 Right click the database and choose Tasks -> Generate Scripts.
2 SQL Server Script wizard will open up and click next.
3 A new option for selecting the database will open and Select the database and click next.
4 Under table and view options, change script data to true. In General options change scripts create to False.
5 Click next and select objects tables or views, here tables and click next.
6 Select Particular tables/views; here Bill Details and click next.
7 Click next to create the script to New Query window and click finish.
8 You can see Insert scripts on the SSMS Query area.
The Following image will help you more,
Hope everyone likes this article.
Fazal Vahora
13 years agoCongratulations friend.. Happy marriage Life.
Regards,
Fazal
Varun
13 years agoThanks Fazal…
Preethy kamath
13 years agoHai Varun,
First I Wish u a very happy married life and bright future.
Varun,I just try to generate script by following your guide lines.But I can’t find ‘Script Data Option’ in Table/View options.I am using SQL Server 2005 DB.Could you pls help me to solve it.
Fazal Vahora
13 years agoHi Preethy,
Yes, you are right you can’t find Generate Scripts option in Table/View Option, You can find option in Database.
Try to follow step 1 as per information given by Varun.
Thanks & Regards,
Fazal Vahora
Preethy Kamath
13 years agoHi Fazal,
I can’t find the Script Data option specified in 4 th step.
4 Under table and view options, change script data to true. In General options change scripts create to False.
Thanks,
Preethy Kamath
Fazal Vahora
13 years agoHello Preethy
You can take script data with using Microsoft SQL Server Database Publishing Wizard 1.1 for SQL Server 2005. It is installed in C:\Program Files\Microsoft SQL Server\90\Tools\Publishing. use SqlPubWiz wizard to create data scripts. you can download Microsoft SQL Server Database Publishing Wizard 1.1 from following link http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5498
Thanks & Regards,
Fazal Vahora
Preethy Kamath
13 years agoThank You Varun & Fazal
neeraj prasad
13 years agothis feature is only available for upper version and what if you want data with where clause.
here i made a store procudure for that .
http://sql-server-script.blogspot.in/