1, Sqlplus in the ordinary user login to Oracle,
How to log in as a normal user:
Sqlplus/nolog
Conn Username/password @ip address/orcl:1521;
This time, want to switch SYS user, conn sys/password @ instance name as SYSDBA; Perform this command to switch to the SYS user. -----The default SYS user's password is change_on_install,system: Manager
2, create the user, under the SYS user, execute
CREATE user test identified by test;
3. Authorization
Grant CONNECT,RESOURCE,DBA to test;
4. If you have forgotten the SYS or system password:
On the database server locally, Sqlplus/as sysdba, connect the database, and then execute:
Alter user system identified by new password;
The user has changed.
sql> alter user SYS identified by new password;
The user has changed.
If the user state is locked, the user needs to be unlocked:
Alter user SYSTEM account unlock;
5. How clients connect to the SYS user of the remote database server:
By default, Oracle 11g R2 does not allow clients to log on remotely with a SYS user, unless you are a remote, directly connected database server operating system, and then switch to Oracle user, Sqlplus/as SYSDA login;
So how does a client implement a SYS or system user that can connect directly to a database remotely?
Alter system set remote_login_passwordfile=exclusive Scope=spfile;
This modification is finished, because it is a static parameter, to restart the database will not take effect!
And then:
Conn sys/password @orcl as Sysdba
If for the sake of system security, we do not want to let the user remotely can log in, then the default settings can be changed back by the following command:
Alter system set Remote_login_passwordfile=none Scope=spfile;
Remember to restart the database configuration to take effect!
Here's what to note:
1. SYS user is a privileged user, Telnet database will use the TCP/IP protocol, this is an insecure protocol, so be sure to pass the password file authentication method, this is his only login path, so you just set the initialization parameters remote_login_passwordfile= None, you can disable SYS telnet to the database.
2. System user is a general user with DBA role, he is authenticated by the database, as long as the database server provides remote services, he can log in, do not know how to prohibit system users Telnet!!!
Oracle Switch User Action--or--sys user password forgotten