Showing posts with label pull. Show all posts
Showing posts with label pull. Show all posts

Friday, March 30, 2012

Scripting

I've got SS 2000 on Win 2000 and need to do some o/s scripting to interact
with HP Openview for monitoring purposes. What I want to do is 1) pull the
location of the temp mdf using sp_helpfile and then 2) feed that into
Openview or just get the size directly using sp_spaceused and feed that into
Openview. [I have other scripts I want to run that would use osql.]
So the bottom line is that I need a crash course in vbscript (or any other
scripting language that you'd recommend that can run from the command line
and interact with Openview). How I can get this crash course? Any
books/sites that you'd recommend?Nevermind. I found an old thread of mine.
"CLM" wrote:

> I've got SS 2000 on Win 2000 and need to do some o/s scripting to interact
> with HP Openview for monitoring purposes. What I want to do is 1) pull th
e
> location of the temp mdf using sp_helpfile and then 2) feed that into
> Openview or just get the size directly using sp_spaceused and feed that in
to
> Openview. [I have other scripts I want to run that would use osql.]
> So the bottom line is that I need a crash course in vbscript (or any other
> scripting language that you'd recommend that can run from the command line
> and interact with Openview). How I can get this crash course? Any
> books/sites that you'd recommend?|||Nevermind. I found an old thread of mine.
"CLM" wrote:

> I've got SS 2000 on Win 2000 and need to do some o/s scripting to interact
> with HP Openview for monitoring purposes. What I want to do is 1) pull th
e
> location of the temp mdf using sp_helpfile and then 2) feed that into
> Openview or just get the size directly using sp_spaceused and feed that in
to
> Openview. [I have other scripts I want to run that would use osql.]
> So the bottom line is that I need a crash course in vbscript (or any other
> scripting language that you'd recommend that can run from the command line
> and interact with Openview). How I can get this crash course? Any
> books/sites that you'd recommend?sql

Tuesday, March 20, 2012

script runs fine second time (was "Need Help....")

Hi Guys and Gals...

I have a script that runs every night to pull some data from Delphi. For some strange reason the past month it has been failing on the inital running of the script but when I close off all of the error boxes and hit the script again it runs just fine... Please find enclosed the script . Can anyone tell me whe it is wrong... thanks in advanceWhat is the very first error message that you get?|||it is a follows:

Line:67
Char:1
Error: ODBC SQL Server Driver Timeout error
Code:80004005
Source: OLE DB provider for IDBC Drivers

The second and continuing errors are:

Line:49
Char:1
Permission Denied
error:800a0046
VB Script runtime error

This program runs at midnight. All the errors appear but yet when I close all of them and hit the script again it runs.....

Any help|||Is there any other activity going on with the database server at midnight?
Nightly maintenance, for instance?|||No other items are running that database around or after midnight.. This is a strange as hell...

Runs fine during the day but when it changes to another day errors.....|||What if you set it to run at 12:05 am, so that its execution does not span midnight?
Honestly, I haven't looked at the details of your dynamic SQL. You should really consider creating this as a stored procedure and dropping the cursor. That would probably effectively solve the problem on its own.|||I would expect that this is being caused by SQL needing to read in all the data you are after from disk. Once the first query times out, the second query gets the advantage of having all the data pre-populated in memory. Simple fix, just up your command timeout value. Still, you should look into the query(s) to see if improvements can be made. Especially if the query is taking over 30 seconds as it is.|||My programmer just left yesterday for holidays...

Can anyone give me the lines needed to add the "command timeout " into my script.... And where it would be best to place it...

Total anal when it comes to VB... Great with DOS though...

many thanks