Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Tuesday, March 27, 2012

Cannot execute extended stored procedure?

I've written an extended stored procedure using VS 2005/C++. The sp can be
added and executed on my local SQL Server 2000. However, after I copied to
production server. I can sp_addextendedproc it but executing shows error:
Msg 0, Level 16, State 0, Procedure xp_calc, Line 1
Cannot load the DLL C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\XPDLLs\xp_calc.dll, or one of the DLLs it references.
Reason: 126(The specified module could not be found.)
I remember I need to copy some C++ runtime(?) dll to the server when I was
using VS 2003. Which files are needed for VS2005?
Thanks,nick (nick@.discussions.microsoft.com) writes:
> I've written an extended stored procedure using VS 2005/C++. The sp can be
> added and executed on my local SQL Server 2000. However, after I copied to
> production server. I can sp_addextendedproc it but executing shows error:
> Msg 0, Level 16, State 0, Procedure xp_calc, Line 1
> Cannot load the DLL C:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\XPDLLs\xp_calc.dll, or one of the DLLs it references.
> Reason: 126(The specified module could not be found.)
> I remember I need to copy some C++ runtime(?) dll to the server when I was
> using VS 2003. Which files are needed for VS2005?
That would be MSVCR80.DLL.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||You can find the dependent DLLs using "Dependency Walker"
which can be downloaded from the Microsoft website
or from here
http://www.dependencywalker.com/

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.C omponentModel.Design.IDesignerHost.GetDesigner(ICo mponent component)
at
Microsoft.DataTransformationServices.VsIntegration .DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance .MaintDesignerMenuHandler.Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
Charles
Yes. From Help -> about:
"Microsoft SQL Server Management Studio9.00.3042.00
Microsoft Analysis Services Client Tools2005.090.3042.00
Microsoft Data Access Components (MDAC)2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer6.0.2900.2180
Microsoft .NET Framework2.0.50727.832
Operating System5.1.2600"
"Tibor Karaszi" wrote:

> Did you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>
>
sql

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesi
gnerHost.GetDesigner(IComponent component)
at
Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDe
signer(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.
Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem
.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Descriptio
n: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
CharlesDid you install sp2 for the clients components (SSMS) on the machine where y
ou try to edit the plan?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>I have some maintenance plans written for SQL Server 2005 SP1. After we
> upgraded to SP2 I can no longer edit them. If I select the Maintneance Pla
ns
> node in Object Explorer and double click on any plan I get "Microsoft SQL
> Server Management Studio is unable to load this document: One or more erro
r
> occured."
> The popup message box says "Value cannot be null. Parameter name: componen
t
> (System.Design)"
> Details are:"
> Program Location:
> at
> System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDe
signerHost.GetDesigner(IComponent
> component)
> at
> Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.Open
Designer(String
> connectionString, Object connection, String objectUrn)
> at
> Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandle
r.Invoke()"
> I saw one post that sugget there is a fix that ought to be in cumulative
> update package 4, but I can't see any items in that which match this probl
em.
> The maintenance plans appear to run when called by the SQl Agent Jobs they
> were initially set up with. However, I am calling one of them from another
> Job and this has started throwing this error since SP2:
> "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Descript
ion: The
> Execute method on the task returned error code 0x80131904 (Conversion fail
ed
> when converting from a character string to uniqueidentifier.). The Execute
> method must succeed<c/> and indicate the result using an "out" parameter.
> End Error"
> but when I went to look at the plan, I couldn't edit it!
> Any advice on how to edit the maintenance plans or fix the second error
> would be great.
> Thanks,
> Charles
>|||Yes. From Help -> about :
"Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600"
"Tibor Karaszi" wrote:

> Did you install sp2 for the clients components (SSMS) on the machine where
you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>
>

Cannot edit maintenance plans post SP2

I have some maintenance plans written for SQL Server 2005 SP1. After we
upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
node in Object Explorer and double click on any plan I get "Microsoft SQL
Server Management Studio is unable to load this document: One or more error
occured."
The popup message box says "Value cannot be null. Parameter name: component
(System.Design)"
Details are:"
Program Location:
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent component)
at
Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
at
Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
I saw one post that sugget there is a fix that ought to be in cumulative
update package 4, but I can't see any items in that which match this problem.
The maintenance plans appear to run when called by the SQl Agent Jobs they
were initially set up with. However, I am calling one of them from another
Job and this has started throwing this error since SP2:
"Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
Execute method on the task returned error code 0x80131904 (Conversion failed
when converting from a character string to uniqueidentifier.). The Execute
method must succeed<c/> and indicate the result using an "out" parameter.
End Error"
but when I went to look at the plan, I couldn't edit it!
Any advice on how to edit the maintenance plans or fix the second error
would be great.
Thanks,
CharlesDid you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
>I have some maintenance plans written for SQL Server 2005 SP1. After we
> upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
> node in Object Explorer and double click on any plan I get "Microsoft SQL
> Server Management Studio is unable to load this document: One or more error
> occured."
> The popup message box says "Value cannot be null. Parameter name: component
> (System.Design)"
> Details are:"
> Program Location:
> at
> System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent
> component)
> at
> Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String
> connectionString, Object connection, String objectUrn)
> at
> Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
> I saw one post that sugget there is a fix that ought to be in cumulative
> update package 4, but I can't see any items in that which match this problem.
> The maintenance plans appear to run when called by the SQl Agent Jobs they
> were initially set up with. However, I am calling one of them from another
> Job and this has started throwing this error since SP2:
> "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
> Execute method on the task returned error code 0x80131904 (Conversion failed
> when converting from a character string to uniqueidentifier.). The Execute
> method must succeed<c/> and indicate the result using an "out" parameter.
> End Error"
> but when I went to look at the plan, I couldn't edit it!
> Any advice on how to edit the maintenance plans or fix the second error
> would be great.
> Thanks,
> Charles
>|||Yes. From Help -> About:
"Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600"
"Tibor Karaszi" wrote:
> Did you install sp2 for the clients components (SSMS) on the machine where you try to edit the plan?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "CharlesB1" <CharlesB1@.discussions.microsoft.com> wrote in message
> news:CC70B322-EBCB-4D2E-B1DA-98AAEDDBF86A@.microsoft.com...
> >I have some maintenance plans written for SQL Server 2005 SP1. After we
> > upgraded to SP2 I can no longer edit them. If I select the Maintneance Plans
> > node in Object Explorer and double click on any plan I get "Microsoft SQL
> > Server Management Studio is unable to load this document: One or more error
> > occured."
> >
> > The popup message box says "Value cannot be null. Parameter name: component
> > (System.Design)"
> > Details are:"
> > Program Location:
> >
> > at
> > System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent
> > component)
> > at
> > Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String
> > connectionString, Object connection, String objectUrn)
> > at
> > Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()"
> >
> > I saw one post that sugget there is a fix that ought to be in cumulative
> > update package 4, but I can't see any items in that which match this problem.
> >
> > The maintenance plans appear to run when called by the SQl Agent Jobs they
> > were initially set up with. However, I am calling one of them from another
> > Job and this has started throwing this error since SP2:
> > "Error: 2007-11-04 18:00:01.81 Code: 0xC0024104 Source: Reporting
> > Task for subplan-{03E683E8-5A40-4697-BF2F-E93EBA6E96E7} Description: The
> > Execute method on the task returned error code 0x80131904 (Conversion failed
> > when converting from a character string to uniqueidentifier.). The Execute
> > method must succeed<c/> and indicate the result using an "out" parameter.
> > End Error"
> >
> > but when I went to look at the plan, I couldn't edit it!
> >
> > Any advice on how to edit the maintenance plans or fix the second error
> > would be great.
> >
> > Thanks,
> >
> > Charles
> >
>
>

