Is there a limit to how long a SQL file can be?

Teradata Studio
Enthusiast

Is there a limit to how long a SQL file can be?

I have a user that cannot get TD Studio to 'behave' for the last few days.  She is workign with a 1500 line SQL file - a drop if exists, create table, then a bunch of long insert statements.  This is TD Studio 15.10.01.01 on a  Windows 7 laptop against an Aster database runnign 6.20.02.

 

When she tries to execute the SQL, it can take up to 5 minutes for the first statement to actually process or show up in AMC (Aster Monitoring Console)  Once the steps start executing, they run in a reasonable amount of time.  however, when complete, it can then take another 5-10 minutes or more for TD Studio to show anything in the SQL History.  The script does not have an result set, just a long list of commands (drop, create, many inserts).  During that time, Studio is frozen.

 

This morning, she couldn't even run an individual statement.  Based on feedback from another user, she turned off the option to keep temporary files on the computer (go to Windows Start > Control Panel > Java, then on teh General tab click Settings button under Temporary Internet files and uncheck the 'Keep temporary files on my computer' option.).  Once she did that and restarted her computer, she was at least able to run individual statements.  But the large script still does not work.

 

Any suggestions?  We are not aware of other users experiencing this issue and I was not able to recreate it myself (although my script was much shorter).

  • Aster
  • limit
  • SQL file
2 REPLIES
Teradata Employee

Re: Is there a limit to how long a SQL file can be?

 

Hopefully someone with TDS knowkledge can pop-in and answer your specific question and help get this working in your user's current environment. Until then I wanted to suggest the Aster Client Tool (ACT) which I use when my file is too long and running slowly in TDS.

 

 

ACT can be downloaded from here. It is a command line tool for connecting to the Queen and running commands and can also be used to run SQL files. After extracting the downloaded zip file run the following from your command line: 

"C:\...Full File Path...\Aster Client Tools\stage\home\beehive\clients-win64\act.exe" -h IPAddressOfQueen -d DatabaseName -U Username -w Password -f "FullFilePathOfSQLScript.sql"

 

 

 

 

Tags (2)
Teradata Employee

Re: Is there a limit to how long a SQL file can be?

There is no limitation on SQL file length. To execute the file, are you opening the file in a SQL Editor and running 'Execute As Individual' or selecting the file in the Project Explorer and running 'Execute SQL File'? Execute As Individual will run through the Aster JDBC Parser in an attempt to split the statements before sending to Aster. This may cause a slight delay.