Need help with extracting data from excel

  • I need to pull data from an excel sheet and load the data into a SQL table. This job should be done as a part of a SP. Because there is a lot of SQL code that needs to execute right after the file is loaded. We get like 20 of these files everymonth. I created a job and executed it using xp_cmdshell and DTSRun from my SP. But then the user needs be in sysadmin role or the account under which MSSQLServer runs should be a part of local administrators group. Both are not a very good from a security standpoint. So what are my options? What if I use opendatasource ???? I would doing some dyanmic SQL, but looks like there is no other option. Looking for ideas.

    Your time and thoughts are greatly appreciated.

    Thanks

    CB

  • SQL uses a proxy account when you run a job or xp_cmdshell with a user who aren't a sysadmin. This proxy account doesn't have to be a part of the administrators group.

    Look in BOL for 'xp_sqlagent_proxy_account'

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

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