Posts

Showing posts with the label Oracle DBA

Oracle Lock table

 SELECT B.Owner, B.Object_Name, A.Oracle_Username, A.OS_User_Name   FROM V$Locked_Object A, All_Objects B WHERE A.Object_ID = B.Object_ID select * from V$Locked_Object select    c.owner,    c.object_name,    c.object_type,    b.sid,    b.serial#,    b.status,    b.osuser,    b.machine from    v$locked_object a ,    v$session b,    dba_objects c where    b.sid = a.session_id and    a.object_id = c.object_id;

create tablespace with multiple datafiles

CREATE TABLESPACE TBS_DATA     DATAFILE          '/oradata/PCDB/PINSV/tbs_data_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,          '/oradata/PCDB/PINSV/tbs_data_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,             '/oradata/PCDB/PINSV/tbs_data_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G; CREATE TABLESPACE TBS_INDEX      DATAFILE          '/oradata/PCDB/PINSV/tbs_index_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,          '/oradata/PCDB/PINSV/tbs_index_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,             '/oradata/PCDB/PINSV/tbs_index_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G; --windows---- CREATE TABLESPACE TBS_DATA     DATAFILE          'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_data_001.dbf' SI...

impdp & expdp

  directory creation command  CREATE OR REPLACE DIRECTORY bk_directory AS '/data/back'; Export data pump command expdp user/passs@tns schemas=QTAN dumpfile=qtann.dmp logfile=qtannll.log Import data pump command impdp user/pass@tns schemas=QTAN REMAP_SCHEMA=QTAN:VHCL dumpfile=qtann.dmp logfile=qtannimp.log CREATE USER SABUJ IDENTIFIED BY 1121; GRANT UNLIMITED TABLESPACE TO SABUJ ; GRANT CONNECT TO SABUJ; GRANT DBA TO SABUJ; COMMIT; host imp FC/fcc@DITF_RFL fromuser=FC touser=FC file=FC.DMP log=FC.log

ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable. Invalid MIT-MAGIC-COOKIE-1 key

  ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable. Invalid MIT-MAGIC-COOKIE-1 key Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable. root user> xhost+; ora user> EXPORT DISPLAY=:1.0; ora user> xhost+; [root@ritf20 ~]# xhost+ bash: xhost+: command not found... Similar command is: 'xhost' [root@ritf20 ~]# xhost + access control disabled, clients can connect from any host [root@ritf20 ~]# su - orapran Last login: Sat Jun 11 18:13:17 +06 2022 on pts/1 [orap@ritf20 ~]$ export DISPLAY=:1.0; [orap@ritf20 ~]$ xhost + access control disabled, clients can connect from any host