Showing posts with label frequently. Show all posts
Showing posts with label frequently. Show all posts

Wednesday, March 7, 2012

Microsoft Visual Studio is busy

I get this message in a balloon that pops up frequently when I am trying to work in the SSIS designer. For example, I get it when working in a DataFlow task, trying to open editors for the OleDb Source and Destination. Is anyone else getting this? What could be the cause, it seems to get sluggish. Thanks.

What OLEDB drivers are you using? As a first step I would check that you have the latest version of all the OLEDB drivers, and upgrade if not.

I used to get this message constantly when using the v7 FoxPro driver. Changing to the most recent driver , v9, cured the problem completely.

Hope this helps,

Richard

|||TFYR. I'm just using the OLEDB source/destination that were installed when I upgraded my default instance to SS 2005. (I had been using SQL2005 side-by-side previously with SQL 2000). I've also noticed that when scripting objects it will also get sluggish and hangs for awhile on the step where it determines objects in the database. Right now, I've been waiting over 2 minutes to script a single proc out of the database, so I think there is some kind of systemic problem. Same problem when I try to expand some nodes in Object Explorer (Tables, procs etc), it'll be real sluggish.|||

Seems odd. Are your source and destination SQL Server machines, or something else?

Maybe the upgrade process didn't tie things together properly? As a possibility, would you be able to backup everything and do a clean uninstall/ re-install of SQL 2005?

Sorry I've not posted back earlier.

Rich

|||

Rich,

TFYR. Yes, both source/dest are SQL Server machines. And yes, I can do an uninstall/re-install but probably won't get to it until next week . Do you think it might help if I tried removing the named SQL2005 instance that I have? Not sure how I would remove a named instance, but I will look in the docs.

Thanks.

|||

Rich,

You got me thinking about uninstalling/reinstalling but before trying it I wanted to try removing my SQL2005 named instance and the performance is now much improved. I haven't gotten the "Visual Studio is busy" message yet. I don't get the long delay when scripting objects out either. Maybe it was because I had originally installed SQL2005 as a named instance side by side with SQL2005 default instance and then upgraded the default instance to SQL2005 but never removed the named instance. Anyway, it is much, much improved. Thanks.

|||Yes... i'm facing that kind of problem almost everytime. Especially when the project contains a lot of packages. After the pop-up appears, it will hang and i have to terminate the process using ctrl+alt+del. Until now, i still can't configure what d problem is! I don think it is oledb connection. I would say it is software problem.|||How much RAM do you have? I found that adding RAM helped.|||

I'm running 2 gigs of memory on a 2 ghz processor. So i know my computer isn't trash. But As of recently, every single time i open Studio I get issues with a pop-up that "Microsoft Visual Studio is busy." let microsoft know....

and it hangs for roughly 10 seconds. so if I make 20 changes to a page, that the changes themselves took me 20 seconds... i just spent (20*10 + 20) 220 seconds, or nearly 4 minutes to make a few quick changes...

Or, let's say that i like saving the pages alot, which I do, so I may copy paste a <br />, and then it locks, then i'll type something and insert a <asp:label tag, and it locks, then i'll delete the ID and insert a new id, and it locks... and maybe it locks again.

|||I can certainly understand the frustration as I was in the same predicament. I was so desperate I added RAM (increased to 1.5GB) and also purchased Registry Booster. I also removed a named instance of SQL2005 that was a remnant of a side-by-side installation with SQL2000. Whatever I did got rid of the problem and I am no longer plagued by the "Microsoft Visual Studio is busy" message.|||

Hi folks:

I have the same exact problem. I see the message Visual studio is busy. For me this started happening after I installed Visual Studio 2005. I have 1 GB memory and i have both SQL 2000 (default instance) and SQL 2005 (named instance) running on the box. I never had this issue when i was running VS.NET 2003.

I started seeing this after I uninstalled VS.NET 2003 and installed VS.NET 2005. Does anyone know if I uninstall SQL 2005 and reinstall it again the problem would be gone?.

Thanks

AK

|||

