|
| | 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 | | | | | | | | |
|
| | ld: fatal: file /dev/zero: mmap anon failed
If you get the following error while installing Oracle database server software on SUN Solaris, chances are you're out of swap space or there is not enough RAM:
ld: fatal: file /dev/zero: mmap anon failed
Use these utilities to check the swap space:
swap -s
df -k /tmp
Either get your Unix administrator to add ... | |  More... 04/09/09 | | | | | | | | |
|
| | Set NLS parameter for session in logon trigger
If you are trying to run something like ALTER SESSION SET in logon trigger you will get ORA-04092 or if you are trying to do it with DBMS_SESSION you will get ORA-06512.
The solution is to create a procedure and then call procedure from the trigger i.e.:
--
-- procedure to set NLS_DATE_FORMAT ... | |  More... 03/31/09 | | | | | | | | |
|
|
|
Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 >> |