Summary of "linux&oracle" common commands

Source: Internet
Author: User

View database status (normal user login to ensure the database is open state)

Sql> select status from V$instance;

Create User ( new user needs to grant connection permissions to connect to database )

Sql> create user User1 identified by Redhat;

ERROR:
Ora-01045:user USER1 lacks CREATE SESSION privilege; Logon denied
Warning:you is no longer connected to ORACLE.

Sql> Show User
USER is ""
Sql> Conn/as SYSDBA
Connected.

Sql> Grant connect to User1;
Sql> Conn User1/redhat;
Connected.

See which users the system has

Sql> select * from All_users;

Execute the SQL file (path represents the file paths)

Sql> @PATH/filename.sql

Test SQL statement Execution time

Sql>set timing on;

View the current database name

Sql> select name from V$database;

Summary of "linux&oracle" common commands

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.