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


Run as user in SQL 2000 errors in 2005.


Run as user in SQL 2000 errors in 2005.

Author
Message
sgtwilko
sgtwilko
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 177
Hi,

We are a software house that produces a product based on SQL server. We use a strong encryption for stored procs, functions, triggers and the like so our code can't changed or viewed.

All procs are run as one user (from a website). This user has very limited permisions (eg, not able to get outside of the database and certainly not able to run xp_cmdShell).

Inside several of these procs we have the following to change the user to one that is able to do more, and does have permission to run xp_cmdShell.

exec OPENDATASOURCE('SQLOLEDB', 'User ID=Dave;Password=Dave').master.dbo.xp_cmdShell @cmd

As the proc is encrypted, and you are not able to view the password we believe this to be a secure way of controling permisions without limiting what the application does.

This has been working fine in SQL 2000 for the last 6 years, this code does not work under SQL 2005 but only in triggers. We get the dreaded "Transaction Context in use by another session".

We can't use 2005 specific features as 99% of our customers are running on 2000.

Any ideas on this problem?

Thanks,

Ian.



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