Useful shortcuts for vi editor

Showing posts with label volume group. Show all posts
Showing posts with label volume group. Show all posts

Monday, 13 October 2014

How to add datafile as logic volume (LV) on the tablespace in Linux?

On linux terminal;
chown -R oracle:dba /dev/my_vg_ora/example01
chown -R oracle:dba /dev/mapper/my_vg_ora-example01
chmod 777 /dev/my_vg_ora
chmod 660 /dev/my_vg_ora/*

$ sqlplus
Enter user-name: sys as sysdba
@sys
to add database file please execute under query as system database role

SQL> ALTER TABLESPACE MYTABLESPACE ADD DATAFILE '/dev/my_vg_ora/example01' size 8000m reuse

To execute the command, make sure the instance is open and the tablespace is online and also check database datafiles;

SELECT * FROM dba_data_files;