Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Can't get CLR to Deploy to SQL 2012 CU2 Expand / Collapse
Author
Message
Posted Friday, July 13, 2012 9:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 12, 2014 9:20 AM
Points: 9, Visits: 89
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?

Post #1329543
Posted Friday, July 13, 2012 9:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 12, 2014 9:20 AM
Points: 9, Visits: 89
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 ???!!?!?
Post #1329555
Posted Sunday, July 15, 2012 8:18 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, September 4, 2014 9:46 AM
Points: 295, Visits: 280
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
Post #1329861
Posted Wednesday, April 16, 2014 1:52 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 9:29 AM
Points: 17, Visits: 408
Why does the MS documentation say you can do it with visual studio?

http://technet.microsoft.com/en-us/library/ms345099.aspx
Post #1562434
Posted Wednesday, April 16, 2014 2:39 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, September 4, 2014 9:46 AM
Points: 295, Visits: 280
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
Post #1562453
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse