How To Debug Local Webservice's Stored Procedure From Asp.net

Aug 17, 2007

hi

    i have developed asp.net application which calls  web service of localsystem. it also contains logic for interaction with database. we are also creating connection string through coding not from web.config.  i want to debug stored procedure which is called by webmethod. then pls suggess me how can i debug this stored procedure from asp.net which is called  in local webservice???

  if any one have solve pls help...

atul

View 1 Replies


ADVERTISEMENT

Access Webservice From A Stored Procedure.

Apr 1, 2008

Hi everybody,
How can I access a webservice from inside a stored procedure? any help is greatly appriciated.

View 3 Replies View Related

Calling Webservice From A T-SQl Stored Procedure

Oct 6, 2006

Hi,



I need to call a web service (consume a webservice)from a T-SQL stored procedure. Is there a way to do this. If not is there a way to make a simple http request, something like a utl_http in oracle.



At the moment iam using a MSSOAP30.SOAPCLIENT object created using sp_OACreate to make this call. However this means that the soap toolkit be installed on the pc on which SQL server is installed. I was hoping to find a completely independent way.



Also when i call sp_OACreate where does sqlserver 2005 look to find that object. Iam thinking of putting the MSSOAP30.dll on that machine, if all else fails.





Ahmad

View 1 Replies View Related

CLR Stored Procedure Consume Webservice

Nov 8, 2006

Can you have a CRL stored procedure call a webservice that returns a dataset?

View 7 Replies View Related

Soap Message Exchange Between .NET Webservice And Stored Procedure

Aug 16, 2007

Hello,

is message exchange between a .NET Webservice and a SQL stored procedure possible?
And if, could you please explain me how? Or give me a tip where i can get more informations
and maybe samples?
thanks for your help

regards
pamelia

View 30 Replies View Related

CLR Stored Procedure Calling MS CRM Webservice Failing With Socket Error

Jun 18, 2007



Hi!



I am developing an integration solution for MS CRM.



The basic idea is to have a CLR stored procedure that draws data from a SQL database, transforms the data, and then adds it to MS CRM via the webservice.



When executing the stored proc, it randomly fails (although at approximately the same time, everytime).



This is the error message:



Msg 6522, Level 16, State 1, Procedure add_CCU_information, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'add_CCU_information':
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
System.Net.Sockets.SocketException:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
System.Net.WebException:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at CRM_Integration.CRM_Service.CrmService.Execute(Request Request)
at StoredProcedures.add_CCU_information()



If someone could please give some advice, I would really appreciate it.



Regards,



Du Toit

View 2 Replies View Related

Debug A Stored Procedure

Oct 4, 2006

hello,I want to know if it is possible to debug a stored procedure using visual studio 2003 and SQL server 2000.if yes can u help me how to do this?Thanks.

View 5 Replies View Related

How Can I Debug An Stored Procedure?

May 16, 2008

Hi,I am using SQL Server Express bundled with Visual Studio 2008 on top of a ASP.NET/C# web application.I have written a stored procedure that appears to behave differently when stepping into the procedure than it does when called from my application, even though the parameter values are apparently identical. I need to debug the parameter values from within the stored procedure itself to see what the difference is. But how can I debug the stored procedure when it is called from the application?I followed the instructions at this page, but VS2008 does not stop within the procedure as expected. It seems I foolishly downloaded VS2008 Professional Edition, so these instructions apparently do not apply to that version (!!).So I thought I would try debugging the parameter values by writing them to a file. I used the procedure on this page to write to an arbitrary file, but every time I try to call it I get the following error: Error: SQL Server blocked access to procedure 'sys.sp_OACreate' of
component 'Ole Automation Procedures' because this component is turned
off as part of the security configuration for this server. A
system administrator can enable the use of 'Ole Automation Procedures'
by using sp_configure. For more information about enabling 'Ole
Automation Procedures', see "Surface Area Configuration" in SQL Server
Books Online. I opened the SQL Server Surface Area Configuration and enabled the "OLE Automation". I restarted the SQL Server service and VS2008, but I still got the same error, even though "OLE Automation" remains enabled for SQL Server 2005. So I tried issuing the following commands: sp_configure 'show advanced options', 1; GO RECONFIGURE;GOsp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE;GO But if I issue those commands from within a stored procedure, or even an SQL Query window, I get the following error:SQL Execution Error:Executed SQL Statement: sp_configure 'show advanced options', 1; GO RECONFIGURE;GOsp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE;GOError Source: .Net SqlClient Data ProviderError Message: Incorrect syntax near 'GO'.Please - I can't be the only person who is unable to debug his stored procedures. How can I either enable Application Debugging, or enable "OLE Automation"?I appreciate any help you can offer! 

