Solved

Connecting to ORACLE as SYS User

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 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…

708 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

14 Experts available now in Live!

Get 1:1 Help Now