Solved

Connecting to ORACLE as SYS User

Posted on 2006-06-20
2
1,064 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 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
deprecated mysql extensions 1 53
MySQL - Adding an incremented value to a duplicate string 30 51
htaccess add www, redirect to https, keep query string 17 54
Google Recaptcha 13 51
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
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.

732 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