View 3 Replies View Related

How To Debug Stored Procedure

May 18, 2005

If I right-click on a stored procedure, I get the option to "step into
stored procedure". However, no little yellow arrow appears that would
show which line it's on. Debug/Continue is grayed out. Any ideas?
NOTE: I tried to do this in SQL Query Analyzer. Same thing. Just seems like nothing is happening.

View 8 Replies View Related

Debug Stored Procedure

Jan 18, 2006

I created a stored procedure that is referenced by a SQLDataSource
& DetailView on a web page. I tested the stored procedure in Query
Analyzer & everyting looks good.
When I get to the page to display the detailview, nothing is displayed.
I ran SQL Profiler, to see what was happening & the stored
procedure isn't being called.
I checked & rechecked the references to the SQLDataSource & even tested them in the configuration wizard.
I replaced the stored procedure with the query & it worked, except I had to 'hardcode' the variable values.

The stored procedure does return error results when they occur - how can I intercept them?

How can I determine what is happening with this stored procedure? Is there a way to trace it other than with SQL Profiler?

Thanks in advance.

OldSam

View 3 Replies View Related

How Can I Debug My Sql Stored Procedure

Apr 21, 2006

Hi Friends, I have a worst doubt, plese excuse me. and help me to find solution for my doubt.
How can i Debug my Sql Stored procedure. and where  to do this.

View 1 Replies View Related

Debug Stored Procedure

Jan 10, 2003

Debugging Stored Procedure

hi ...

How to debug a stored procedure line by line.
As i know there is one method of debugging the stored procedure by rightclicking on stored procedure in ObjectBrowser and click Debug. But it is not working properly .
Is there any other ways/methods of debugging a stored procedure

View 3 Replies View Related

How To Debug Stored Procedure?

Nov 6, 1998

Does anybody know how to debug stored procedure ,
especially big stored procedure with cursor?
Any existing tools? I'v heard it's easy in SQL Server 7
but we don't have it.
Please, any advice will be very appreciated.
Thanks.

View 3 Replies View Related

How To Debug My Stored Procedure.

Mar 20, 2007

Dear Sir,

I am from ASP.NET back ground now I am working in SQL Server 2005. I want to debug my stored procedure after coding end. In SQL 2000 there is an option of debug right click on the stored procedure but No such option present in SQL Server 2005 so I am unable to debug my Stored Procedure when any error occur.

Can you please guide me?

Regards

Sandeep Mishra
Bangalore


Have A Nice Day...!!!

View 10 Replies View Related

How To Debug Stored Procedure

Mar 8, 2008

Hi friends,

I am santhosh, working as a Sql developer.

I have created Stored Procedure in 200 lines.

After compilation its ok then created.

But the functionality is not good so how to debugging my stored procedure in step by step.

How to insert a break point.

I am using SQL server 2005.

I am not using any front end application like Dotnet using only SQL. (Front end department is different)

Please help me, line by line checking.


Advance Thanks,

Yours Santhosh.



Santhosh

View 4 Replies View Related

How Can I Debug Stored Procedure?

Jul 20, 2005

Hi thereHow can I debug Stored Procedure?Thanks

View 1 Replies View Related

Debug SQL Server Stored Procedure

Jun 15, 2006

How can I debug a Stored Procedure called by an ASP.Net application using SqlCommand.ExecuteScalar function?   

View 1 Replies View Related

How To Debug My Stored Procedure In SQL 2005 ?

Mar 20, 2007

Dear Sir,

I am from ASP.NET back ground now I am working in SQL Server 2005. I want to debug my stored procedure after coding end. In SQL 2000 there is an option of debug right click on the stored procedure but No such option present in SQL Server 2005 so I am unable to debug my Stored Procedure when any error occur.

Can you please guide me?

Regards

Sandeep Mishra
Bangalore

View 4 Replies View Related

Cannot Debug Activated CLR Stored Procedure

Jan 11, 2007

Hi

I'm having a problem debugging (with VS2005,) a CLR Stored Procedure which is activated on a queue. I know it is working because it is consuming and processing messages when one appears in the queue.

