If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > running scripts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-12-06, 07:49
nikhincm nikhincm is offline
Registered User
 
Join Date: Sep 2006
Posts: 5
Question running scripts

i have applicationtables.sql
its contents are
connect to ridb user nikhincm using nikhincm
@sli.sql
@rumt.sql
@rdt.sql ..etc..

when i am running db2cmd->db2 -tvf applicationtables.sql

its giving error as @ is not defined others also scripts file,i want to run these scripts file while running applicationtables.sql ..anybody please replay to me urgent.
Reply With Quote
  #2 (permalink)  
Old 09-12-06, 11:20
jthakrar jthakrar is offline
Registered User
 
Join Date: Mar 2004
Posts: 46
It seems you are trying to run "scripts" within a script file - probably trying out the Oracle SQL*Plus approach. This does not work in DB2's command line processor.

Would recommend creating a shell script or Windows batch file that has the following formats -
db2 connect to <dbname> user <username> using <password>
db2 -tvf file1.sql
db2 -tvf file2.sql
......
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On