Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Svett
Starting Member
3 Posts |
Posted - 2013-08-06 : 08:50:05
|
Hi!I have a SP that uses OPENQUERY and a linked server (FoxPro Datasource) to copy data from a FoxPro database to a database in my SQL Server.When I run this as an domain admin from within Management studio, it works fine. But when I use a schedule a task (task scheduler in windows, this is a Express edition) to run a batch file that runs the SP using SQLCMD, I dont get access to the physical path of the *.dbf (foxpro database) files.I run the task as the same domain administrator I used to run the SP withing mangement studio. Im hoping to gain some insight in how you should approach a problem like this. I would like to use a SQL Server login to run the SP, but how do I give that SQL Login access to physical paths withing my network?Thanks for any help or links concerning this matter!!/Olof |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
Svett
Starting Member
3 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-08-07 : 01:12:46
|
quote: Originally posted by Svett
quote: Originally posted by visakh16 ideally you'll create a domain account for this task and define it as proxy account. then you can configure your sql agent job to use this proxy account and perform the required activitiesseehttp://sqlblog.com/blogs/allen_white/archive/2008/05/06/use-a-sql-agent-proxy-for-special-tasks.aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
I'm using an Express version and it doesnt have any Agent. Thats why I need to use the Task Scheduler.
you should still be able to use proxy account for executing the task I guess------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Svett
Starting Member
3 Posts |
Posted - 2013-08-28 : 10:10:27
|
The Task Scheduler was using a domain admin account but still refused to find the dbf files. Turns out the ODBC Data Source was set to look at a mapped network drive instead of the local drive where the dbf files where located. I dont know why the domain admin account could not move outside the local drives to access these files. But in this scenario, just modifying the DSN to look at D: instead of V: made it work! |
|
|
|
|
|