Solved

Connecting to ORACLE as SYS User

Posted on 2006-06-20
2
1,016 Views
Last Modified: 2013-12-12
This may be a simple one, but I need an answer quickly.

What I need is a way of connecting to a database as a SYSDBA. On the command line I would connect as "SYS/SYS@db.world AS SYSDBA".

Is this possible in PHP?

Cheers,

AndyP
0
Comment
Question by:apellew
  • 2
2 Comments
 
LVL 40

Accepted Solution

by:
RQuadling earned 500 total points
ID: 16941850
1 - Set the PHP.INI file (or equiv) to oci8.privileged_connect to OCI_SYSDBA. This has been available since PHP V5.1.2
2 - Using the oci_pconnect/oci_connect/oci_new_connect functions, the 5th parameter has an impact.

From the PHP Manual ...

Parameter session_mode is available since version 1.1 and accepts the following values: OCI_DEFAULT, OCI_SYSOPER and OCI_SYSDBA. If either OCI_SYSOPER or OCI_SYSDBA were specified, oci_xxxxconnect() will try to establish privileged connection using external credentials. Privileged connections are disabled by default. To enable them you need to set oci8.privileged_connect to On.

I don't know how you define the external credentials.



0
 
LVL 40

Expert Comment

by:RQuadling
ID: 17106948
Did this do the trick? In future, if you need more help, please supply more feedback. We all want to give the best answer we can to get good grades.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now