A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/sql/oracle-database-grant-privileges-to-a-user-in-sql-command-line/ below:

Oracle DataBase - Grant Privileges to a User in SQL Command Line

Oracle DataBase - Grant Privileges to a User in SQL Command Line

Last Updated : 23 Jul, 2025

Oracle Database is a robust and widely utilized relational database management system (RDBMS) recognized for its scalability, advanced features and performance optimization. Its architecture supports complex queries and large datasets also making it a popular choice for organizations of all sizes.

In this article, We will learn about key factors contributing to the effectiveness of Oracle Database including its high performance, security features, data integrity mechanisms and high availability.

Factors of Oracle DataBase

Oracle Database is a powerful and widely used relational database management system (RDBMS) that is known for its robustness, scalability, and advanced features. Several key factors contribute to its popularity and effectiveness:

1. High Performance 2. Scalability 3. Security Features 4. Data Integrity Important Points of Oracle DataBase

Here are some important points to consider about Oracle Database:

1. Relational Database Management System (RDBMS) 2. High Availability 3. Scalability 4. Security Features 5. Data Integrity 6. Backup and Recovery 7. Multi-Model Database Steps to Grant Privileges to a User in SQL Command Line

Step 1: Open the SQL Command Line by typing run in the Search toolbar and selecting the option of Run as administrator. The SQL Command Line opens.

Step 2: The following screen appears after clicking "Yes" on the dialog box which appears after step 1.

Output:

Step 3: Connect to the oracle database using CONNECT command.

Query:

CONNECT

Hit ENTER after typing the command.

Output:

Step 4: Login using the default user i.e. the SYSTEM user. So type in the user-name as SYSTEM and then type in the correct password and hit Enter. 

Note: The password for the SYSTEM user is set during Oracle installation.

Output:

Step 5: Now, we create a new user named GFG.

Syntax:

CREATE USER NEW_USER_NAME INENTIFIED BY PASSWORD;

Query:

CREATE USER NEWUSERGFG INENTIFIED BY GFGQWERTY;

Note: Here, we set the password as GFGQWERTY.

Output:

Step 6: Now, we close this session and reopen the SQL Command Line using Steps 1 and 2. We try to CONNECT to the session using NEWUSERGFG user-name. An error is thrown as the user NEWUSERGFG doesn't have the privilege to start a session.

Query:

CONNECT

Output:

Step 7: Again connect using SYSTEM user-name. Now we shall enable all the privileges to NEWUSERGFG users.

Syntax:

GRANT ALL PRIVILEGES TO NEW_USER_NAME;

Query:

GRANT ALL PRIVILEGES TO NEWUSERGFG;

Output:

Step 8: We test the last step by re-attempting to connect using NEWUSERGFG user-name.

Query:

CONNECT

Note: The connection is successfully established this time and Connected is displayed.

Output:

Step 9: Create a table named NEWSAMPLETABLE containing 2 columns i.e. ID and NAME. This further establishes a successful connection.

Query:

CREATE TABLE NEWSAMPLETABLE(
ID INT,
NAME VARCHAR2(10)
);

Output:

Conclusion

In summary, Oracle Database's powerful performance, strong security measures, and commitment to data integrity make it a top-tier option for organizations of all sizes. Its comprehensive features and user management capabilities ensure that businesses can efficiently manage their data while maintaining strict access controls.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4