I can debug it 'manually' by either right-clicking on the SP within VS2005 and selecting 'Step into Stored Procedure' or by attaching to the SQL Server Management Studio process, setting a breakpoint and executing the stored procedure from a Management Studio query window.

However, if I send a message to my queue within Management Studio, my breakpoints are NOT being hit within VS2005, but the message IS reaching my queue and it IS being processed by the SP.

Can anyone help?

Thanks

View 3 Replies View Related

How To Debug The Stored Procedure In .net 2005

Aug 7, 2007

I am trying to debug the SQL Server Stored Procedure from .net 2005.

The process is as :

After setting Breakpoints at SP , it cant stop at that break point.

If anybody konws please write in detail.

Shyam.

View 3 Replies View Related

Debug A Stored Procedure In Schema

Nov 26, 2007



hi, i'm trying to debug a stored procedure (in sql server 2005) with visual studio 2005, but all my tables and procedures are inside a schema and when i configure my login in sql server for being in sysadmin role, it dosn't map the schema so i need to write the schema before the tables and procedures, and i don't need it in that way...
how can i do to have a login in sysadmin role and a schema maping in than login???,

thanks ....

View 1 Replies View Related

[sql Server 2005] - Debug A Stored Procedure

Nov 28, 2006

hello world,
how cani debug a stored procedure under sql server 2005?

View 2 Replies View Related

How To Debug Stored Procedure In SQL Server 2005

Jan 18, 2007

Hi all,

I really need to know that

" How to debug stored procedure in SQL server 2005 ?"

please help me to solve my problem ?

regards

sujithf

View 23 Replies View Related

Can I Debug A SQL 2005 Stored Procedure With The SA Account

Oct 17, 2007

I want to know if I can debug stored procedures remotely with the SA account.
I can not have Active Directory in my system right now.

Thanks

View 1 Replies View Related

Debug Stored Procedure That Uses Comma Delimited List To Insert Multiple Records

Jan 18, 2006

I need some help with a stored procedure to insert multiple rows into a join table from a checkboxlist on a form. The database structure has 3 tables - Products, Files, and ProductFiles(join). From a asp.net formview users are able to upload files to the server. The formview has a products checkboxlist where the user selects all products a file they are uploading applies too. I parse the selected values of the checkboxlist into a comma delimited list that is then passed with other parameters to the stored proc. If only one value is selected in the checkboxlist then the spproc executed correctly. Also, if i run sql profiler i can confirm that the that asp.net is passing the correct information to the sproc:
exec proc_Add_Product_Files @FileName = N'This is just a test.doc', @FileDescription = N'test', @FileSize = 24064, @LanguageID = NULL, @DocumentCategoryID = 1, @ComplianceID = NULL, @SubmittedBy = N'Kevin McPhail', @SubmittedDate = 'Jan 18 2006 12:00:00:000AM', @ProductID = N'10,11,8'
Here is the stored proc it is based on an article posted in another newsgroup on handling lists in a stored proc. Obviously there was something in the article i did not understand correctly or the author left something out that most people probably already know (I am fairly new to stored procs)
CREATE PROCEDURE proc_Add_Product_Files_v2/*Declare variables for the stored procedure. ProductID is a varchar because it will receive a comma,delimited list of values from the webform and then insert a rowinto productfiles for each product that the file being uploaded pertains to. */@FileName varchar(150),@FileDescription varchar(150),@FileSize int,@LanguageID int,@DocumentCategoryID int,@ComplianceID int,@SubmittedBy varchar(50),@SubmittedDate datetime,@ProductID varchar(150)
ASBEGIN
  DECLARE @FileID INT
 SET NOCOUNT ON
/*Insert into the files table and retrieve the primary key of the new record using @@identity*/ INSERT INTO Files (FileName, FileDescription, FileSize, LanguageID, DocumentCategoryID, ComplianceID, SubmittedBy, SubmittedDate) Values (@FileName, @FileDescription, @FileSize, @LanguageID, @DocumentCategoryID, @ComplianceID, @SubmittedBy, @SubmittedDate)
 Select @FileID=@@Identity
/*Uses dynamic sql to insert the comma delimited list of productids into the productfiles table.*/ DECLARE @ProductFilesInsert varchar(2000)
 SET @ProductFilesInsert = 'INSERT INTO ProductFiles (FileID, ProductID) SELECT  ' + CONVERT(varchar,@FileID) + ', Product1ID FROM Products WHERE Product1ID IN (' + @ProductID + ')'  exec(@ProductFilesInsert) EndGO
 
 

