I have a script to run against a SQL Server 2000 database Windows 2003 OS).
The script creates temp tables and then uses the manipulated data to update
the database.
The probelem is when I run the script in Query Analyzer it takes less then
10 minutes to execute. When run the same script using OSQL it takes over an
hour.
Has anyone seen anything like this? Any suggestions would be great.
Possibly different SET setting can affect things. Also, you could try SET NOCOUNT ON and see if it
makes any difference.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wex" <Wex@.discussions.microsoft.com> wrote in message
news:1B68CD56-168D-419F-A01D-8FF310F2EC96@.microsoft.com...
>I have a script to run against a SQL Server 2000 database Windows 2003 OS).
> The script creates temp tables and then uses the manipulated data to update
> the database.
> The probelem is when I run the script in Query Analyzer it takes less then
> 10 minutes to execute. When run the same script using OSQL it takes over an
> hour.
> Has anyone seen anything like this? Any suggestions would be great.
Showing posts with label creates. Show all posts
Showing posts with label creates. Show all posts
Friday, March 9, 2012
OSQL performance slow vs ISQLW
I have a script to run against a SQL Server 2000 database Windows 2003 OS).
The script creates temp tables and then uses the manipulated data to update
the database.
The probelem is when I run the script in Query Analyzer it takes less then
10 minutes to execute. When run the same script using OSQL it takes over an
hour.
Has anyone seen anything like this? Any suggestions would be great.Possibly different SET setting can affect things. Also, you could try SET NO
COUNT ON and see if it
makes any difference.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wex" <Wex@.discussions.microsoft.com> wrote in message
news:1B68CD56-168D-419F-A01D-8FF310F2EC96@.microsoft.com...
>I have a script to run against a SQL Server 2000 database Windows 2003 OS).
> The script creates temp tables and then uses the manipulated data to updat
e
> the database.
> The probelem is when I run the script in Query Analyzer it takes less then
> 10 minutes to execute. When run the same script using OSQL it takes over
an
> hour.
> Has anyone seen anything like this? Any suggestions would be great.
The script creates temp tables and then uses the manipulated data to update
the database.
The probelem is when I run the script in Query Analyzer it takes less then
10 minutes to execute. When run the same script using OSQL it takes over an
hour.
Has anyone seen anything like this? Any suggestions would be great.Possibly different SET setting can affect things. Also, you could try SET NO
COUNT ON and see if it
makes any difference.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wex" <Wex@.discussions.microsoft.com> wrote in message
news:1B68CD56-168D-419F-A01D-8FF310F2EC96@.microsoft.com...
>I have a script to run against a SQL Server 2000 database Windows 2003 OS).
> The script creates temp tables and then uses the manipulated data to updat
e
> the database.
> The probelem is when I run the script in Query Analyzer it takes less then
> 10 minutes to execute. When run the same script using OSQL it takes over
an
> hour.
> Has anyone seen anything like this? Any suggestions would be great.
OSQL performance slow vs ISQLW
I have a script to run against a SQL Server 2000 database Windows 2003 OS).
The script creates temp tables and then uses the manipulated data to update
the database.
The probelem is when I run the script in Query Analyzer it takes less then
10 minutes to execute. When run the same script using OSQL it takes over an
hour.
Has anyone seen anything like this? Any suggestions would be great.Possibly different SET setting can affect things. Also, you could try SET NOCOUNT ON and see if it
makes any difference.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wex" <Wex@.discussions.microsoft.com> wrote in message
news:1B68CD56-168D-419F-A01D-8FF310F2EC96@.microsoft.com...
>I have a script to run against a SQL Server 2000 database Windows 2003 OS).
> The script creates temp tables and then uses the manipulated data to update
> the database.
> The probelem is when I run the script in Query Analyzer it takes less then
> 10 minutes to execute. When run the same script using OSQL it takes over an
> hour.
> Has anyone seen anything like this? Any suggestions would be great.
The script creates temp tables and then uses the manipulated data to update
the database.
The probelem is when I run the script in Query Analyzer it takes less then
10 minutes to execute. When run the same script using OSQL it takes over an
hour.
Has anyone seen anything like this? Any suggestions would be great.Possibly different SET setting can affect things. Also, you could try SET NOCOUNT ON and see if it
makes any difference.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wex" <Wex@.discussions.microsoft.com> wrote in message
news:1B68CD56-168D-419F-A01D-8FF310F2EC96@.microsoft.com...
>I have a script to run against a SQL Server 2000 database Windows 2003 OS).
> The script creates temp tables and then uses the manipulated data to update
> the database.
> The probelem is when I run the script in Query Analyzer it takes less then
> 10 minutes to execute. When run the same script using OSQL it takes over an
> hour.
> Has anyone seen anything like this? Any suggestions would be great.
Wednesday, March 7, 2012
OSQL fails silently
Hello,
I have a InstallShield program that installs MSDE and then creates a new
database in it. To set up the new database on MSDE I run OSQL. Most of the
time, OSQL works OK. But, sometimes it fails and doesn't print out any
error messages (in the output file).
Has anyone seen this intermittant silent failure behavior before?
The OSQL command I use is:
OSQL.EXE -E -b -i SetupRTEDatabase.sql -o SetupRTEDatabase.log
Regards,
RobertHi Robert
You don't say if you check ERRORLEVEL after the call?
How large the input file?
Have you tried the -e parameter to see the commands?
John
"Robert Wheadon" wrote:
> Hello,
> I have a InstallShield program that installs MSDE and then creates a new
> database in it. To set up the new database on MSDE I run OSQL. Most of t
he
> time, OSQL works OK. But, sometimes it fails and doesn't print out any
> error messages (in the output file).
> Has anyone seen this intermittant silent failure behavior before?
> The OSQL command I use is:
> OSQL.EXE -E -b -i SetupRTEDatabase.sql -o SetupRTEDatabase.log
> Regards,
> Robert
>
>|||Hello John,
> You don't say if you check ERRORLEVEL after the call?
>
Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
> How large the input file?
>
10 KB
> Have you tried the -e parameter to see the commands?
>
No. I hadn't thought of that.|||Hi
Non zero values of ERRORLEVEL indicate and error. Have you checked the
output for Msg?
OSQL can have issues with larger files, you may want to split your script
into multiple files and run them separately.
You may also want to specify -n to get cleaner output.
John
"Robert Wheadon" wrote:
> Hello John,
>
> Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
>
> 10 KB
>
> No. I hadn't thought of that.
>
>|||I've sorted this one out. See my post "OSQL returns error code of 1 -
intermittently.
SysInternals' FileMonitor and ProcessMonitor tools were helpful in finding
the problem.
"Robert Wheadon" <robert.wheadon@.monitorbm.co.nz> wrote in message
news:eslJ5B3UGHA.4772@.TK2MSFTNGP14.phx.gbl...
> Hello John,
>
> Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
>
> 10 KB
>
> No. I hadn't thought of that.
>
I have a InstallShield program that installs MSDE and then creates a new
database in it. To set up the new database on MSDE I run OSQL. Most of the
time, OSQL works OK. But, sometimes it fails and doesn't print out any
error messages (in the output file).
Has anyone seen this intermittant silent failure behavior before?
The OSQL command I use is:
OSQL.EXE -E -b -i SetupRTEDatabase.sql -o SetupRTEDatabase.log
Regards,
RobertHi Robert
You don't say if you check ERRORLEVEL after the call?
How large the input file?
Have you tried the -e parameter to see the commands?
John
"Robert Wheadon" wrote:
> Hello,
> I have a InstallShield program that installs MSDE and then creates a new
> database in it. To set up the new database on MSDE I run OSQL. Most of t
he
> time, OSQL works OK. But, sometimes it fails and doesn't print out any
> error messages (in the output file).
> Has anyone seen this intermittant silent failure behavior before?
> The OSQL command I use is:
> OSQL.EXE -E -b -i SetupRTEDatabase.sql -o SetupRTEDatabase.log
> Regards,
> Robert
>
>|||Hello John,
> You don't say if you check ERRORLEVEL after the call?
>
Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
> How large the input file?
>
10 KB
> Have you tried the -e parameter to see the commands?
>
No. I hadn't thought of that.|||Hi
Non zero values of ERRORLEVEL indicate and error. Have you checked the
output for Msg?
OSQL can have issues with larger files, you may want to split your script
into multiple files and run them separately.
You may also want to specify -n to get cleaner output.
John
"Robert Wheadon" wrote:
> Hello John,
>
> Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
>
> 10 KB
>
> No. I hadn't thought of that.
>
>|||I've sorted this one out. See my post "OSQL returns error code of 1 -
intermittently.
SysInternals' FileMonitor and ProcessMonitor tools were helpful in finding
the problem.
"Robert Wheadon" <robert.wheadon@.monitorbm.co.nz> wrote in message
news:eslJ5B3UGHA.4772@.TK2MSFTNGP14.phx.gbl...
> Hello John,
>
> Yes, I do. When OSQL decides to fail, I get an ERRORLEVEL of 1.
>
> 10 KB
>
> No. I hadn't thought of that.
>
Subscribe to:
Posts (Atom)