.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

CLR Stored Procedure that invokes the CRM Web service SQL Server 2008 R2

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Sql Server


I have created a CLR stored procedure that invokes the CRM Web service to delete records, the code complies fine but when I try to deploy it it just times out. I feel that I am missing something, has anyone any suggestions.

There are a number of blogs about the subject of invoking Web services from a CLR stored procedure but they are about doing it in 2005, is the procedure the same?



View Complete Post

More Related Resource Links

SQL Server 2008 Stored Procedure output parameter

I would like to get OUTPUT parameter names from stored procedure without executing stored procedure.  for excample schema API will help to get input parameter metadata. Thanks in advance. Murali

debugging stored procedure created in sql server 2008

Hi experts,     I want to get rid of old debugging of stored procedure where we use print statement. I know how to debug the stored procedure just wanted to ask, can i get the details of #temp or @tbltemp(TABLE datatype) variable values while debugging

debugging stored procedure created in sql server 2008

Hi experts,     I want to get rid of old debugging of stored procedure where we use print statement. I know how to debug the stored procedure just wanted to ask, can i get the details of #temp or @tbltemp(TABLE datatype) variable values while debugging

SQL Server 2008 - Stored Procedure


I work for a software manufacturing company and I am doing a project for a very large potential customer.  This customer has a SQL Server 2008 DB and claims that his emplpyee's can only access the DB (read or write) using a stored procedure.  Now the catch is we cant re-write the software to accomidate this customer, and our requests to see the stored procedure to see how hes using it have failed.  But I need to be able to access his DB at no additional cost to the customer.  Is there any way to call a SP using a Data Source Driver?  Or any other ideas, I need an answer for this cutomer today :(

Stored Procedure on SQL SERVER 2008 R2


I have 2 tables:

(1) tblSpecies with Columns ID int, Code nvarchar(50), Description nvarchar(50)

(2) tblSpeciesCrossReferenceCodes with Columns ID int, SpeciesCode nvarchar(50), etc. etc.

I want to invoke the following  procedurewith 3 input parameters  in Paged GridView.

When I test this procedure under ServerControl with the value of @SpeciesCode ="APQ"

I get the error:

" Invalid Column Name APQ."


This points to the statement:

        WHERE (X.SpeciesCode LIKE ' + @SpeciesCode + '))

I would be grateful if an Expert could tell why I should I

get this message and where am I going wrong?



ALTER PROCEDURE [dbo].[StoredProcedureFilterXCodes]
 @startRowIndex int,
 @maximumRows as int,
 @SpeciesCode as nvarchar(50)

IF @SpeciesCode IS NULL
      EXEC dbo.GetSpeciesCrossReferenceCodes @startRowIndex, @maximumRows


    SET @startRowIndex=@startRowIndex+1
 DECLARE @sql nvarchar(4000)

 SET @sql = 'SELECT ID, PresentationCode, StateCode, FreshnessCode, SizeCode, Sp

Execute stored procedure on linked DB2 server from MS SQL 2008 SP1 64 bit problem

Hi everybody. I am trying to execute stired procedure on linked DB2 server from MS SQL 2008 x64
I installed IBM Access client x64 and on provider tab showed up 3 providers IBMDASQL,IBMDA400,IBMDARLA
I installed linked server as shown on this two links:


I installed linked server using all this 3 providers

    @srvproduct=N'DB2 UDB for iSeries',
    @provider=N'IBMDASQL',-- provider for example
    @datasrc=N'ASTEST', -- mydatasource
exec sp_addlinkedsrvlogin DB2,false,null,'telebank','password'

I can run procedure from the extended stored procedure, but when i try to execute it as shown on the linkes above i get the following error:
Could not execute statement on remote server 'DB2'.

  @branch    as varchar(4),
  @cli   as varchar(6),
  @suffix    as varchar(3),
  @date1     a

Send Email from SQL Server Express Using a CLR Stored Procedure

One of the nice things about SQL Server is the ability to send email using T-SQL. The downside is that this functionality does not exist in SQL Server Express. In this tip I will show you how to build a basic CLR stored procedure to send email messages from SQL Server Express, although this same technique could be used for any version of SQL Server.

If you have not yet built a CLR stored procedure, please refer to this tip for what needs to be done for the initial setup.

TSQL: Passing array/list/set to stored procedure (MS SQL Server)

