Oracle grants sysdba permissions to users

Source: Internet
Author: User

Log on to Oracle as a sys user,

SQL> grant sysdba to username;

Grant sysdba to username

*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled

First, change the value of the initialization parameter REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE.

If the password file is still missing, use orapwd to create the password file.

$ Orapwd-h
Usage: orapwd file = <fname> password = <password> entries = <users>

Where
File-name of password file (mand ),
Password-password for SYS (mand ),
Entries-maximum number of distinct DBA and OPERs (opt ),
There are no spaces around the equal-to (=) character.

This command is very simple. The password file is usually stored in the $ ORACLE_HOME/dbs directory and the naming rule is orapd + SID,

Orapwd FILE = '/db/oracle/product/10.2.0/db_1/dbs/orapw + SID' PASSWORD = oracle ENTRIES = 5 FORCE = y

Then execute

SQL> grant sysdba to username;

Grant succeeded.

Check

SQL> select * from v $ pwfile_users;

USERNAME SYSDB SYSOP
----------------------------------------
SYS TRUE
* ***** TRUE FALSE

The column of SYSDB is TRUE.

Then you can connect as sysdba.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.