?
Solved

Connecting to ORACLE as SYS User

Posted on 2006-06-20
2
Medium Priority
?
1,107 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 1000 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:Richard Quadling
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

764 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