Solved

Connecting to ORACLE as SYS User

Posted on 2006-06-20
2
1,026 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:
Richard Quadling 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: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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

808 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