help connecting to oracle via javascript with osauthent

W

Wyatt

I'm trying to connect to an oracle 10g database with javascript using
os authentication. For now, I'm running the script on the database
host.

Using sql*plus, I can connect with "connect / as sysdba"

this script works
var connectionString = "Provider=OraOLEDB.Oracle;"
+ "Data Source=orcl;"
+ "OSAuthent=0;"
+ "DBA Privilege=SYSDBA;"
+ "User Id=system;"
+ "Password=***;";

var cn = WScript.CreateObject("ADODB.Connection");
cn.Open(connectionString);
cn.Close();

This script does not work, with error:
ORA-01017:invalid username/password; logon denied
var connectionString = "Provider=OraOLEDB.Oracle;"
+ "Data Source=orcl;"
+ "OSAuthent=1;";

var cn = WScript.CreateObject("ADODB.Connection");
cn.Open(connectionString);
cn.Close();

I've tried variations ofthe connectionstring, but get the same error
message.
Am I missing and argument in the connectionstring?
Is there a different method to use?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top