Hi there,

same problem here. Since I use SSIS development in Visual Studio in combination with Vista, Visual Studio keeps being busy after executing larger SSIS packages. Looks like a Vista problem. Before I used XP where te problem didn't occure. It partically occures when the SSIS package is handling large data volumes (more then 100000 records).

A solution would be welcome.

Thanks.

RK

Microsoft Visual Studio is busy

I get this message in a balloon that pops up frequently when I am trying to work in the SSIS designer. For example, I get it when working in a DataFlow task, trying to open editors for the OleDb Source and Destination. Is anyone else getting this? What could be the cause, it seems to get sluggish. Thanks.

What OLEDB drivers are you using? As a first step I would check that you have the latest version of all the OLEDB drivers, and upgrade if not.

I used to get this message constantly when using the v7 FoxPro driver. Changing to the most recent driver , v9, cured the problem completely.

Hope this helps,

Richard

|||TFYR. I'm just using the OLEDB source/destination that were installed when I upgraded my default instance to SS 2005. (I had been using SQL2005 side-by-side previously with SQL 2000). I've also noticed that when scripting objects it will also get sluggish and hangs for awhile on the step where it determines objects in the database. Right now, I've been waiting over 2 minutes to script a single proc out of the database, so I think there is some kind of systemic problem. Same problem when I try to expand some nodes in Object Explorer (Tables, procs etc), it'll be real sluggish.|||

Seems odd. Are your source and destination SQL Server machines, or something else?

Maybe the upgrade process didn't tie things together properly? As a possibility, would you be able to backup everything and do a clean uninstall/ re-install of SQL 2005?

Sorry I've not posted back earlier.

Rich

|||

Rich,

TFYR. Yes, both source/dest are SQL Server machines. And yes, I can do an uninstall/re-install but probably won't get to it until next week . Do you think it might help if I tried removing the named SQL2005 instance that I have? Not sure how I would remove a named instance, but I will look in the docs.

Thanks.

|||

Rich,

You got me thinking about uninstalling/reinstalling but before trying it I wanted to try removing my SQL2005 named instance and the performance is now much improved. I haven't gotten the "Visual Studio is busy" message yet. I don't get the long delay when scripting objects out either. Maybe it was because I had originally installed SQL2005 as a named instance side by side with SQL2005 default instance and then upgraded the default instance to SQL2005 but never removed the named instance. Anyway, it is much, much improved. Thanks.

|||Yes... i'm facing that kind of problem almost everytime. Especially when the project contains a lot of packages. After the pop-up appears, it will hang and i have to terminate the process using ctrl+alt+del. Until now, i still can't configure what d problem is! I don think it is oledb connection. I would say it is software problem.|||How much RAM do you have? I found that adding RAM helped.|||

I'm running 2 gigs of memory on a 2 ghz processor. So i know my computer isn't trash. But As of recently, every single time i open Studio I get issues with a pop-up that "Microsoft Visual Studio is busy." let microsoft know....

and it hangs for roughly 10 seconds. so if I make 20 changes to a page, that the changes themselves took me 20 seconds... i just spent (20*10 + 20) 220 seconds, or nearly 4 minutes to make a few quick changes...

Or, let's say that i like saving the pages alot, which I do, so I may copy paste a <br />, and then it locks, then i'll type something and insert a <asp:label tag, and it locks, then i'll delete the ID and insert a new id, and it locks... and maybe it locks again.

|||I can certainly understand the frustration as I was in the same predicament. I was so desperate I added RAM (increased to 1.5GB) and also purchased Registry Booster. I also removed a named instance of SQL2005 that was a remnant of a side-by-side installation with SQL2000. Whatever I did got rid of the problem and I am no longer plagued by the "Microsoft Visual Studio is busy" message.|||

Hi folks:

I have the same exact problem. I see the message Visual studio is busy. For me this started happening after I installed Visual Studio 2005. I have 1 GB memory and i have both SQL 2000 (default instance) and SQL 2005 (named instance) running on the box. I never had this issue when i was running VS.NET 2003.

