Home / Oracle DBA / How to Change in SQL Prompt with your name ?

How to Change in SQL Prompt with your name ?

how to change SQL prompt:

[rootdbcentre5 ~]# su – oracle
[oracle@dbcentre5 ~]$ cd $ORACLE_HOME/sqlplus/admin
[oracle@dbcentre5 admin]$ ls
glogin.sql      libsqlplus.def        plustrce.sql    pupbld.sql
[oracle@dbcentre5 admin]$ vi glogin.sql

set sqlprompt ‘&_user>’    [ text on this script]
— Copyright (c) 1988, 2005, Oracle. All Rights Reserved.

— NAME
— glogin.sql

— DESCRIPTION
— SQL*Plus global login “site profile” file

— Add any SQL*Plus commands here that are to be executed when a
— user starts SQL*Plus, or uses the SQL*Plus CONNECT command.

— USAGE
— This script is automatically run
:wq!

CONNECT TO THE  SYS USER:

[oracle@dbcentre5 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Fri Jul 7 16:30:38 2017

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to an idle instance.

SYS>

lets me check connecting to another user:

SYS>create user sampath identified by sampath;

User created.

SYS>grant connect,resource to sampath;

Grant succeeded.

SYS>conn sampath/sampath
Connected.
SAMPATH>
SAMPATH>

DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.

Check Also

Oracle 10g to 11g Enhancements (Difference between Oracle 10g and 11g)

Difference between Oracle 10g and 11g 1- Enhanced Automatic Memory Management System Oracle 9i automated …

Leave a Reply

Your email address will not be published. Required fields are marked *

DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.
close-link
GET OUR LATEST CONTENT IN YOUR INBOX

SUBSCRIBE 
Your information will never be shared
close-link
Enquiry
Submit
close-link
Sign-up for exclusive content. Be the first to hear about DBA Centre Blogs.
Subscribe