Showing posts with label SqlCl. Show all posts
Showing posts with label SqlCl. Show all posts

Monday, April 12, 2021

Oracle Database sqlcl basics

 Need to connect to an oracle database?


Download Oracle SQLcl


https://www.oracle.com/tools/downloads/sqlcl-downloads.html


Extract the zip


Login using this command


> SQL username@//server:1521/databasename


Show what user you are

SQL> show user


Now check what version of oracle you're on

SQL>  select BANNER from v$version;


Display the instance you're on

SQL> select INSTANCE_NAME, HOST_NAME, VERSION from v$instance;


Check what database you're connected to

SQL> select name from V$database;


List all user accounts

SQL> select * from all_users;