Oracle Database CMD command creates a new user and connects

Source: Internet
Author: User
Oracle Database CMD command creates a new user and connects ORACLE Configuration Three users of Oracle Connect with Super Admin identity Create a new user Connection Add a database table Delete user Data ORACLE Configuration

-The path where the configuration file is located
C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
-Service-side configuration
Listener.ora
Tnsnames.ora
Use Notepad to open two documents and modify the location:


Modify the file host, you can say localhost or computer name or computer IP address

-Open the Listening service

To enter the admin entry, select the following services:

Above two: Property panel-Startup type: Manual-ok.

To restart the service after the change, click:

Restart the service. Three users of Oracle

-sys User: Super Administrator with the highest privileges, its role is DBA.

-system User: System administrator, except you can not start the instance, the other can operate

-scott: Customer account, normal user's permissions are given by the SYS user or system user. So creating a user and working independently requires authorization to be connected to the Super Administrator identity

C:\Documents and Settings\administrator>sqlplus "/as sysdba"
Create a new user:sql> create user PKR identified by manager;
(user has created.) )

Assign permission:sql> Grant CREATE session to PKR;
(Authorization is successful.) )
Sql> Grant Connect,resource to XG;
(Authorization is successful.) ) Connection

CONNECT:sql> conn username/password; Add a database table

Use the. SQL script file to add a database table:sql> @c;\data.sql;
Delete user Data (for example, file name is Data.sql)

Drop user &1 cascade;

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.