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 > Script Out Telnet Session and Issue a DB2 RUNSTATS Command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-04, 18:09
bkellis bkellis is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Script Out Telnet Session and Issue a DB2 RUNSTATS Command

Does anyone know how to script out a telnet session? Here's what I have:

I'm working in SQL Server and I have a DTS package that has a process that drops/creates a table, populates it, adds an index and then issues a command that updates the statistics on the table. The problem is that the update statistics command is actually a DB2 Utility (RUNSTATS) that can only be executed at a DB2 command prompt because it is a utility, not a SQL statement.

My thought is if I could create a script that would open a telnet session, I could issue the command from there and then move on in my process. So basically, I'm looking for something similar to the ftp command where you specify the commands in a file and then point to the file using the -s parameter...

ftp [-s: filename] [hostname]
where -s: filename specifies a text file containing ftp commands; the commands automatically run after ftp starts.

Is this possible to create a script that controls a telnet session?

Or is there some other way to get statistics updated in DB2?

TIA -- Brian
Reply With Quote
  #2 (permalink)  
Old 12-07-04, 12:15
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by bkellis
Does anyone know how to script out a telnet session? Here's what I have:

I'm working in SQL Server and I have a DTS package that has a process that drops/creates a table, populates it, adds an index and then issues a command that updates the statistics on the table. The problem is that the update statistics command is actually a DB2 Utility (RUNSTATS) that can only be executed at a DB2 command prompt because it is a utility, not a SQL statement.

My thought is if I could create a script that would open a telnet session, I could issue the command from there and then move on in my process. So basically, I'm looking for something similar to the ftp command where you specify the commands in a file and then point to the file using the -s parameter...

ftp [-s: filename] [hostname]
where -s: filename specifies a text file containing ftp commands; the commands automatically run after ftp starts.

Is this possible to create a script that controls a telnet session?

Or is there some other way to get statistics updated in DB2?

TIA -- Brian
You can do a RUNSTATS command from a client, wouldn't it be easier to do that?

What language is your DTS package in?
__________________
--
Jonathan Petruk
DB2 Database Consultant
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