Capture Messages From Extended Procedure

Nov 18, 2005

Hi all,

I am using an extended stored procedure that sends email using SMTP. The procedure can be downloaded here (http://www.sqldev.net/xp/xpsmtp.htm). If I execute the procedure in QA and it fails for some reason, the error message is printed in the Messages tab. Is there any way to capture this message/messages when I use the XP in my stored procedures?

Your help is much appreciated.

View 3 Replies


ADVERTISEMENT

SQL Server 2008 :: Extended Events Capture A Specific Proc Parameter

Feb 19, 2015

I know very little about Extended Events, but I know it is supposed to be more powerful than Profiler. The SQL Instance involved is 2008R2. I was asked whether we could capture when a stored proc was called with a certain parameter. So for example, if dbo.usp_mystoredproc is called and is passed a value of '12345a' for @customer, can that be captured? I would want to know the time it was called, the parameter and parameter value. Probably would be interested in the SPID or LoginName as well.

View 4 Replies View Related

Capture Messages Window Into Log File Using Powershell Program

Jun 25, 2014

As we know there are two output windows in sql server management studio like 'Results' and 'Messages', I want to capture that 'Messages' window into a log file using powershell program . like into a log file it should display like :

ex:-
(1 row(s) affected)
(1 row(s) affected)

View 5 Replies View Related

SQL 2012 :: Trace Flag To Capture Error Messages Like PK Violation

Apr 24, 2015

Is there a dbcc flag that will capture all error messages in the log

e.g. when inserting data into a table, a PK violation occurs throwing, Msg 2627

..similar to trace flag 1222 to capture deadlock info..

View 3 Replies View Related

Extended Stored Procedure

Apr 12, 2005

Could someone who has done it before be kind enough to post a short example of how to make a call from an extended stored procedure to a .NET DLL?  Or even direct me to an example, or tell me that this is possible / not possible, it would help.
Thanks,Brian
 

View 4 Replies View Related

Extended Stored Procedure -- VB

Jun 25, 2002

I am looking for examples written in VB. Thanks ALOT!!

View 1 Replies View Related

Extended Stored Procedure

Oct 15, 2001

is it possible to view the source of an extended stored procedure.
I know that it is a dll program
but i want to know how works one of my extented stored proc

View 1 Replies View Related

How To Extended Stopred Procedure??

Sep 11, 2007



Hello All,
i having one DLL which return Keywords.
i want to use that DLL in SQL Server Stored Proc.
as i know it is possible through Extended Stored Proc.
how to create that ? how i can pass Text Stream as input to that DLL in Extended Stored Procedure.

View 3 Replies View Related

How To Use C# DLL In Extended Stored Procedure?

Sep 11, 2007

Hello,
i have created one C# DLL

xp_hello.dll
Its having below code in Class1.cs


namespace xp_hello

{

public class Class1

{

public string xp_hello()

{

string strReturn = string.Empty;

strReturn = "Chirag Patel";

return strReturn;

}

}

}

i compiled that DLL and kept it in C drive.
now i am trying to create Extended stored procedure using

sp_addextendedproc 'xp_hello', 'c:xp_hello.dll'
its showing successful creation.
Now i am trying to Execute it with


DECLARE @txt varchar(33)

EXEC xp_hello @txt OUTPUT

now its showing below message.

Msg 17751, Level 16, State 0, Procedure xp_hello, Line 1

Could not find the function xp_hello in the library xp_hello.dll. Reason: 127(The specified procedure could not be found.).


can anyone please help me out in this?
Thanks

View 4 Replies View Related

What Is Extended Store Procedure?

Mar 26, 2008

View 6 Replies View Related

Extended Stored Procedure 'xp_cmdshell'

Jan 31, 2005

Hello,

I have a question regarding the extended SPC 'xp_cmdshell'.

Basically I want to determine the username and userdomain in a stored procedure and what I know is that you can get this information in a "DOS-Box" with 'Set username' or 'Set userdomain'.

But if I use the above mentioned extended stored procedure in the following way:exec master..xp_cmdshell 'set username'I don´t get any resultset.

Does anyone know why I get different results depending on the fact if I call the 'set'-command in a "DOS-Box" or with the appropriate stored procedure?

Thank you for any help

View 4 Replies View Related

Extended Stored Procedure Xp_fixeddrives

Mar 25, 2002

We are on Windows 2000, SQL Server 2000, and a SAN. Our data and backups are located on the Storage Area Network.

I am attempting to restore a database with a backup on the SAN through Enterprise Manager. I selected 'From Device', 'Selected Devices'. SQL appears to hang. After looking at Current Activity, I have identified that it is running 'EXECUTE master.dbo.xp_fixeddrives 2'.

Are there any known problems with SQL Server 2000 and SAN? Has anyone encountered this error?

Thanks
Kim

View 3 Replies View Related

Error In Extended Stored Procedure

Nov 19, 2001

Hi Everybody,

I have created an Extended Stored Procedure without any error in 'master' database, i.e. sp_addextendedproc @functname = xp_dump, @dllname = 'xp_dump.dll'. In xp_dump.dll, I have written a function with xp_dump name. I have developed this DLL in VB with the following sample code:

Function xp_dump() As Boolean
Dim con As New ADODB.Connection
Dim auid As String
auid = "999-99-9999"
con.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=*********;Initial Catalog=pubs;Data Source=WASSERVER"
con.BeginTrans
con.Execute ("INSERT INTO table999(au_id,au_lname,au_fname,phone,address,cit y,state,zip,contract) SELECT '" & auid & "',au_lname,au_fname,phone,address,city,state,zip, contract FROM table999 WHERE au_id='213-46-8915'")
con.CommitTrans
con.Close

End Function

But when I am trying to EXECUTE the same in Query Analyzer the following error is found:

ODBC: Msg 0, Level 16, State 1
Cannot find the function xp_dump in the library xp_dump.dll. Reason: 127(The specified procedure could not be found.).

Kindly help me to resolve my problem.

Thanking you.

Michael.

View 2 Replies View Related

Missing Extended Stored Procedure

Sep 21, 2001

I have installed Standard Sql 2000 .
However i don't find the ex stored Procedures xp_sqlinventory and sp_sqlregister ..
Can anyone Point out here i can get them?

Thanks

View 1 Replies View Related

Probelm With Extended Stored Procedure

Feb 17, 2004

Hi

Can i be able to use the DLL which is created in VB for Extended Stored Procedures.
if so how?

View 1 Replies View Related

Extended Stored Procedure Problem

Mar 15, 2004

Hi,
I made some extended strored procedures
and they goes well when they are placed at
c:windowssystem32 or the same derectory to
sqlservr.exe which is usualy in C:Program Files
Microsoft SQL ServerMSSQLBinn.

I thought it's OK wherever they are placed
as long as I put them to the system path.

But actually they didn't work at all
when they were placed to the other path
that I had newly added as a system path.

Here is the contents of 'path' valiable:

%SystemRoot%system32;%SystemRoot%;%SystemRoot%Sy stem32Wbem;C:WINDOWSSystem32AmiClick;C:Progra m FilesMicrosoft SQL Server80ToolsBINN:C:Program Files/INC

I just added only "C:Program Files/INC",
placed the extended stored procedures there,
then called them through a trigger.

Can Somebody tell me what was wrong?
Please help me if you have any informations about this issue.

regards,
Takanobu Maekawa

View 11 Replies View Related

Cannot Load The DLL Replincrementlsn Extended Procedure?

Apr 28, 2004

Hi All,

trying to setup a new push subscription and got the following error!

'Error 14053: Cannot load the DLL replincrementlsn extended procedure, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
The subscription could not be updated at this time.
The subscription could not be created.'

Anyone have any ideas - I think it has some .dll missing or a sp missing but I couldn't find any such file on the CD.

Any help much appreciated...

Regards

Davej

View 5 Replies View Related

Extended Stored Procedure API Not In New Platform SDK

May 3, 2004

Does anyone know why the Extended Stored Procedure API (formerly Open Data Services) headers and libraries (e.g. srv.h, srvdbtyp.h, opends60.lib) are not in the new Platform SDK?
Older versions of the Platform SDK had these tools included, but I installed the new Platform SDK and they're not included. Is there another SDK that I need to download and install now?

View 2 Replies View Related

Output From Extended Stored Procedure

Jul 20, 2005

Hi allIve got a problem I was hoping someone may be able to help with.Im calling an extended stored procedure provided by a third party(master..xp_OrderHeader).This xp requires 3 inputs and is supposed to provie one output.When I call it in SQL Query Analyser all runs OK and I get a column result(single result) titled "Output_Info" with a value of say 300051Here is an example callexecute master..xp_OrderHeader @CustID, @TodayDate, @OrderID,@Output_Info OUTPUTI would have thought that my variable @Output_Info would hold the output,but all I get is NULL?Any ideas what Im doing wrong. Seems bizarre that the XP Ive been providedis displaying a result (be it a coumn I haven't named) ... but I can get itinto my variable for use.CheersCraig

View 1 Replies View Related

Extended Stored Procedure And C Code

Jul 12, 2007

Hi,

I am using vs2005, vc++, sql2005 and trying to write a complex extended stored procedure.



It seems I must use switch clrafe for my executable to deploy to sql.



But with clrafe, I can no longer use such c code tools such as typedef structures and pointer manipulation!





But I need to do these things to translate a contiuous block of binary data into a series of field/value pairs to be written to the sql server!!! Doing so externally would mean a severe drop in throughput: going back to the server for each field instead of all as one block!



Is there a technique, or pragma command to allow "unmanaged" c code to reside in a sql extended stored procedure?

View 15 Replies View Related

Can Anybody Explain Me What Is An Extended Stored Procedure And When Can It Be Useful ?

Feb 28, 2008



Hello Friends.....
I want to ask that What is mean by Extended Sored Porcedure and when can it be useful ?

Where can be it useful in our day to day SQL Seveloper's activites ?

waiting for reply....

View 4 Replies View Related

Extended Stored Procedure Error

Jun 1, 2007

Hi I have written a small C++ Extended Stored Procedure

#include "CPPDLL.h"

#include <windows.h>

#include <Srv.h>

#include <stdio.h>

#define XP_NOERROR 0

#define SRV_MAXERROR 20000

#define CMDSHELL_ERROR SRV_MAXERROR + 2



BOOL APIENTRY DllMain( HMODULE hModule,

DWORD ul_reason_for_call,

LPVOID lpReserved

)

{

return TRUE;

}



int xp_Easy(SRV_PROC * srvproc)

{

srv_sendmsg(srvproc, SRV_MSG_INFO , CMDSHELL_ERROR, SRV_INFO, (DBTINYINT)0,

NULL, 0, 0, "This is how easy XP's can be!", SRV_NULLTERM);

srv_senddone(srvproc, SRV_DONE_MORE, 0, 0);

return(XP_NOERROR);

}

When I register the DLL in SQL server 2005 and execute it. I get the following error message



Msg 17750, Level 16, State 0, Procedure xp_Easy, Line 1

Could not load the DLL C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnCPPDLL.dll, or one of the DLLs it references. Reason: 14001(This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.).



Does anyone know why this is happening.

Thanks

Reeves

View 1 Replies View Related

Migration Of Extended Stored Procedure

Nov 24, 2006

Hi ,

Any Body can help in knowing, How i can migrate the Extended Stored Procedure from one server to another.

View 1 Replies View Related

Capture Stored Procedure Along With Parameters

Jan 28, 2008

Is there a way to capture Stored Procedure Name along with the Parameter passed in SQL 2005 or SQL2000 when a stored procedure is executed?


Thanks !

View 6 Replies View Related

How Do I Capture @@ROWCOUNT From A Stored Procedure?

Dec 5, 2006

Greetings,

I have a stored procedure that does updates. The sproc is called from an €œExec SQL Task€?. The sproc returns the number of rows that were updated using this technique:

RETURN @@ROWCOUNT

How do I capture the sproc€™s return value (number of rows) in a package-level variable? I eventually want to log this value. The sproc is not returning a result set. I€™m new to SSIS so any general guidance would be appreciated.

Thanks,
BCB

View 6 Replies View Related

How To Get Extended Error Information From Stored Procedure

Oct 3, 2007

Hi
I have a stored procedure in SQL server 2005. It works fine when I execute it from the Management Studio.But when executing it from ASP.NET code like this:
..... Of course more code is executed before this call .....int retVal = this.odbcCreateDataBaseCommand.ExecuteNonQuery();
retVal is -1. But -1 doesn't really tell me what the problem is?
Is there anyway to get extended error information so I can figure out whats going wrong?
(The stored procedure was working fine in SQL server 2000 before I upgraded to SQL server 2005. I use .NET Framework 1.1 and ODBC Sql Native Client to access the 2005 server.)
 Regards
Tomas

View 1 Replies View Related

SQL 2012 :: Extended Stored Procedure Permissions

Jan 15, 2015

I am logging into a SQL instance to run the following query:

DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N'sharemasterFULL' IF @ReturnCode <> 0 RAISERROR('Error creating directory.', 16, 1)

The share in which the folder is to be created has my account added with full permissions to create files. However this command fails unless I add the SQL Service account user with rights to the folder also.

Is this expected behaviour, is this something specific to extended stored procedures?

View 0 Replies View Related

Extended Stored Procedure Performance Tuning

Jul 23, 2005

We have an application that is based on several extended storedprocedures. When we run our application in house, or when most othercustomers run it, they see performance of about X transactions persecond. One customer is seeing performance of about X/5, and I'mhaving a hard time troubleshooting it. The performace bottleneck hasbeen narrowed to the execution of the extended stored procedures. Doesanyone know of tuneable SQL Server parameters that may specificallyaffect the performance of extended stored procedures. I know theprocedures get run by a scheduler. Is there some way the priority orfrequency of the scheduler can be modified? Thanks for any advice.

View 3 Replies View Related

Scalability Questions For Extended Stored Procedure

Jan 25, 2006

Hi,First I would like to apologize for cross posting in three groups asI did not know which one would be the appropriate group. If some onepoints me to the correct one I will use that in the future.I am trying to findout the scalabilty of an user written extendedstore procedure. I have created a dll using a C program(modified/plagarized from some of the examples) . The main function ofthis extended SP is to act as a passthru to connect to an third partyODBC driver. All this is supposed to do is take the passthru sqlstatement, userid, passsword and connect to a remote server (IBM 3090Mainframe in our case) using a system ODBC connection and pass thereturned result set back to the stored procedure calling this extendedSP. I am trying to find out the answers for the following questions.1. What are the limitations of this approach.2. What would happen say if 2,000 concurrent calls per minute are madeto the extended SP from the web app.3. What would happen if this continued for say 4 hours. Will the memoryusage increase to point that will cripple the server assuming there isno memory leak in the dll.4. Are there any connection pooling concerns that I should payattention to specifically from an Extended SP point of view.5. Apart from compiling the dll using the "MultiThread" option should Ibe using other options to make sure the dll is threadsafe.SQL server Environment :OS - Windows 2000 Advanced Server SP4SQL - SQLServer 2000 Enterprise edition SP3Hardware - 8 way 2 node cluster with 6Gb RAMAny help regarding this is greately appreciated.Prahalad

View 3 Replies View Related

Creating DLL File For Extended Stored Procedure In C#

Aug 10, 2007

Hi All,

Is there any way that I can create a dll file for Extended stored procedure(SQL server) in C# ?

I an able to create that in VC++. in VC++ there is DLLMain which serve as entry point and a paramter can be passed to it using Extended stored procedure. But since C# does not have any such entry point. Hence is there any way that I can achieve this?

Any pointers to this will be highly appreciated.

Thanks
Sid

View 9 Replies View Related

Extended Stored Procedure Using C# For SQL Server 2000

Mar 12, 2007



Can anyone of you help me in finding online - resources to write extended stored procedure for Sql Server 2000 using C#.

Thank you,



Andy Rogers

View 1 Replies View Related

Where To Look For Extended Stored Procedure DLL Wizard In VS 2005

Dec 12, 2005

Hi

View 3 Replies View Related

Is It Possible To Capture An OUT Type Parameter From A PL/SQL Stored Procedure?

Dec 19, 2007

When a stored PL/SQL procedure in my Oracle database is called from ASP.NET, is it possible to retrieve the OUT parameter from the PL/SQL procedure?  For example, if I have a simple procedure as below to insert a row into the database.  Ideally I would like it to return back the parameter named NewId to my ASP.NET server.  I'd like to capture this in the VB.NET code. 1 create or replace procedure WriteName(FirstName in varchar2, LastName in varchar2, NewId out pls_integer) is2 3 NameId pls_integer;4 5 begin6 7 select name_seq.nextval into NameId from dual;8 9 insert into all_names(id, first_name, last_name)10 values(NameId, FirstName, LastName);11 12 NewId := NameId;13 14 end WriteName;  1 <asp:SqlDataSource 2 ID="SqlDataSaveName" 3 runat="server" 4 ConnectionString="<%$ ConnectionStrings:ConnectionString %>"5 ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 6 SelectCommand="WRITENAME"7 SelectCommandType="StoredProcedure">8 <SelectParameters>9 <asp:ControlParameter ControlID="TextBoxFirstName" Name="FIRSTNAME" PropertyName="Text" Type="String" />10 <asp:ControlParameter ControlID="TextBoxLastName" Name="LASTNAME" PropertyName="text" Type="String" />11 </SelectParameters>12 </asp:SqlDataSource>This is then called in the VB.NET code as below. It is in this section that I would like to capture the PL/SQL OUT parameter NewId returned from Oracle. 1 SqlDataSaveName.Select(DataSourceSelectArguments.Empty) If anybody can help me with the code I need to add to the VB.NET section to capture and then use the returned OUT parameter then I'd be very grateful.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved