Running Jobs from VB

  • Hi, we are having problems running sql jobs from a vb component that is used by an asp page. It works but gives us a weak security model. Any suggestions?……

    Scenario 1

    abcadmin user has bulk admin server role

    abcadmin user is used by various vb applications to login to sql for admin type tasks like kicking off jobs. Its also used by dts package to connect to the db. Some of these dts packages perform bulk inserts.

    Login to sql server using abcadmin user (we are using vb and dmo here)

    Run job that is owned by sa

    Result:

    Scenario 2

    Change abcadmin user to be a member of sysadmin

    Result: can run the job

    Client Issues: Not happy with this user having sysadmin rights as it’s password is embedded in application code and is not changed on a regular basis.

    How do we get around this so we can kick off the job. Note that the job needs to performs CmdExec.

    Cheers,

    Gavin Lambourne,

    Spargonet Consulting Plc.

  • Push a row into a table, then have a job poll the table and launch the main job if needed. Or just have the main job run, check the table, exit if no row indicating needs to process.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Cheers Andy, like the solution. Since the post we have been looking at the "Non-SysAdmin job step proxy account" settings on SQL Agent (SQLAgent Properties, Job System Tab - appologies if i am teaching you to suck eggs!)

    This would also solve our problem if we could get the damn thing to work. It gives us..."Unable to set the SQL Agent Proxy account because of the reason listed below. 'Error executing extended stored procedure: Specific user cannot log in'.

    Have you had any luck with this?

    Ta,

    Gavin.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply