| | Syntax to crosscheck archive logs in RMAN
Sometimes you end up with missing archive logs for whatever reason, and RMAN backup fails. Running crosscheck will fix the problem.
$ rman
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Sep 1 10:05:02 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN> connect target /
connected to target database: [SID] (DBID=[DBID])
RMAN> crosscheck ... | | More... 09/01/10 | | | | | | | | |
|
|
| | test
ops$oracle.PONP> @?/rdbms/admin/addmrpt
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3392966083 PONP 1 PONP
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB ... | | More... 06/16/10 | | | | | | | | |
|
| | ADDM
ops$oracle.PONP> @?/rdbms/admin/addmrpt
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3392966083 PONP 1 PONP
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB ... | | More... 06/16/10 | | | | | | | | |
|
|
| | Display system calls for a program on Unix
You can use truss to view system calls for a specific program, for example:
truss ls
execve("/usr/bin/ls", 0xFFBFFB1C, 0xFFBFFB24) argc = 1
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
resolvepath("/usr/bin/ls", "/usr/bin/ls", 1023) = 11
stat("/usr/bin/ls", 0xFFBFF8E0) = 0
open("/var/ld/ld.config", O_RDONLY) ... | | More... 02/26/10 | | | | | | | | |
|
| | See the environment variables for a process when it was started
pargs -e
Example:
ps -ef | grep tnslsnr
oracle 20083 11285 Dec 30 ? 17:22
/apps/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
pargs -e 20083
20083: /apps/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
envp[0]: _=/apps/oracle/product/10.2.0/db_1/bin/lsnrctl
envp[1]: MANPATH=/usr/share/man
envp[2]: SSH_TTY=/dev/pts/1
envp[3]:
PATH=/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/proc/bin:/usr/local/bin:/usr/bin/nsr:/opt/soe/local/bin:/apps/oracle/local/bin:/apps/oracle/product/10.2.0/db_1/bin
envp[4]: ORACLE_BASE=/apps/oracle
envp[5]: AWK=/usr/bin/nawk
envp[6]: ORACLE_PATH=.:/apps/oracle/local/bin
envp[7]: EDITOR=vi
envp[8]: LOGNAME=oracle
envp[9]: MAIL=/usr/mail/oracle
envp[11]: USER=oracle
envp[12]: TNS_ADMIN=/apps/oracle/net/admin
envp[13]: ORA_NLS10=/apps/oracle/product/10.2.0/db_1/nls/data
envp[15]: SHELL=/bin/ksh
envp[16]: ... | | More... 01/04/10 | | | | | | | | |
|
| | How to enable flashback database in Oracle
-- Set flashback database parameters
alter system set db_recovery_file_dest_size=10G;
alter system set db_recovery_file_dest='/dir/fra';
-- value in minutes
alter system set db_flashback_retention_target=2160;
-- Turn flashback on for the database
startup mount;
alter database flashback on;
alter database open;
-- Check if flashback is enabled
select flashback_on from v$database;
select * from v$flashback_database_log;
--
--
-- To create a guaranteed restore point
create restore point RESTORE_POINT guarantee ... | | More... 12/04/09 | | | | | | | | |
|
|
| | Script to find invalid synonyms
select *
from dba_synonyms s
where table_owner not in ('SYS', 'SYSTEM')
and db_link is NULL
and table_name not in
(select object_name
from dba_objects o
where o.object_name = s.table_name
and o.owner = s.table_owner
... | | More... 07/09/09 | | | | | | | | |
|
Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 >> |