Re: user permissions



you can use "exec xp_cmdsehll 'kill <pid>

We are talking about killing a sql connection, so xp_cmdshell isn't a
solution, is it?

I thought about doing something with EXECUTE AS in a stored procedure and
then checking that it's the right database before killing the connection, but
I'm not sure how that would work with the security as the kill sql command is
outside the scope of the database.

Ola Hallengren
http://ola.hallengren.com



"Charles Wang[MSFT]" wrote:

Hi Trapulo,
I would like to add some comments regarding 'EXECUTE AS' clause in SQL
Server 2005 as a complement of Rick's response. I think you can work around
this issue by creating a stored procedure with 'EXECUTE AS' clause in SQL
Server 2005.

First ensure that the account specified in the EXECUTE AS clause has the
permission to kill a process; then in the stored procedure, you can use
"exec xp_cmdsehll 'kill <pid>'" to kill a process; finally give out
permissions to execute the stored procedure for your database user. By this
way, you should be able to not only do the database thing but also do the
server thing.

For more information, please refer to:
EXECUTE AS Clause (Transact-SQL)
http://msdn2.microsoft.com/en-us/library/ms188354.aspx

Hope this helps. If you have any other questions or concerns, please feel
free to let us know. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================




.



Relevant Pages

  • Scheduled DTS package doesnt run
    ... I created a DTS package wich runs a standard Stored Procedure in the master ... I call the stored procedure by an Execute SQL Task object with all necesarry ... When I log on as administrator on the server and run the package manually it ... Error string: SQL Web Assistant: Could not execute the SQL statement. ...
    (microsoft.public.sqlserver.dts)
  • Re: Issue with retrieving large data over web using Stored Procedu
    ... It appears that it was hitting the stored procedure, ... Is there any tool in the SQL Profiler that analyze each Trace? ... The maximum amount of time for a script to execute was exceeded. ... do it at ASP. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Create Storedprocedure with VB6? Is this possible?
    ... you can create and execute an SQL query that includes the ... can SQL Server Management Studio." ... Can VB6 create a stored procedure on the fly. ... Call the connection's Execute method, ...
    (microsoft.public.vb.database.ado)
  • Re: ASP and stored procedure problem (syntax error ?)
    ... I am typing execute sp_sel_companynames @sql, I think this is why it is ... falling over. ... >> page to the stored procedure to return a recordset that i can write ...
    (microsoft.public.inetserver.asp.db)
  • Re: Just scratching my head...
    ... SQL object" error was exhibited. ... The Tech Support analysis was that it was a known problem and that the dbimport SQL "be split the script in different blocks for example 8000 rows then execute the first block then force IDS to remove the session control block to clean all the memory so just close the dbaccess and then start an new dbaccess that will execute the next block and so on". ...
    (comp.databases.informix)

Loading