Note
Server = responder
Client = requester
SQL Developer
+ = not creating an account; just connecting to and using an account already in the DBMS
Finding my IP address
cmd
> ipconfig
192.168.203.15
Granting privileges to my account
grant connect, resource to bcs
Opening my firewall
Start
Control Panel
System and Security
Turn Firewall on or off
Getting your partner's account info
Ask them ( ipconfig )
-> 192.168.203.16 khm
Log in with your partner's account
sqlplus khm/java@192.168.203.16:1521
To recognize a specific space,
you need info on its name, location, size, and owner = tablespace
Creating a specific space (to hold data)
cmd
sqlplus sys/java@localhost:1521 as sysdba;
create tablespace bcs
// name (tablespace name)
datafile ' D:\B_Util\4.Oracle\app\oracle\oradata\XE\bcs.dbf ' size 200M ;
// 'location' // size
create tablespace aaa
// name (tablespace name)
datafile ' D:\B_Util\4.Oracle\app\oracle\oradata\XE\aaa.dbf ' size 20M ;
// 'location' // size
Creating a user and granting privileges on the tablespace created above
create user bcs identified by java
// account // identify // password
default tablespace bcs
// tablespace
quota unlimited on bcs;
// quota // unlimited
// can also be done with alter
alter user bcs identified by java
default tablespace aaa
quota unlimited on bcs;
Deleting an account
drop user bcs cascade;
// account // domino (delete everything related)
Exercise
Log in as your own admin.
Create a tablespace with your partner's initials.
Create an account with your partner's initials and assign the tablespace.
Grant connect and resource privileges.
Connect to your partner's Oracle server with your own initials.
Run select * from all_users;
Textbook p.12
Activate Oracle's built-in account for testing.
Textbook p.17
cmd
admin listener
select * from dba_data_files;
SQL Developer
SELECT *
FROM USER_TABLESPACE;
Check where the hr tablespace is mapped.
SELECT USERNAME
, DEFAULT_TABLESPACE
FROM dba_users;
[Source] Checking tablespaces and users | author: Jung
[Check tablespaces and their sizes]
SELECT TABLESPACE_NAME
, FILE_NAME
, BYTES
FROM dba_data_files;
[Reference] Checking tablespaces and users | author: Jung
