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 > -vf cte.db2 -t

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-11, 16:46
emosms emosms is offline
Registered User
 
Join Date: Mar 2011
Posts: 7
-vf cte.db2 -t

Hi,

Every time when I try to execute command containing flags like f. ex:
-vf cte.db2 -t
I got an error:
DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command.

Also when I am trying to load sql script from an external file, where do I put the .sql files on the filesystem (using win XP)?
-tf filename....

Best Regards
Reply With Quote
  #2 (permalink)  
Old 03-01-11, 17:14
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Typically most DBA's use:

db2 -tvf file_name.sql > file_name.out

Note that file_name.sql can be any file name, and does not have to have a file type of "sql". Neither does the output file have to have a file type of "out".

If you want to specify a different SQL delimiter (other than default ";"), then you can do this (assuming "@" is your delimiter).

db2 -td@ -vf file_name.sql > file_name.out

If your input file is in a different path than current path, you just specify the full path:

db2 -tvf c:\file_name.sql > file_name.out
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-01-11, 17:33
emosms emosms is offline
Registered User
 
Join Date: Mar 2011
Posts: 7
delimiters

Still cannot get the delimiters part.
I never used db2, now I am doing a simple exercise but it doesn't work.
f.ex:

"You can then enter SQL commands using the same db2 program. Use db2 -t to enter multiline SQL commands terminated by a semicolon.
# db2 -t "

each end every command I start with "-x" (whatever letter) produces an error.

I am especially interested to load sql scripts from fexternal files to do my exercising, but then again the command starts smth. like -tf, or -tvf and I get the same error:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command.....
Reply With Quote
  #4 (permalink)  
Old 03-01-11, 18:06
emosms emosms is offline
Registered User
 
Join Date: Mar 2011
Posts: 7
command prompt modes???
never heard about it

DB2 Basics: Getting to know the DB2 UDB command line processor

thx
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