Link to home
Start Free TrialLog in
Avatar of Abiel de Groot
Abiel de GrootFlag for Spain

asked on

Trouble Scripting large table

Hello All,

I have a remote SQL server (SQL Server 2000) which has a table that has nearly 60,000 records. I am able to script this table but cannot execute it locally, so as to replicate the table for local development.

I am using SQL server2008R2 Express. Thinking it was the Express version which was limiting me, I tried the same thing on a proper SQL server 2008, but still I get error when executing the script.

The script is 147MB but compresses down to 2mb when zipped.

On My Local SQL the error is “No able to execute the script”  ‘system.OutOfMemeryException’ (mscorlib)

For years I could script this table with no issues.

I have attached a script to create the table only, so as to allow you to see the structure.

Thanks in advance.
TBL-PRC-Structure-Only.sql
Avatar of Marten Rune
Marten Rune
Flag of Sweden image

You could try to use the BCP to move the data instead:
http://technet.microsoft.com/en-us/library/ms189941.aspx

Regards Marten
How do you actually import the table to SQL 2008? Are you using a wizard, some ETL, you scripted the structure and data?

The script you attached, which contains only the structure, worked fine on my SQL2008 version. I assume you have issues with the data.
Avatar of Abiel de Groot

ASKER

I am using SSMS : Tasks > Generate script.

When I include data it will net let me execute the script. However, it did until recently.

The script, with the data is 147MB, but zips to 2mb!

Any ideas.
I have sent you the script with the data. Its not particularly sensitive data but probably best not to post it here for all to see.

Kind regards

A.
ASKER CERTIFIED SOLUTION
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you have the Managemet Studio I suggest you to create the table on the SQL2008EX first and then expand the server node > right click on the database > Tasks > Import Data > folow the wizard but when you are at mapping part make sure you click on Edit Mappings and you have checked the "Enable Identity Insert" option.

If you don't have MS then download it fromn here:

http://www.microsoft.com/en-ca/download/details.aspx?id=7593

It's Express version and it's free.

Install instructions here: http://www.youtube.com/watch?v=2xxa7fSBSD0
many thanks. I will do it that way.