How to create a new user in Oracle SQL Plus?

But, we do have the password and user expiry time feature on SQL Plus software and we need to disable that thing, else you can’t login to your SQL Plus scott account. Same thing happened with me and I was Googling in order to find our the easiest and best ways to make scott work or at least login to the SQL Plus software as a Database Admin and create a new user.

I tried couple of methods and I’d like to share the simple process that helps you to create new user.

I tried to login to my SQL Plus account after long time with the default user login credentials scott(username) and tiger(password). Because of inactivity since long time, my account with user ID scott got locked and I’m not sure how to login. It’s displaying the error as “account locked”. In the below image, I’ve already set and unlocked my account, so it’s showing different error.

So, now you need to login to the software as the System’s Database Administrator, which can be done as follows :

Enter user-name : connect / as SYSDBA (as shown in the image below).

Now you are logged in as Database System Administrator.

Next, you need to create new user, which is pretty easy process as well, just follow the below syntax and you’ll be done :

SQL>create user <username that you want to set> identified by <password you want to set>;

User Created.

but again after user is created, you need to grant few rights for him/her.

SQL>grant connect,resource to <created username>;

Grant Succeeded.

Now, just close the application and you can login back with your new username and password.

Siddartha is a Blogger from India. He is currently working as a Java Front End developer and he loves writing about tutorials, technology, algorithm, etc. You can follow him on Twitter | Facebook | Google+.
You can subscribe to Programming Unit RSS Feed or Email Norifications.