Never mind. Since I am no longer writing to the text file I needed to add a vbCr for a carriage return. Now it looks and works perfectly.
BS/Computer Science
Ok so I used this function but now the data that is sent in the email is not correct. How do I get the data to send in the strBody correctly?
BS/Computer Science
One more question. In order to send the results in an email would I need to write to the text file and then read it to send it in an email? Or can I write directly to an email and send it?
BS/Computer Science
Perfect! Here is the code that I changed and it works like a charm. I'm sure there is a better/easier way to do it but this works.
Dim i, j, k
k=0
For i=0 to ubound(SVRArray,1)
For j=0 to ubound(SQLArray,1)
objFile.WriteLine fixStrLen(SVRArray(i), 32) & fixStrLen(SQLArray(j,k), 10)
k=k+1...
It isn't much different than before.
Dim objConn, objrs, resultSet, SQLStmt
Dim objFSO, objFile
'Database Connection String
Set objConn = CreateObject("ADODB.Connection")
Set objrs = CreateObject("ADODB.Recordset")
objConn.Open "Driver={SQL Server};" & _...
Now the script is executing but it isn't writing anything to the text file. The text file now looks like this.
Observe Server Free Space
BS/Computer Science
This part of my code isn't working correctly. I get subscript out of range. How do I loop through both arrays in order to write the data to my text file? Below is how I thought it would work but it is not.
Dim i, j
For i=0 to ubound(SVRArray,1)
For j=0 to ubound(SQLArray,1)...
That is good information Geates but my biggest problem is getting the data from both arrays on the same line with the correct data. I'm having a hard time figuring this out and it should be simple.
BS/Computer Science
I believe I've gotten most of the code but I cannot figure out a way to get my text file formatted the way I would like it. Below is what I want my text file to look like.
Server Name Free Space
server1 24%
server2 34%
server3 87%
server4 73%
server5 75%
Here is my code so...
Just a follow up. The problem is that Autosys looks at the home directory of the account/profile you specify. So you have to put in absolute paths for everything in the ksh script and the .sql file. (Any where there is a file defined you have to use an absolute path)
JP
BS/Computer Science
I have the script below which works via command line. When ran using Autosys it fails with the Autosys log saying "cannot open dialer_extract.sql". All files are in the same directory unless otherwise noted in the script.
What am I doing wrong and how do I fix it?
NOTE: I also tried adding the...
One more question.
This line has "$0 but no ending " so does it need it?:
mailx -s "$0 "$result records loaded to TBL1,TBL2" $eMail
Also, how could I add an attachment to this?
JP
BS/Computer Science
LKBrwnDBA, I seem to be getting an error on line 33. It says this....
syntax error at line 33: ``' unmatched
This is line 33 in the code.
result=`echo $result|tr -d' ' ','`
BS/Computer Science
Thank you...this is great. One question. Will the sqlldr command finish before the last sqlplus command runs or do I need to put some kind of wait in there? Right now it seems to be trying to execute the last sqlplus command before the sqlldr command completes.
Thanks again,
JP
BS/Computer Science
I am needing to call sqlplus and sqlldr in the same korn shell script. Below are the steps that I need to accomplish. I am new to Oracle shell scripting so an example would be great.
•CBOB_LOAD.KSH - script name
•Calls Oracle stored procedure sp_CBOB_CLEAR_LN_STAGING (SERVER: TESTSVR100)
•Calls...
I am needing to call sqlplus and sqlldr in the same korn shell script. Below are the steps that I need to accomplish. I am new to Oracle shell scripting so an example would be great.
•CBOB_LOAD.KSH - script name
•Calls Oracle stored procedure sp_CBOB_CLEAR_LN_STAGING (SERVER: TESTSVR100)
•Calls...
The script works "TheKidd" but it still isn't killing off all of the processes.....it pops up an error when shutting down that a process failed to close and until I click the "OK" button it won't reboot. Any idea how to insure the processes all die? Thanks again!
BS/Computer Science
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.