View 4 Replies View Related

Updating Local Data On Device From Sql Server, Via Webservice

Dec 12, 2006

I want to update data on the device which has a sql server mobile database.

the main database is sql server.

I use web services to enable the mobile application to access the server.

Can anyone recommend a way of updating the data on the device without using replication? I basically want to read a dataset from the server via webservice and put this in to local db - but not row by row as too many records.

Regards

View 1 Replies View Related

Couldn't Debug SQL By Step Into Stored Procedure On Server Explorer Of VS2008 (or VS2005) On Remote Machine

Oct 21, 2007

Hi all,


I couldn't debug SQL Server by "Step into Stored Procedure" on Server Explorer of VS2008 (or VS2005) to SQL 2005 Developer on remote Windows Server 2003 machine, it allway issue exception "Unable to start T-SQL Debugging. Could not attach to SQL Server process on 'Server'. Click Help for more information"

1) The environment:
The Client: Windows XP SP2 (WORKGROUP)
Visual Studio 2008 (or VS2005)


The SQL Server Machine: Windows 2003 Server Sp1 (DOMAIN)
SQL Server 2005 Developer

2) User account and Permission login:
I create the same user account for both Client and Domain Server with the same password, i also add that user to "Administrators" group in both machine.

At the SQL Server on Server machine, i added that account to ServerSecurityLogin with 'sysadmin' role already

3) Connection and authentication:
I used "Windows Authentication" for my connection to SQL server, and i checked sure my account of the connection by SQL command

SELECT SYSTEM_USER,
IS_SRVROLEMEMBER ('sysadmin')

4) Firewall:
I checked firewall like MSDN helping (i also tried to test by turn off firewall in both machine)

5) Visual Studio Remote Debugger:
I read "How to: Enable SQL Server 2005 Debugging" on MSDN with comment "The SQL Server can run on the same machine as the application or on a remote machine. If you are debugging T-SQL code only, then no remote setup is required."
so i didn't config Visual Studio Remote Debugger any thing.

Note: If i "Step Into Store Procedure" at Server locally, it works okey, so on at my PC client locally. But if i move debugging from my client to my Server, it occur error "Unable to start T-SQL Debugging. Could not attach to SQL Server process on 'Server'. Click Help for more information"???

If i execute store procedure on Server Explore, it works okey!

Please help me to find out what problem is???

Thanks,
Haiasc

View 2 Replies View Related

Stored Procedure - Local Variables Show As NULL

Mar 18, 2008

 I have a stored procedure where I gather some data and then insert the data into a table variable.  I then attempt to go through each row of the table variable, asign the values to local variables to be inserted into other tables.  However, the local variables show as NULL.BEGIN
DECLARE @tblcontact table
(
SOKey int,
Cntctkey varchar(60),
Cntctownerkey int,
LASTNAME varchar(32),
FIRSTNAME varchar(32),
WORKPHONE varchar(32),
EMAIL varchar(128),
processed int DEFAULT 0
)

INSERT INTO @tblcontact (SOKey, Cntctkey, Cntctownerkey, LASTNAME, FIRSTNAME, WORKPHONE, EMAIL)
SELECT ...

DECLARE @ID int,
@sokey int,
@cntctkey int,
@cntctownerkey int,
@name varchar(65),
@email varchar(128),
@phone varchar(32)

WHILE EXISTS (SELECT * FROM @tblcontact WHERE processed = 0)
BEGIN
SELECT @ID = MIN(SOKey) FROM @tblcontact WHERE processed = 0

SELECT @cntctkey = (CAST(LTRIM(REPLACE(Cntctkey,'CN',' '))AS int)),@cntctownerkey = Cntctownerkey, @name = FIRSTNAME + ' ' + LASTNAME, @phone = WORKPHONE, @email = EMAIL, @sokey = SOKey
FROM @tblcontact
WHERE @ID = SOKey AND @cntctkey <> '43778'

INSERT INTO tciContact (Cntctkey, Cntctownerkey, CreateType, EMailAddr, EmailFormat, EntityType, ExtUser, Name, Phone, UpdateCounter)
VALUES (@cntctkey, @cntctownerkey, '0', @email, '3', '401', '0', @name, @phone, '0')

