Showing posts with label clr. Show all posts
Showing posts with label clr. Show all posts

Friday, March 23, 2012

Getting Started - what do I need?

While I have been programming .Net for four years and T-SQL for about 12, I am a newbie to the whole SQL CLR thing. I have VS.NET 2003 on my machine, and I installed the client tools for SQL 2005 which also installs VS 2005 for SQL. Yet when I open VS 2005, it only has Data Analysis projects, but no Database projects. If I go into VS 2003 and try to import some of the assemblies I have found by googling 'SQL CLR' - VS 2003 won't let me add them.

Exactly what do I need to install so that I can get started? Do I need an instance of SQL server running on my machine? (I currently do not have a server running, only the client tools are installed)

TIA,

--Yonah

Hi Yonah,

SQL Server 2005 Requirements:

Every SQL Server Edition (not sure about the new EVERYWHERE) including Express supports "CLR Integration" aka SQLCLR. Here is the sql product feature compare URL, http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx, feature is called "Common Language Runtime and .NET Integration".

Visual Studio 2005 Requirements (you dont have to use VS to create SQLCLR routines...but come on who uses vbc & csc w/Notedpad everyday? Which is actually why my SQLCLR book ASSUMES you will be using VS for SQLCLR work):

You need Visual Studio 2005 Professional, Tools for Office (VSTO), or Visual Studio Team System (VSTS) editions. See http://msdn.microsoft.com/vstudio/products/compare/default.aspx and look for "SQL Server 2005 Integration" feature.

Enjoy SQLCLR!

Derek

|||

You can check my blogs. i remeber i wrote article on this

Sunday, February 19, 2012

Getting error in registering the SQLCLR procedure...

hi, Derek Comingore

My self Jitendra Nayi....

I am trying to generate a SQL CLR stored procedure and i have done it too. Now the next step is to convert that *.dll file in to assembly. I am getting erro that. My server Database is on the LAN, not on my PC.

Here is the code which i have tried to register an assembly...

/*

CREATE ASSEMBLY MyAssembly FROM 'C:\Documents and Settings\Administrator.ORC80\My Documents\Visual Studio 2005\Projects\MyDB1\MyDB1\bin\Debug\MyDB1.dll'

WITH PERMISSION_SET=SAFE

GO

*/

and here is the error that i am getting...

/*

Msg 6585, Level 16, State 1, Line 1

Could not impersonate the client during assembly file operation.

*/

Please help me .I am stuck at here.

Are you running as a Windows login or SQL login? Only Windows logins can read assemblies in create assembly.|||In addition to what Mark B says in his reply; your CREATE ASSEMBLY statement references an absolute path to the assembly. Does the server box have access to this path and is the path visible to the server box?

Niels