Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Max Tsql size

Author  Topic 

hello.d3b
Starting Member

16 Posts

Posted - 2009-10-14 : 10:50:38
hi!

i wonder what the maximum supported size of a text file containing tsql statements that can be executed by sql server 2005 through sql native client ?

The documentation is somewhat ambigious as it telss the size = 65536*network packet size which does not tell whether it is in bytes or kilobytes.
As the network packet size is specified in kilobytes should the size be in KB or in bytes? somebody plz through some light.

Also what is the limitation of a script file size in sql server ?

Thanks & Regards

deb

winterh
Posting Yak Master

127 Posts

Posted - 2009-10-14 : 11:18:36
1 billion

[/fail at query]
Go to Top of Page

hello.d3b
Starting Member

16 Posts

Posted - 2009-10-14 : 11:22:38
1 billion what ?

deb
Go to Top of Page

hello.d3b
Starting Member

16 Posts

Posted - 2009-10-14 : 12:49:43
anybody has got any idea about this ?

deb
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-10-14 : 13:00:08
Packet size is packet size, 4096 bytes = 4K bytes. If you use a different packet size then adjust the math accordingly.
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-10-14 : 13:05:19
Are you talking about executing a script via SqlCmd?
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-14 : 13:24:50
how many ways can you say bad idea?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-14 : 13:32:26
Spanish: mala idea

German: schlechte Idee

French: mauvaise idée

Chinese(simplified): ???

Japanes: ??????

Swedish: dålig idé

Hindi: ???? ?????

Flip: masamang ideya

Irish(Gaelic?): smaoineamh droch

Swahili: wazo mbaya



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

hello.d3b
Starting Member

16 Posts

Posted - 2009-10-16 : 09:21:31
quote:
Originally posted by Lamprey

Are you talking about executing a script via SqlCmd?



currently i am importing data from dbf application into sql server 2005 through a custom designed tool developed in C#. There are millions of insert and update statements generated by the tool which needs to be executed in sql server databases. Based on sql servers capability i need to limit the size of script files that are autogenerated by the tool. These script files will be executed in the SQL Server to complete the imports. So i just wanted to know what is the maximum size in KILOBYTES a script file should be in order to be executed by SQL SERVER 2005.

Unfortunately people are posting garbage instead of providing any help.

deb
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-10-16 : 13:04:38
quote:
There are millions of insert and update statements generated by the tool which needs to be executed in sql server databases.
Sounds like an opportunity for SSIS, or modifying the output of that tool. Millions of inserts and updates are not an efficient process.
Go to Top of Page
   

- Advertisement -