February 23, 2010 at 1:07 pm
I am setting up job scheduling through a third party app that does not speak directly with SQL server jobs.
So to set it up I have it call sqlcmd -i (input file containing the tsql statement)
works fine for most tsql except for the one that uses an openquery statement to make a call to an Oracle DB. In sql server this db is setup as a linked DB.
I know I can pass credentials through the sqlcmd for the tsql statement but it wont access the SQL linked (to Oracle) database
any thoughts on a way around this or somee switch I am missing?
my sqlcmd call... the txt file contains the tsql statement with the openquery...
sqlcmd.exe -i "E:\path\LOAD_DATA_TBL.txt"
February 23, 2010 at 1:15 pm
Guess I might clarify a little more...
the error I am getting is:
"Access to the remote server is denied because no login-mapping exists."
and it is mapped in SQL server, is there a way to access that mapping through sqlcmd.exe?
February 23, 2010 at 2:02 pm
Depending on your mapping..
Your scheduling app executes the command as a particular user, that user appears to not be mapped correctly. It might be helpful to run a trace and see exactly what user and command are being used.
CEWII
February 25, 2010 at 11:26 am
Thanks, I was thinking that the command line didn't interact nicely with the linked servers, but alas they do.
Our scheduling software was set to run the sql as the incorrect user. has it run as the correct user and it works fine (like all the others I set up)
Guess I just over looked that drop down on that tab. (Human Error)
Thanks for the quick response.
February 25, 2010 at 11:41 am
You are welcome. It is so often something small that causes issues. I sometimes feel bad asking the really basic questions.
CEWII
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply