SQL Server 2008 extended stored procedures

155 pts.
Tags:
SQL Server
SQL Server 2005
SQL Server 2008
SQL Server 2008 extended stored procedures
I have created several extended stored procedures in SQL 2008 which when i run always return a NULL. I call these XP's from within a stored procedure. They work fine in SQL 2005 and SQL 2000. One thing i have noticed is when i click on the properties of the xp the path to the DLL is not there is that normal in 2008 (cos it shows the path in sql 2005). When i run the XP in Query mode without calling from another stored procedure i get error: Could not load the DLL "C:program files....." syntax i have used to create: exec sp_addextendedproc N'xp_Commission', N'C:Program FilesMicrosoft SQL ServerMSSQL10.SQL2008TEST1MSSQLBinnxp_commission.dll' make call like so on the master DB: Exec Master..xp_Commission Thanks in Advance

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Denny Cherry
    What's the rest of the error message when you run the extended stored procedure by it self? Any reason you aren't writing these as SQLCLR procedures?
    66,130 pointsBadges:
    report
  • KH
    Hi Thanks for you reply I call the procedure like so: Declare @sText as varchar(100) Set @sText = '"123456789" Exec master..xp_commission @text Error i get is: Msg 17750, Level 16, State 0, Procedure xp_commission, Line 1 Could not load the DLL C:Program FilesMicrosoft SQL ServerMSSQL10.SQL2008AMSSQLBinnxp_commission.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.). CLR - Im not a developer and also i cant seem to find the original source code in C++ Thanks again for you help
    155 pointsBadges:
    report
  • KH
    Sorry i made a typo in the previous post Exec master..xp_commission @text Should be Exec master..xp_commission @sText
    155 pointsBadges:
    report
  • KH
    Hi Thanks Mr Denny for your responses ,I have now sorted out the problem . The SQL 2008 machine was a new build. So i ran my DLLs through dependency walker and it highlighted a dll that my commission.dll was referencing (MSVCR71.DLL) , i copied the missing Dll to the SQL2008 Machine and it now works. YES!!! Thanks anyway...
    155 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following