UPDATE tsoSalesOrder
SET Cntctkey = @cntctkey, UserFld4 = 'temp'
WHERE SOKey = @sokey

UPDATE @tblcontact
SET processed = 1 WHERE @ID = SOKey
END
END  

View 4 Replies View Related

Help Passing A Stored Procedure Reults To A Local Variable?

Apr 29, 2005

I'm trying to do something like this in SQL Server:
<code>
CREATE PROCEDURE sp_insert_proc
(
@item1 as int,
@item2 as varchar(50),
)
DECLARE @LocalVariable AS varchar(50)
SET @LocalVariable = dbo.sp_storedprocedure
INSERT INTO Table
(
Column1,
Column2,
Column3,
)
VALUES
(
@Item1,
@Item2,
@LocalVariable
)
</code>
Is this possible?
How can I return the results of the stored procedure to a variable so I can use those results

View 1 Replies View Related

SQL Server 2014 :: Stored Procedure - Add A Record To Local Database Executing In Cloud Environment

May 20, 2015

Is there a way using a stored procedure in a local database to add a record to a database executing in a cloud environment when both entities reside in different domains?

View 2 Replies View Related

Invoking Webservice Using SQL CLR Procedure

Jan 27, 2008

Hi,

I have written a SQL CLR procedure, which will be invoking the webservice..I developed the application locally and it works fine, I am able to invoke the webservice using the SQL CLR procedure present in my database. But when i hosted the webservice in App server and executed the SQL CLR procedure in DB Server.
From DB Server, I am not able to invoke the webservice present in the app server. But i am able to browse the webservice from my db server.
I am getting the foolowing error message


A .NET Framework error occurred during execution of user defined routine or aggregate 'usp_LoadView':
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
System.Net.Sockets.SocketException:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
System.Net.WebException:
at StoredProcedures.usp_LoadView(String ConnectionString, String WebserviceUrl, String ColumnMappingsXml, SqlXml AddressXml, SqlXml& ExceptionSqlXml, Int32& ErrorStatus)


I goggled and tried out various options, like increasing €œwebservice timeout€? and increasing €œexecutiontimeout€? for HttpRuntime, but none seems to be working. Please provide me your suggestions to how to fix this..

View 4 Replies View Related

Communicate With WebService From MS SQL 2005 CLR Procedure, Quick Steps

Jan 14, 2008

-> Communicate with WebService from MS SQL 2005 CLR Procedure, Quick Steps

1- Create SQL project in V.S 2005.


2- Add new Trigger Class, right click on project select Add -> New Item.


3- Add Web Service reference.


4- Use impersonation technique to communicate with Service.


Example:


using (WindowsIdentity id = SqlContext.WindowsIdentity)
{
WindowsImpersonationContext context = id.Impersonate();


/////////////////////////////
proxy = new WebServiceProxy();

proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

proxy.HelloWorld();

/////////////////////////////


context.Undo();
}


5- Set SQL Project Permission Level to External, change from the project properties Database Tab


"Permission Level Select the permission level from the drop-down list to specify a set of code

access permissions granted to the assembly when accessed by Microsoft SQL Server. The value can be

Safe, External, or Unsafe; these values correspond to the SQL Server permission sets SAFE,

EXTERNAL_ACCESS, and UNSAFE, respectively. Safe is the default.

This setting corresponds to the PERMISSION_SET argument for the SQL Server CREATE ASSEMBLY command.
" MSDN


6- "The TRUSTWORTHY database property is used to indicate whether the instance of SQL Server trusts

the database and the contents within it. By default, this setting is OFF, but can be set to ON by

using the ALTER DATABASE statement.

Note:
To set this option, you must be a member of the sysadmin fixed server role." MSDN


ALTER DATABASE [Database Name] SET TRUSTWORTHY ON
.



7- Build and Deploy assembly.

8- The web service reference generates XmlSerializers assembly, there are many ways to resolve
this issue, a quick way would be to add the XmlSerializers assembly to the database where the
main CLR assembly is deployed.


From "SQL Server Management Studio" select the target database, goto "Programmability" then ->
"Assemblies", there right click "New Assembly" and specify reference.





Hope this is helpful to others.
Regards
Rabeeh Abla

View 1 Replies View Related

Call Webservice From Trigger/stored Proc

Sep 17, 2004

Is it possible to call an external web service from a SQL Server trigger or stored procedure?

View 6 Replies View Related







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