Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Permissions needed to Create Assembly
Hi,

I am having difficulties in creating an assembly in a user database.

I am using an SQL login that is a db_owner of a database. The assembly has
PERMISSION_SET = EXTERNAL_ACCESS.

The first attempt gave these 2 messages:-

Error 1:  Msg 6585, Level 16, State 1, Line 2

Could not impersonate the client during assembly file operation.



Error 2:  Msg 300, Level 14, State 1, Line 2

EXTERNAL ACCESS ASSEMBLY permission denied on object 'server', database
'master'.

I then gave External Access Assemblies permission. This took away the 2nd
message but not the

Error 1:  Msg 6585, Level 16, State 1, Line 2



Does the SQL Login have to be a sysadmin to do this?

Thanks

Chris



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Wood
03-07-06 04:24 PM


Re: Permissions needed to Create Assembly
Hello Chris,

In a word, yes. You also need the right rights to read the DLL from the sour
ce
location (eg, a DACL for the account that windows is running under IIRC).

If you didn't ALTER DATABASE with SET TRUSTWORTHY on, you'll need to do the
"Safety Dance" too. See [0] for more information on that.

[0]: http://www.sqljunkies.com/WebLog/kt...es
.aspx

Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/



Report this thread to moderator Post Follow-up to this message
Old Post
Kent Tegels
03-07-06 04:24 PM


Re: Permissions needed to Create Assembly
Kent,

I forgot to mention that I did alter the user db to set TRUSTWORTHY ON. I
still get the 1st message

Msg 6585, Level 16, State 1, Line 2
Could not impersonate the client during assembly file operation.

BOL talks a lot about the Windows Account. Does this message mean Windows
permissions to the actual DLL?

Chris

"Kent Tegels" <ktegels@develop.com> wrote in message
 news:b87ad74140e08c8
0fe968b1a9f0@news.microsoft.com...
> Hello Chris,
>
> In a word, yes. You also need the right rights to read the DLL from the
> source location (eg, a DACL for the account that windows is running under
> IIRC).
>
> If you didn't ALTER DATABASE with SET TRUSTWORTHY on, you'll need to do
> the "Safety Dance" too. See [0] for more information on that.
>
> [0]:
> http://www.sqljunkies.com/WebLog/kt...op.com/ktegels/
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Wood
03-07-06 04:24 PM


Re: Permissions needed to Create Assembly
Hello Chris,

> Msg 6585, Level 16, State 1, Line 2
> Could not impersonate the client during assembly file operation.
> BOL talks a lot about the Windows Account. Does this message mean
> Windows permissions to the actual DLL?

Yes, that's what that means.

Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/



Report this thread to moderator Post Follow-up to this message
Old Post
Kent Tegels
03-07-06 06:23 PM


Re: Permissions needed to Create Assembly
Kent,

I have the DLL on my workstation. Do I need to have the DLL on the server
and have the authority on the server?

Thanks

Chris

"Kent Tegels" <ktegels@develop.com> wrote in message
 news:b87ad74142918c8
0ff76b247aa0@news.microsoft.com...
> Hello Chris,
> 
>
> Yes, that's what that means.
>
> Thank you,
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Wood
03-08-06 01:24 AM


Re: Permissions needed to Create Assembly
Hello Chris,

> I have the DLL on my workstation. Do I need to have the DLL on the
> server and have the authority on the server?

Well, what you need to have is a way for you to read that file from your
client from the server. I'm guessing at the moment that there's probably
a firewall between you and the server, right? Or can you simply not logon
that Windows Server on which the SQL Server instance is running?

Is there a particular reason you're not using Visual Studio to deploy here?
The reason that I ask is that it issues the create assembly command with
a binary serialization of the assembly, so there's no reason to "read the
file" from your machine. You can see it doing this with SQL profiler.

If nothing else, deploy the assembly to a local SQL Server, then use managem
ent
studio to script the assembly out to .SQL file. You could then run that file
on the remote server since the script will have the assembly inline as a
byte stream.

Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/



Report this thread to moderator Post Follow-up to this message
Old Post
Kent Tegels
03-08-06 01:24 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server Tools archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 09:30 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006