Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can't get CLR to Deploy to SQL 2012 CU2


Can't get CLR to Deploy to SQL 2012 CU2

Author
Message
cARBONc
cARBONc
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 95
Start a project on my Dev Server.
SQL 2012 with CU1 and CU2 are installed on both Coding Server and Dest Server

Start project on Dev server.
Pick vb.net CLR project type
name project something random...
setup connection to destination server/database
Use .net framework 4.0 (installed on both servers and verified the framework is the same version)
To verify framework SQL 2012 is using I ran this command on the Dest server:
select * from sys.dm_clr_properties
Results:
directory C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
version v4.0.30319
state CLR is initialized

Verified the Database I'm deploying to has Trustworthy set to ON

added a Stored procedure to the project.
Did not add any code to the stored procedure.

Build the project (successful)

Deploy the project I get:

SqlClrDeploy:
Beginning deployment of assembly TestCLRProject.dll to server OLTP : MyDatabase
The following error might appear if you deploy a SQL CLR project that was built for a version of the .NET Framework that is incompatible with the target instance of SQL Server: "Deploy error SQL01268: CREATE ASSEMBLY for assembly failed because assembly failed verification". To resolve this issue, open the properties for the project, and change the .NET Framework version.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlClr.targets(96,5): Deploy error SQL01234: The database version is not supported.

Build FAILED.

Time Elapsed 00:00:00.01
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========


Anybody have any ideas?
cARBONc
cARBONc
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 95
Nevermind.
I just found that VS 2010 SP1 doesn't work properly with SQL 2012 CLR.

You have to install this overtop of your VS 2010 SP1 installation:
http://msdn.microsoft.com/en-us/data/hh297027


What's weird is that my Dev server ALREADY had SQL Data Tools installed ???!!?!?
Tatsu
Tatsu
Old Hand
Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)

Group: General Forum Members
Points: 302 Visits: 307
cARBONc (7/13/2012)
Nevermind.
What's weird is that my Dev server ALREADY had SQL Data Tools installed ???!!?!?


If you didn't have SSDT installed on the machine you created the CLR procedure on it wouldn't have been compiled against the correct binaries.

Another thing you might run into with CLR fro SQL Server is that a lot of the new features in the .NET Framework 4.0 are not tested against SQL Server 2012. If you try to use one of the untested assemblies you'll get a warning (maybe an error, I forget which) when you try to deploy it.

Bryant E. Byrd, BSSE MCDBA MCAD
Business Intelligence Administrator
MSBI Administration Blog
Shon Thompson
Shon Thompson
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 537
Why does the MS documentation say you can do it with visual studio?

http://technet.microsoft.com/en-us/library/ms345099.aspx
Tatsu
Tatsu
Old Hand
Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)

Group: General Forum Members
Points: 302 Visits: 307
Shon Thompson (4/16/2014)
Why does the MS documentation say you can do it with visual studio?

http://technet.microsoft.com/en-us/library/ms345099.aspx


You can deploy a CLR object to SQL Server from Visual Studio as long as you have permission and all the versions are compatible. The TechNet article isn't very clear on what those version requirements are.

Bryant E. Byrd, BSSE MCDBA MCAD
Business Intelligence Administrator
MSBI Administration Blog
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search