Tuesday, March 20, 2012

cannot debug class liberary sproc

im trying to debug a sproc that was written as a class liberary, in c#. i go to the debug menu in visual studio, and click "attach to process". i attach to the sqlsevr process. but now, any breakpoints i create give the message :

"he breakpoint will not currently be hit. no symbols have been loaded for this document"

and no matter how i execute the sproc in sql server, my breakpoints are never hit. what is wrong here?

Have you uploaded the debug symbols file to SQL Server?

ALTER ASSEMBLY your_asm_name
add file from 'some location'

You better check the syntax for ALTER ASSEMBLY as I wrote it from memory and I don't have BOL handy at the moment.

Niels|||Hmm, I was almost certain I had replied to this a couple of minutes ago (I apologize if this post appears twice).

Have you uploaded the debug symbols file from your assembly to the database?

The syntax is as follows:

ALTER ASSEMBLY your_asm_name
ADD FILE FROM 'path_to_debug_symbols'

You better check the syntax above, as I wrote it from memory and I don't have BOL handy.

Nielssql

Friday, February 24, 2012

cannot connect to SQL Server from VB.NET

I have an application written in VB.NET that connects directly to a
SQL Server 2000 database over the internet. It works fine on the
development machine (XP Pro), as well as two outside machines running
XP Pro. It does NOT work on two other outside machines, both running
Win2000. All 4 outside machines have the latest .NET framework
installed. I assume that XP has something by default that the 2000
machines do not, but I have no idea what that something could be that
would affect my software. I tried installing MDAC 2.8 as well as the
"sqlredist.exe" on both 2000 machines, but no dice. Is there anything
else I need to install, which XP just happens to already include? The
code doesn't appear to be the issue, since it works on the two XP
machines. And permissions and/or firewalls don't appear to be an
issue for the same reason. Here is the code in question, if that
helps:

Public conTemp As SqlClient.SqlConnection

conTemp = New SqlClient.SqlConnection("Data
Source=xxx.xxx.xxx.xxx\servername;Network Library=DBMSSOCN;Initial
Catalog=somename;User ID=username;Password=password;")

conTemp.Open() 'this is the line where the error occurs

The actual error is "Object reference not set to an instance of an
object", as though the second line above was absent (I get the same
error if I comment out the second line of code and run it on the
development machine). I thought that maybe certain SQL Server drivers
were needed in order for the SQLConnection to operate correctly, but I
assume the MDAC and "sqlredist.exe" would have taken care of that if
it was the problem. I'm out of ideas and appreciate any you guys
might have.

AndrewHi

I can't think of an obvious reason for this. The XP firewall could
have caused problems, but it seems to be the reverse of that,
therefore is there any third party application that is being run
instead on the 2000 machines or do these machines have something else
using the port you are using?

You don't say if the XP and 2000 machines are at the same location, on
the same network/segment?

Are the network configurations the same?

Can you talk to other SQL servers?

HTH

John

magicsoft714@.yahoo.com (Andrew) wrote in message news:<888f9cb6.0311261307.2c59bde7@.posting.google.com>...
> I have an application written in VB.NET that connects directly to a
> SQL Server 2000 database over the internet. It works fine on the
> development machine (XP Pro), as well as two outside machines running
> XP Pro. It does NOT work on two other outside machines, both running
> Win2000. All 4 outside machines have the latest .NET framework
> installed. I assume that XP has something by default that the 2000
> machines do not, but I have no idea what that something could be that
> would affect my software. I tried installing MDAC 2.8 as well as the
> "sqlredist.exe" on both 2000 machines, but no dice. Is there anything
> else I need to install, which XP just happens to already include? The
> code doesn't appear to be the issue, since it works on the two XP
> machines. And permissions and/or firewalls don't appear to be an
> issue for the same reason. Here is the code in question, if that
> helps:
> Public conTemp As SqlClient.SqlConnection
> conTemp = New SqlClient.SqlConnection("Data
> Source=xxx.xxx.xxx.xxx\servername;Network Library=DBMSSOCN;Initial
> Catalog=somename;User ID=username;Password=password;")
> conTemp.Open() 'this is the line where the error occurs
> The actual error is "Object reference not set to an instance of an
> object", as though the second line above was absent (I get the same
> error if I comment out the second line of code and run it on the
> development machine). I thought that maybe certain SQL Server drivers
> were needed in order for the SQLConnection to operate correctly, but I
> assume the MDAC and "sqlredist.exe" would have taken care of that if
> it was the problem. I'm out of ideas and appreciate any you guys
> might have.
> Andrew|||I don't have any other SQL Servers which I can test against, and
installing SQL Enterprise Manager on the 2000 machines to see if that
works and/or fixes the issue isn't really an option I'd like to take.
The XP and 2000 machines are all in the same house, on the same
network. There isn't anything installed on the 2000 machines which
would interfere with my app. As far as I can tell, everything is
equal, other than the OS.

Andrew

> Hi
> I can't think of an obvious reason for this. The XP firewall could
> have caused problems, but it seems to be the reverse of that,
> therefore is there any third party application that is being run
> instead on the 2000 machines or do these machines have something else
> using the port you are using?
> You don't say if the XP and 2000 machines are at the same location, on
> the same network/segment?
> Are the network configurations the same?
> Can you talk to other SQL servers?
> HTH
> John|||I don't have any other SQL Servers which I can test against, and
installing SQL Enterprise Manager on the 2000 machines to see if that
works and/or fixes the issue isn't really an option I'd like to take.
The XP and 2000 machines are all in the same house, on the same
network. There isn't anything installed on the 2000 machines which
would interfere with my app. As far as I can tell, everything is
equal, other than the OS.

Andrew

> Hi
> I can't think of an obvious reason for this. The XP firewall could
> have caused problems, but it seems to be the reverse of that,
> therefore is there any third party application that is being run
> instead on the 2000 machines or do these machines have something else
> using the port you are using?
> You don't say if the XP and 2000 machines are at the same location, on
> the same network/segment?
> Are the network configurations the same?
> Can you talk to other SQL servers?
> HTH
> John|||Hi

The easiest way to check the network would probably be to telnet into the
given port on the server. This will show that the routing is ok. If that
works it is probably something to do with the machine/software
configuration.

John

"Andrew" <magicsoft714@.yahoo.com> wrote in message
news:888f9cb6.0311271609.5a68472b@.posting.google.c om...
> I don't have any other SQL Servers which I can test against, and
> installing SQL Enterprise Manager on the 2000 machines to see if that
> works and/or fixes the issue isn't really an option I'd like to take.
> The XP and 2000 machines are all in the same house, on the same
> network. There isn't anything installed on the 2000 machines which
> would interfere with my app. As far as I can tell, everything is
> equal, other than the OS.
> Andrew
> > Hi
> > I can't think of an obvious reason for this. The XP firewall could
> > have caused problems, but it seems to be the reverse of that,
> > therefore is there any third party application that is being run
> > instead on the 2000 machines or do these machines have something else
> > using the port you are using?
> > You don't say if the XP and 2000 machines are at the same location, on
> > the same network/segment?
> > Are the network configurations the same?
> > Can you talk to other SQL servers?
> > HTH
> > John