Monday, June 18, 2007

Usefull Oracle commands

1) Creating table space
ssh -X -Y oracle@host
oemapp dbastudio

then use the GUI to create the table space

2) Create database
ssh -X -Y oracle@host
dbca

then use the GUI to create the database

Note: -X -Y options needed for get the GUI

5 comments:

Unknown said...

Database creation procedure as follows;

Create the table space under the Database. Use 'oemapp dbastudio' and create the table space under the created database.

Then log into Oracle prompt as follows;

sqlplus oracle_username/password@db_name

eg: sqlplus system/beyondm@suntel

Then create a user with following commands;

drop user @db.users.owner.username@ cascade;
create user @db.users.owner.username@
identified by @db.users.owner.password@
default tablespace @db.tablespace.default@
temporary tablespace @db.tablespace.temporary@;

grant connect, resource to @db.users.owner.username@;
grant query rewrite to @db.users.owner.username@;

Unknown said...

If you get "ORA-27123: unable to attach to shared memory segment"

ORA-27123: unable to attach to shared memory segment.
I temporarely increased the shmmax setting for the kernel by executing the following command:

$ su - root
# cat /proc/sys/kernel/shmmax
33554432
# echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax
# cat /proc/sys/kernel/shmmax
1073741824
It is recommended to increase the shmmax setting permanently for Oracle. For more information, see Setting Shared Memory.

Unknown said...

Oracle views see...

http://www.psoug.org/reference/views.html

Unknown said...

Usefull oracle guide see...

http://www.lc.leidenuniv.nl/awcourse/oracle/nav/docindex.htm

Unknown said...

Log into the Oracle prompt
---------------------------
1) Log as oracle user
2) sqlplus system/password@db_name

Describe the table schema
-------------------------
1. Log into oracle prompt
2. Execute desc table_name;