Passing array/list/set to stored procedure is fairly common task when you are working with Databases. You can meet this when you want to filter some collection. Other case - it can be an import into database from extern sources. I will consider few solutions: creation of sql-query at server code, put set of parameters to sql stored procedure's parameter with next variants: parameters separated by comma, bulk insert, and at last table-valued parameters (it is most interesting approach, which we can use from MS SQL Server 2008). Ok, let's suppose that we have list of items and we need to filter this items by categories ("TV", "TV game device", "DVD-player") and by firms ("Firm 1", "Firm2", "Firm 3). It will look at database like this So we need a query which will return us list of items from database. Also we need opportunity to filter these items by categories or by firms. We will filter them by identifiers. Ok, we know the mission. How we will solve it? Most easy way, used by junior developers - it is creating SQL-instruction with C# code, it can be like this List<int> categories = new List<int>() { 1, 2, 3 };   StringBuilder sbSql = new StringBuilder(); sbSql.Append( @" select i.Name as ItemName, f.Name as FirmName, c.Name as CategoryName from Item i inner join Firm f on i.FirmId =

SQL Agent - service account permissions - SQL Server 2008

Hi @ all   I installed two SQL Server 2008 on Server 2008 R2 Std (principal and mirror) and an AD Server 2008, with sperate service accounts, connect as SA, localy all works fine. I created some agent tasks (PowerShell, T-SQL), but I get some Error massages in the history, that service account of SQL Agent didn't have the permission to query a remote machine(access denied for wmi (HRESULT: 0x80070005 (E_ACCESSDENIED)) and linked database(SQLSTATE 42000 Error(7314)). The simple query with SA permissions on the remote machine works and the powershell scripts with the local domain user works too. But not with the SQL Agent. WHY?? Where ist the different between the user account permisions and service account permissions? Which settings are needed? Example: get-wmiobject -class win32_service -computername 192.168.xxx.xxx| where {$_.name -like '*SQL*'} Powershell Console: works                                     SQL Agent Job: access denied I tried some solutions with user rights, group policies and security permissions but nothing works. like: Configuration -Service Accounts, SQL Server or SQL Server Agent service account http://support.microsoft.com/kb/283811/en-us http://msdn2.microsoft.com/

Issues in GetItemDataSources web service call in 2008 Report Server R2

Hi, I'm using Reporting Services web services endpoint ReportService2005.asmx with 2008 report server R2 and I'm facing some issues in getting the data source names for a report definition using the GetItemDataSources web service. The problem is that the data source names returned are different from the names of the actual data sources on the report server. The report has the following data sources: 0 1 _0 _A Data Source And the names returned by the GetItemDataSources for 2008 report server R2 is: AutoGen_0 AutoGen_1 AutoGen__0 AutoGen__A Data_Source When I make the same calls using a 2005 report server, the names returned are the same as that in the report definition. To summarize, only numeric data source names are changed to "Autogen_<number>"(eg. Autogen_0), data source names beginning with "_" are changed to "Autogen_<data source name>"(eg. AutoGen__A)  and spaces are replaced by an "_".   What is the problem for the data source names returned for 2008 report server R2? Or has there been any change in the way in which report server stores the data source names? Thanks, Kulbhushan Singhal.  

SQL Server 2008 R2 Installation and Service Pack 1 Question

I am migrating a SQL 2000 server to a SQL 2008 R2 server (on different physical servers) . When I ordered SQL Server 2008 the volume licensing allowed me to download sql server web 2008, sql server web 2008 R2 and sql server 2008 service pack 1. I don't know why I have three options to download. Don't I just need to just install the sql server 2008 Web R2? Are there any sql 2008 R2 service packs available?   

SQL Server 2008 express SQL Server Service won't start

Could really use some help. Am running XP Pro SP3.  Had 2005 Express running fine previously.  Installed 2008 Express but cannot get the SQL Server service to start.  SQL Server Agent does start though.  In log (below) it seems to be trying to access an E:\ drive that doesn't exist (did default install to C:\Program Files) - plus other issues.  Have 5gig+ free, so not sure why it's saying not enough space.  Have RTFMd the problem for a whole day with no luck.  Any advice much appreciated.   Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)  Apr  2 2010 15:53:02  Copyright (c) Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) (Hypervisor)   Error: 17054, Severity: 16, State: 1. The current event was not reported to the Windows Events log. Operating system error = 1502(The event log file is full.). You may need to clear the Windows Events log if it is full. (c) Microsoft Corporation. All rights reserved. Server process ID is 4988. Authentication mode is WINDOWS-ONLY. Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log\ERRORLOG'. This instance of SQL Server last reported using a process ID of 3232 at 9/4/2010 9:36:12 AM (local) 9/4/2010 1:36:12 PM (UTC). This is an informational

Problem consuming 32bit WCF service which references a native Dll in a 64 bit OS(Windows Server 2008

I have some 32bit Dlls which i want to use it in 64bit OS as i do not have a source code of this to recompile it for 64 bit OS. I have created a x86(32 Bit) WCF service which calls these Dlls and hosted it as a Windows Service on a x64(64 Bit) machine using Windows Server 2008. I have created one more x64 client which calls a function in the WCF which in turn calls a function from the 32 bit native Dll. Whenever i try calling this WCF from the client I get an error as given below.Can anybody please guide as to where I am going wrong and what is needed to solve this issue. Thanks in advance for any help.******The Error Message********************System.BadImageFormatException: Could not load file or assembly 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.File name: 'TestWCFWrapper, Version=, Culture=neutral, PublicKeyToken=null'   at TestWrapperWCFClient.Form2.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms

SQL Server 2008 R2 Setup & Service Packs

Hello I installed SQL Server 2008 R2. (Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (Hypervisor) ) Are there any Service Packs for SQL Server 2008 R2 available i need to apply? Thanks V

Folders or folder like equivalent in SQL Server 2008 ? for packages & stored procedures ?

Hi,      Currently running SQL-Server 2000.  We have hundreds of stored procedures and DTS packages. We have so many it's becoming a serious challenge for names and such.  We were wondering if SQL Server 2008 has a way to 'nest' both the equivalent of DTS packages (SSIS) and stored procedures in something akin to 'folders'.  We know we have to upgrade one of these days but a version that would handle these would be much more attractive. Just getting this functionality would be worth whatever effort would be required to upgrade.   Thanks in advance for any help on this.

Does SQL Server 2008 R2 Express Reporting Service support Shared Datasets?

I have spent a few hours trying to get this to work. I am using Report Builder 3.0 (locally), with SQL Server 2008 R2 Express Edition on a remote web server. I am running Report Builder as an Admin under Win7 64bit. All is OK until I attempt a Save of a newly created shared dataset. The error message is: Failed to save dataset "mydataset.rsd" The feature "Shared dataset" is not supported in this edition of Reporting Services. Details: The feature: "Shared dataset" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Shared dataset" is not supported in this edition of Reporting Services. I have researched the web, and the list of features for Express Edition does not list this feature as not being supported, although it does list "Shared component library" as being missing. Could anyone please confirm the situation please. If it is  a bug, is there any fix or workaround?  John Walton  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend