Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SP2-0310: Unable to open file SQL 2012

853076May 13 2015 — edited May 15 2015

Hello,

I've built a new Win 2008 server with MS SQL 2012SP1 and a full 11g Oracle client. All apps are new new clean installs including the OS.

My install was as follows:

- OS and updates

- MS SQL/Reporting services and then enable xp_cmdshell

- Oracle 11g full client

I've added the correct TNS and ORA files to the Oracle client

I'm able from a command prompt to run sqlplus (I get a username/password)

Everything below is run from the Windows server not a desktop.

I have a folder E:\scripts with a .sql file in it. I have also shared this folder as scripts$ and given domain admins and the developer full access.

Here is what he's trying to run from a MS SQL 2012 query window but gets the SP2-0310 error:

exec xp_cmdshell 'sqlplus.exe user/password@oracleservername @\\WindowsServerName\scripts$\vFileName.sql'

What does work from MS SQL 2012 is this:

exec xp_cmdshell 'sqlplus.exe user/password@oracleservername @E:\scripts\vFileName.sql'

Is there a way to use the server name? Going forward the number of one offs like this will grow and we would like to reference the server name in the path. Servername\folder\script.sql is much better than E:\folder\script.sql especially 2-3yrs from now when I'm trouble shooting.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2015
Added on May 13 2015
6 comments
1,722 views