I started seeing this after I uninstalled VS.NET 2003 and installed VS.NET 2005. Does anyone know if I uninstall SQL 2005 and reinstall it again the problem would be gone?.

Thanks

AK

Microsoft Visual Studio is busy

I get this message in a balloon that pops up frequently when I am trying to work in the SSIS designer. For example, I get it when working in a DataFlow task, trying to open editors for the OleDb Source and Destination. Is anyone else getting this? What could be the cause, it seems to get sluggish. Thanks.

What OLEDB drivers are you using? As a first step I would check that you have the latest version of all the OLEDB drivers, and upgrade if not.

I used to get this message constantly when using the v7 FoxPro driver. Changing to the most recent driver , v9, cured the problem completely.

Hope this helps,

Richard

|||TFYR. I'm just using the OLEDB source/destination that were installed when I upgraded my default instance to SS 2005. (I had been using SQL2005 side-by-side previously with SQL 2000). I've also noticed that when scripting objects it will also get sluggish and hangs for awhile on the step where it determines objects in the database. Right now, I've been waiting over 2 minutes to script a single proc out of the database, so I think there is some kind of systemic problem. Same problem when I try to expand some nodes in Object Explorer (Tables, procs etc), it'll be real sluggish.|||

Seems odd. Are your source and destination SQL Server machines, or something else?

Maybe the upgrade process didn't tie things together properly? As a possibility, would you be able to backup everything and do a clean uninstall/ re-install of SQL 2005?

Sorry I've not posted back earlier.

Rich

|||

Rich,

TFYR. Yes, both source/dest are SQL Server machines. And yes, I can do an uninstall/re-install but probably won't get to it until next week . Do you think it might help if I tried removing the named SQL2005 instance that I have? Not sure how I would remove a named instance, but I will look in the docs.

Thanks.

|||

Rich,

You got me thinking about uninstalling/reinstalling but before trying it I wanted to try removing my SQL2005 named instance and the performance is now much improved. I haven't gotten the "Visual Studio is busy" message yet. I don't get the long delay when scripting objects out either. Maybe it was because I had originally installed SQL2005 as a named instance side by side with SQL2005 default instance and then upgraded the default instance to SQL2005 but never removed the named instance. Anyway, it is much, much improved. Thanks.

|||Yes... i'm facing that kind of problem almost everytime. Especially when the project contains a lot of packages. After the pop-up appears, it will hang and i have to terminate the process using ctrl+alt+del. Until now, i still can't configure what d problem is! I don think it is oledb connection. I would say it is software problem.|||How much RAM do you have? I found that adding RAM helped.|||

I'm running 2 gigs of memory on a 2 ghz processor. So i know my computer isn't trash. But As of recently, every single time i open Studio I get issues with a pop-up that "Microsoft Visual Studio is busy." let microsoft know....

and it hangs for roughly 10 seconds. so if I make 20 changes to a page, that the changes themselves took me 20 seconds... i just spent (20*10 + 20) 220 seconds, or nearly 4 minutes to make a few quick changes...

Or, let's say that i like saving the pages alot, which I do, so I may copy paste a <br />, and then it locks, then i'll type something and insert a <asp:label tag, and it locks, then i'll delete the ID and insert a new id, and it locks... and maybe it locks again.

|||I can certainly understand the frustration as I was in the same predicament. I was so desperate I added RAM (increased to 1.5GB) and also purchased Registry Booster. I also removed a named instance of SQL2005 that was a remnant of a side-by-side installation with SQL2000. Whatever I did got rid of the problem and I am no longer plagued by the "Microsoft Visual Studio is busy" message.|||

Hi folks:

I have the same exact problem. I see the message Visual studio is busy. For me this started happening after I installed Visual Studio 2005. I have 1 GB memory and i have both SQL 2000 (default instance) and SQL 2005 (named instance) running on the box. I never had this issue when i was running VS.NET 2003.

I started seeing this after I uninstalled VS.NET 2003 and installed VS.NET 2005. Does anyone know if I uninstall SQL 2005 and reinstall it again the problem would be gone?.

Thanks

AK

Microsoft Visual Studio is busy

I get this message in a balloon that pops up frequently when I am trying to work in the SSIS designer. For example, I get it when working in a DataFlow task, trying to open editors for the OleDb Source and Destination. Is anyone else getting this? What could be the cause, it seems to get sluggish. Thanks.

What OLEDB drivers are you using? As a first step I would check that you have the latest version of all the OLEDB drivers, and upgrade if not.

I used to get this message constantly when using the v7 FoxPro driver. Changing to the most recent driver , v9, cured the problem completely.

Hope this helps,

Richard

|||TFYR. I'm just using the OLEDB source/destination that were installed when I upgraded my default instance to SS 2005. (I had been using SQL2005 side-by-side previously with SQL 2000). I've also noticed that when scripting objects it will also get sluggish and hangs for awhile on the step where it determines objects in the database. Right now, I've been waiting over 2 minutes to script a single proc out of the database, so I think there is some kind of systemic problem. Same problem when I try to expand some nodes in Object Explorer (Tables, procs etc), it'll be real sluggish.|||

Seems odd. Are your source and destination SQL Server machines, or something else?

Maybe the upgrade process didn't tie things together properly? As a possibility, would you be able to backup everything and do a clean uninstall/ re-install of SQL 2005?

Sorry I've not posted back earlier.

Rich

|||

Rich,

TFYR. Yes, both source/dest are SQL Server machines. And yes, I can do an uninstall/re-install but probably won't get to it until next week . Do you think it might help if I tried removing the named SQL2005 instance that I have? Not sure how I would remove a named instance, but I will look in the docs.

Thanks.

|||

Rich,

You got me thinking about uninstalling/reinstalling but before trying it I wanted to try removing my SQL2005 named instance and the performance is now much improved. I haven't gotten the "Visual Studio is busy" message yet. I don't get the long delay when scripting objects out either. Maybe it was because I had originally installed SQL2005 as a named instance side by side with SQL2005 default instance and then upgraded the default instance to SQL2005 but never removed the named instance. Anyway, it is much, much improved. Thanks.

|||Yes... i'm facing that kind of problem almost everytime. Especially when the project contains a lot of packages. After the pop-up appears, it will hang and i have to terminate the process using ctrl+alt+del. Until now, i still can't configure what d problem is! I don think it is oledb connection. I would say it is software problem.|||How much RAM do you have? I found that adding RAM helped.|||

I'm running 2 gigs of memory on a 2 ghz processor. So i know my computer isn't trash. But As of recently, every single time i open Studio I get issues with a pop-up that "Microsoft Visual Studio is busy." let microsoft know....

and it hangs for roughly 10 seconds. so if I make 20 changes to a page, that the changes themselves took me 20 seconds... i just spent (20*10 + 20) 220 seconds, or nearly 4 minutes to make a few quick changes...

Or, let's say that i like saving the pages alot, which I do, so I may copy paste a <br />, and then it locks, then i'll type something and insert a <asp:label tag, and it locks, then i'll delete the ID and insert a new id, and it locks... and maybe it locks again.

|||I can certainly understand the frustration as I was in the same predicament. I was so desperate I added RAM (increased to 1.5GB) and also purchased Registry Booster. I also removed a named instance of SQL2005 that was a remnant of a side-by-side installation with SQL2000. Whatever I did got rid of the problem and I am no longer plagued by the "Microsoft Visual Studio is busy" message.|||

Hi folks:

I have the same exact problem. I see the message Visual studio is busy. For me this started happening after I installed Visual Studio 2005. I have 1 GB memory and i have both SQL 2000 (default instance) and SQL 2005 (named instance) running on the box. I never had this issue when i was running VS.NET 2003.

I started seeing this after I uninstalled VS.NET 2003 and installed VS.NET 2005. Does anyone know if I uninstall SQL 2005 and reinstall it again the problem would be gone?.

Thanks

AK

|||

Hi there,

same problem here. Since I use SSIS development in Visual Studio in combination with Vista, Visual Studio keeps being busy after executing larger SSIS packages. Looks like a Vista problem. Before I used XP where te problem didn't occure. It partically occures when the SSIS package is handling large data volumes (more then 100000 records).

A solution would be welcome.

Thanks.

RK

Friday, February 24, 2012

Microsoft SQL-DMO [SQL-DMO]Out of memory error

Hi,
We have a stored procedure that we call very frequently
that polls servers to see if they are available. This is
used from various other stored procedures that may then
use an available SQL Server or try another one.
We have implemented the stored procedure such that it uses
the SP_OA routines to perform a SQL-DMO connect. This
works very well and allows us to catch the 'server
unavailable' error in stored procedure code and branch.
Unfortunataly, if the SQL Server that issues the connect
has not been restarted for a few says we get the following
message back from the connect method (from
sp_OAGetErrorInfo):
0x80045900 Microsoft SQL-DMO [SQL-DMO]Out of
memory.
I have included the code fragment below we are using. Has
anyone any thoughts, please, on where our memory leak is
happening. All our SQL Servers are SP2 currently.
Many thanks, Ken
---
CREATE PROCEDURE xxx @.ServerName VARCHAR(20),
@.LoginTimeout INT = 10
AS
SET NOCOUNT ON
DECLARE @.iRet int
DECLARE @.object int
DECLARE @.hr int
DECLARE @.src varchar(255), @.desc varchar(255)
-- @.iRet - return value of procedures
-- @.object - object reference
-- @.hr - handle
-- @.src - source of error message
-- @.desc - description of error message
-- Set up parameters/variables
SELECT @.iRet = 0, @.hr = 0, @.object = 0
-- create SQLDMO SQLServer object
EXEC @.hr = sp_OACreate 'SQLDMO.SQLServer', @.object OUT
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT,
@.desc OUT
SELECT hr=convert(varbinary(4),@.hr),
Source=@.src, Description=@.desc
RETURN (2)
END
-- Set the properties
-- Set the LoginTimeout property.
EXEC @.hr = sp_OASetProperty @.object, 'LoginTimeout',
@.LoginTimeout
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
OUT
SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
Description=@.desc
EXEC @.hr = sp_OADestroy @.object
RETURN (3)
END
-- Set the integrated login property.
EXEC @.hr = sp_OASetProperty @.object,'LoginSecure',1
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
OUT
SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
Description=@.desc
EXEC @.hr = sp_OADestroy @.object
RETURN (4)
END
-- attempt to connect to server
EXEC @.hr = sp_OAMethod @.object, 'Connect', NULL,
@.ServerName
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
OUT
SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
Description=@.desc
SELECT @.iRet = convert(varbinary(4),@.hr)
EXEC @.hr = sp_OADestroy @.object
RETURN (CASE @.iRet WHEN 0x80020009 THEN 2 ELSE 1
END) -- 2 = 'SQL Server does not exist or access denied',
1 = misc. error
END
-- Disconnect
EXEC @.hr = sp_OAMethod @.object, 'DisConnect'
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
OUT
SELECT hr=convert(varbinary(4),@.hr),
Source=@.src, Description=@.desc
EXEC @.hr = sp_OADestroy @.object
RETURN (5)
END
-- Destroy object
EXEC @.hr = sp_OADestroy @.object
IF @.hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
OUT
SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
Description=@.desc
RETURN (6)
END
-- success
RETURN (0)
GOIt's difficult to trace memory leaks like this. I can't help with the DMO
specific troubleshooting, but... I would encourage to you to review the fix
list for SP3a. I remember reading about some memory leak issues, don't
remember what they were... but you don't want to waste time on a fix in the
latest SP.
Also... do you have an ability to either a) rollout SP3 (which you really
should anyway for security purposes) or b) at least roll it out in a QA
envrionment where you can test this memory leak against Sp3. That might save
you a lot of time...
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Ken Eng" <keneng23@.hotmail.com> wrote in message
news:0d5001c36e33$069fcfb0$a301280a@.phx.gbl...
> Hi,
> We have a stored procedure that we call very frequently
> that polls servers to see if they are available. This is
> used from various other stored procedures that may then
> use an available SQL Server or try another one.
> We have implemented the stored procedure such that it uses
> the SP_OA routines to perform a SQL-DMO connect. This
> works very well and allows us to catch the 'server
> unavailable' error in stored procedure code and branch.
> Unfortunataly, if the SQL Server that issues the connect
> has not been restarted for a few says we get the following
> message back from the connect method (from
> sp_OAGetErrorInfo):
> 0x80045900 Microsoft SQL-DMO [SQL-DMO]Out of
> memory.
> I have included the code fragment below we are using. Has
> anyone any thoughts, please, on where our memory leak is
> happening. All our SQL Servers are SP2 currently.
>
> Many thanks, Ken
> ---
> CREATE PROCEDURE xxx @.ServerName VARCHAR(20),
> @.LoginTimeout INT = 10
> AS
> SET NOCOUNT ON
>
> DECLARE @.iRet int
> DECLARE @.object int
> DECLARE @.hr int
> DECLARE @.src varchar(255), @.desc varchar(255)
> -- @.iRet - return value of procedures
> -- @.object - object reference
> -- @.hr - handle
> -- @.src - source of error message
> -- @.desc - description of error message
> -- Set up parameters/variables
> SELECT @.iRet = 0, @.hr = 0, @.object = 0
> -- create SQLDMO SQLServer object
> EXEC @.hr = sp_OACreate 'SQLDMO.SQLServer', @.object OUT
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT,
> @.desc OUT
> SELECT hr=convert(varbinary(4),@.hr),
> Source=@.src, Description=@.desc
> RETURN (2)
> END
> -- Set the properties
> -- Set the LoginTimeout property.
> EXEC @.hr = sp_OASetProperty @.object, 'LoginTimeout',
> @.LoginTimeout
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
> OUT
> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
> Description=@.desc
> EXEC @.hr = sp_OADestroy @.object
> RETURN (3)
> END
>
> -- Set the integrated login property.
> EXEC @.hr = sp_OASetProperty @.object,'LoginSecure',1
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
> OUT
> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
> Description=@.desc
> EXEC @.hr = sp_OADestroy @.object
> RETURN (4)
> END
> -- attempt to connect to server
> EXEC @.hr = sp_OAMethod @.object, 'Connect', NULL,
> @.ServerName
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
> OUT
> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
> Description=@.desc
> SELECT @.iRet = convert(varbinary(4),@.hr)
> EXEC @.hr = sp_OADestroy @.object
> RETURN (CASE @.iRet WHEN 0x80020009 THEN 2 ELSE 1
> END) -- 2 = 'SQL Server does not exist or access denied',
> 1 = misc. error
> END
> -- Disconnect
> EXEC @.hr = sp_OAMethod @.object, 'DisConnect'
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
> OUT
> SELECT hr=convert(varbinary(4),@.hr),
> Source=@.src, Description=@.desc
> EXEC @.hr = sp_OADestroy @.object
> RETURN (5)
> END
> -- Destroy object
> EXEC @.hr = sp_OADestroy @.object
> IF @.hr <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
> OUT
> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
> Description=@.desc
> RETURN (6)
> END
> -- success
> RETURN (0)
> GO
>
>|||Thanks Brian,
I will move to SP3 to take this out of the equation.
Cheers
Ken
>--Original Message--
>It's difficult to trace memory leaks like this. I can't
help with the DMO
>specific troubleshooting, but... I would encourage to you
to review the fix
>list for SP3a. I remember reading about some memory leak
issues, don't
>remember what they were... but you don't want to waste
time on a fix in the
>latest SP.
>Also... do you have an ability to either a) rollout SP3
(which you really
>should anyway for security purposes) or b) at least roll
it out in a QA
>envrionment where you can test this memory leak against
Sp3. That might save
>you a lot of time...
>--
>Brian Moran
>Principal Mentor
>Solid Quality Learning
>SQL Server MVP
>http://www.solidqualitylearning.com
>
>"Ken Eng" <keneng23@.hotmail.com> wrote in message
>news:0d5001c36e33$069fcfb0$a301280a@.phx.gbl...
>> Hi,
>> We have a stored procedure that we call very frequently
>> that polls servers to see if they are available. This is
>> used from various other stored procedures that may then
>> use an available SQL Server or try another one.
>> We have implemented the stored procedure such that it
uses
>> the SP_OA routines to perform a SQL-DMO connect. This
>> works very well and allows us to catch the 'server
>> unavailable' error in stored procedure code and branch.
>> Unfortunataly, if the SQL Server that issues the connect
>> has not been restarted for a few says we get the
following
>> message back from the connect method (from
>> sp_OAGetErrorInfo):
>> 0x80045900 Microsoft SQL-DMO [SQL-DMO]Out of
>> memory.
>> I have included the code fragment below we are using.
Has
>> anyone any thoughts, please, on where our memory leak is
>> happening. All our SQL Servers are SP2 currently.
>>
>> Many thanks, Ken
>> ---
>> CREATE PROCEDURE xxx @.ServerName VARCHAR(20),
>> @.LoginTimeout INT = 10
>> AS
>> SET NOCOUNT ON
>>
>> DECLARE @.iRet int
>> DECLARE @.object int
>> DECLARE @.hr int
>> DECLARE @.src varchar(255), @.desc varchar(255)
>> -- @.iRet - return value of procedures
>> -- @.object - object reference
>> -- @.hr - handle
>> -- @.src - source of error message
>> -- @.desc - description of error message
>> -- Set up parameters/variables
>> SELECT @.iRet = 0, @.hr = 0, @.object = 0
>> -- create SQLDMO SQLServer object
>> EXEC @.hr = sp_OACreate 'SQLDMO.SQLServer', @.object OUT
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT,
>> @.desc OUT
>> SELECT hr=convert(varbinary(4),@.hr),
>> Source=@.src, Description=@.desc
>> RETURN (2)
>> END
>> -- Set the properties
>> -- Set the LoginTimeout property.
>> EXEC @.hr = sp_OASetProperty @.object, 'LoginTimeout',
>> @.LoginTimeout
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
>> OUT
>> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
>> Description=@.desc
>> EXEC @.hr = sp_OADestroy @.object
>> RETURN (3)
>> END
>>
>> -- Set the integrated login property.
>> EXEC @.hr = sp_OASetProperty @.object,'LoginSecure',1
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
>> OUT
>> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
>> Description=@.desc
>> EXEC @.hr = sp_OADestroy @.object
>> RETURN (4)
>> END
>> -- attempt to connect to server
>> EXEC @.hr = sp_OAMethod @.object, 'Connect', NULL,
>> @.ServerName
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
>> OUT
>> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
>> Description=@.desc
>> SELECT @.iRet = convert(varbinary(4),@.hr)
>> EXEC @.hr = sp_OADestroy @.object
>> RETURN (CASE @.iRet WHEN 0x80020009 THEN 2 ELSE 1
>> END) -- 2 = 'SQL Server does not exist or access
denied',
>> 1 = misc. error
>> END
>> -- Disconnect
>> EXEC @.hr = sp_OAMethod @.object, 'DisConnect'
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
>> OUT
>> SELECT hr=convert(varbinary(4),@.hr),
>> Source=@.src, Description=@.desc
>> EXEC @.hr = sp_OADestroy @.object
>> RETURN (5)
>> END
>> -- Destroy object
>> EXEC @.hr = sp_OADestroy @.object
>> IF @.hr <> 0
>> BEGIN
>> EXEC sp_OAGetErrorInfo @.object, @.src OUT, @.desc
>> OUT
>> SELECT hr=convert(varbinary(4),@.hr), Source=@.src,
>> Description=@.desc
>> RETURN (6)
>> END
>> -- success
>> RETURN (0)
>> GO
>>
>
>.
>