Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / January 2008

Tip: Looking for answers? Try searching our database.

Deploying CLR trigger to SQL-Server 2005 -- Permissions Required.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris - 28 Jan 2008 19:36 GMT
I've written a C# trigger on Developer_Box, using VS 2005
Professional.
I need to deploy it on Test_Server, running SQLServer 2005.

It compile fine, and the references to the appropriate database and
table are correct.

First attempt:
You do not have CREATE Trigger permission.
Solution - Walk over to Test_Server, open management studio and give
myself CREATE Trigger permission.

Second Attempt:
"Cannot create the trigger 'MyTrigger', because you do not have
permission."
What it doesn't tell me is what permission is missing.

I could run this as admin, but I'm going to need to deploy it on
Production_Server eventually, so I want to request the minimal
permission set possible. (And I won't get admin on Production)

compatibility mode is  90;
CLR is enabled via sp_configure (and RECONFIGURE was run)
Erland Sommarskog - 28 Jan 2008 22:44 GMT
> First attempt:
> You do not have CREATE Trigger permission.
[quoted text clipped - 9 lines]
> Production_Server eventually, so I want to request the minimal
> permission set possible. (And I won't get admin on Production)

The minimal set would be the permissions CREATE ASSEMBLY, CREATE TRIGGER
and ALTER on the table in question.

In practice, being member of the database role db_ddladmin, may be an
easier path.

For the deployment on the production server, I recommend that you build
a T-SQL script to do it all. Keep in mind that you can specify an
assembly as a binary string with the CREATE ASSEMBLY statement.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

chris - 29 Jan 2008 16:26 GMT
Alter Table did it.

Create Assembly
and
Create Trigger

Scripts run on the server itself turns out to be the preferred option.
I was just trying to save myself a walk over to the Test_Server, by
deploying directly from Visual Studio.

> > First attempt:
> > You do not have CREATE Trigger permission.
[quoted text clipped - 25 lines]
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.