Showing posts with label triggers. Show all posts
Showing posts with label triggers. Show all posts

Friday, March 23, 2012

job run as part of trigger/non-sysadmin

We are on SQL 2005.
We have several jobs that get started as part of Triggers on inserts. The
job in question has a T-SQL step.
When the user who creates a record is part of the sysadmin role, everything
is fine. When the user is not part of that role, we get
The specified @.job_name ('the job name') does not exist.
How can we use a user that is not in the sysadmin role to run this job?
Thanks,
DougThis cannot be done directly. In SQL 2005 you could have the trigger post a
message to a Service Broker queue, and have a sysadmin level process
assigned to processing queue messages, thus using the queue to decouple
permissions, one of Service Broker's intended purposes.
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
"Doug" <Doug@.discussions.microsoft.com> wrote in message
news:4125E54B-E0E2-464D-9A2E-04A9A8BB501A@.microsoft.com...
> We are on SQL 2005.
> We have several jobs that get started as part of Triggers on inserts. The
> job in question has a T-SQL step.
> When the user who creates a record is part of the sysadmin role,
> everything
> is fine. When the user is not part of that role, we get
> The specified @.job_name ('the job name') does not exist.
> How can we use a user that is not in the sysadmin role to run this job?
> Thanks,
> Doug
>|||Daniel Jameson (djameson@.childrensoncologygroup.org) writes:
> This cannot be done directly. In SQL 2005 you could have the trigger
> post a message to a Service Broker queue, and have a sysadmin level
> process assigned to processing queue messages, thus using the queue to
> decouple permissions, one of Service Broker's intended purposes.
Yes, Service Broker is most certainly the way to do. Most likely the
Agent job would not be need at all then, but what needs to be done can
be performed by the activation procedure for the queue.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, February 20, 2012

JDBC driver for Microsoft SQL Server CE / Compact Edition

Hi,

I have a J2EE based web application. There is a requirement where user triggers a process to query a database, and the application needs to save the results to an SDF file (Microsoft SQL Server CE 2.0 / Microsoft SQL Server Compact Edition) database. I need JDBC driver for it, but could not find it anywhere. Please help. Also, if there is any alternate way to do this, please let me know.

Thanks,
Vaibhavhttp://technet.microsoft.com/en-us/sqlserver/bb331716.aspx & http://technet.microsoft.com/en-us/sqlserver/bb331729.aspx should get you what you want.|||No it does not. I think there is no such thing developed yet.|||You could submit such request by using http://connect.microsoft.com and also search under http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html#996747 Sun website for any relevant ODBC-JDBC bridge.