May 25, 2015 at 4:09 am
Hi,
I have a table with data.
I want to create the table and its data on other place. What is the quick way of doing this script?
Thank you
May 25, 2015 at 4:29 am
I strongly recommend that you don't script the data. The file sizes get very large and Management Studio often can't handle the large files.
Script the table (right click table -> script or right click database -> Tasks -> generate script), then use bcp out to generate a file with the data in it.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 25, 2015 at 4:32 am
Thank you for the feedback. This table has only 233 records. can I use any script function to script the data?
May 25, 2015 at 4:39 am
You can use the Generate Scripts to script data, but do be careful about the number of rows. There's a lot of overhead in a script of the data because of all the INSERT INTO ... statements
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 25, 2015 at 4:57 am
GilaMonster (5/25/2015)
You can use the Generate Scripts to script data
I can not see the option to script the data. I just see the option to script the object and it's dependencies.
May 25, 2015 at 5:00 am
GilaMonster (5/25/2015)
right click database -> Tasks -> generate script)
There's an 'advanced' button on the 'Set Scripting Options' tab. In that, select to script schema and data
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 25, 2015 at 11:22 am
river1 (5/25/2015)
Hi,I have a table with data.
I want to create the table and its data on other place. What is the quick way of doing this script?
Thank you
In relation to the current database where the table lives, where will the new table "live"?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply