Oracle Basic Learning 2--oracle login with three authentication mechanisms

Source: Internet
Author: User
Tags access database sqlplus

first , Oracle installs with three default users

? Sys: The owner of the database object. Permissions are highest. Password can be changed during installation (password management)

? System: Database administrator, password as manager

? Scott: A regular user, password for Tiger

see three different authentication mechanisms for connecting to Oracle

? Operating system verification (see below for specific explanations)

? Password file validation

? Database validation

Note: The first two are applicable to system users, for example:Sys,system , etc.; the last one is for normal users. Analogy:Scott.

look at the startup process of Oracle

? Start "Listen" first

? The system user then enters the sqlplus without logging in (Nolog) and connects to the database

? The database instance is then started (by the system user)

The conversion to commands is as follows:

? lsnrctlStart (Start monitoring)

? sqlplus/nolog(no login)

Conn Sys/oracle as SYSDBA(System user connected to database)

? Starup(Start db instance)

  

NOTE:conn sys/oracle as Sysdba in the "/" before the sys is username. The oracel after "/" is password. sysdba means "system database administrator", with such an identity, in fact, there is no need to Usernamepassword to connect to Oracle, because such an identity connection will be used in the above "Operating system Authentication" method, Username and password are not validated at all.

So we can not write Usernamepassword:conn/as sysdba("/" must not be omitted ), can also be casually written:Conn KB/LBG as Sysdba there's no problem.

The "Operating system verification" is explained here. It's the equivalent of Windows authentication when we connect to SQL Server , because Windows system administrators have the impression that Oracle,SQL Server The super administrator, for example, is verified as follows:

Turn on Computer Management- -> Local Users and Groups- -> groups- ->ORA_DBA to see if the group members include the currently logged-on Windows system administrator. For example, (my current Login object is v-wangzhip)

  

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd2fuzzm3oti3ntyxna==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/center ">

If present, it represents the Windows system administrator. is the DBA(database administrator) for Oracle . So do not write username, password is able to connect to Oracle by default , assuming that this administrator is removed from ora_dba . Then conn/as the SYSDBA connection will prompt "insufficient permissions."

Summary

 ? System User Connection Oracle:sqlplus Username/password as sysdba (user name password can be arbitrarily specified, can also not be specified, such as: Sqlplus/as sysdba or Sqlplus sys/as Sysdba or Sqlplus sys/admin as SYSDBA)

? Normal user connection Oracle:sqlplus Username/password (user name, password must be specified such as: Sqlplus Scott/tiger)

Suppose you need to specify the service name (global database name) of the database you want to access:

? Sqlplus Username/[email Protected]_service_name

such as: Sqlplus scott/[email protected]

Suppose you need to access database services on other machines:

? Sqlplus username/[email protected]//host:port/sid

host--Specifies the host name or IP address of the database server computer.

port--Specifies the listener port on the database server.

sid--Specifies the service name of the database to be visited.

Attention:

? SYS and system need to log in with SYSDBA

? After entering Sqlplus, you can use Conn to connect to other users, such as: Conn Sys/admin as SYSDBA or conn Scott/tiger

Oracle Basic Learning 2--oracle login with three authentication mechanisms

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.