https://apt-lnx-tst-01.site:1158/em/console/aboutApplication
Logs are generated in directory /opt/oracle/product/10.2/apt-lnx-tst-01.site_orcl/sysman/log
INFO: >>>>>>>>>>> The Database Control URL is https://apt-lnx-tst-01.site:1158/em <<<<<<<<<<<
http://apt-lnx-tst-01.site:5560/isqlplus
http://apt-lnx-tst-01.site:5560/isqlplus/dba
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> vi /opt/oracle/product/10.2/apt-lnx-tst-01.site_orcl/sysman/config/emd.properties
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> vi /opt/oracle/product/10.2/apt-lnx-tst-01.site_orcl/sysman/config/emd.properties
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://apt-lnxtst-01.aptus.co.uk:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://apt-lnxtst-01.aptus.co.uk:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ...................... started.
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2/apt-lnxtst-01.tus.co.uk_orcl/sysman/log
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> emca -config dbcontrol db -repose recreate
STARTED EMCA at 14-Oct-2010 16:35:45
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /opt/oracle/product/10.2
Database hostname ................ apt-lnxtst-01.tus.co.uk
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
14-Oct-2010 16:36:11 oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2/cfgtoollogs/emca/orcl/emca_2010-10-14_04-35-45-PM.log.
14-Oct-2010 16:36:12 oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
14-Oct-2010 16:36:21 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
14-Oct-2010 16:37:09 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
14-Oct-2010 16:37:09 oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
14-Oct-2010 16:38:46 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
14-Oct-2010 16:38:46 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://apt-lnxtst-01.tus.co.uk:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at 14-Oct-2010 16:38:46
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> vi /opt/oracle/product/10.2/apt-lnx-tst-01.site_orcl/sysman/config/emd.properties
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> emca -config dbcontrol db -repos recreate
STARTED EMCA at 14-Oct-2010 16:42:11
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /opt/oracle/product/10.2
Database hostname ................ apt-lnxtst-01.tus.co.uk
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
14-Oct-2010 16:42:34 oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2/cfgtoollogs/emca/orcl/emca_2010-10-14_04-42-11-PM.log.
14-Oct-2010 16:42:35 oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
14-Oct-2010 16:42:43 oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
14-Oct-2010 16:44:19 oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
14-Oct-2010 16:44:19 oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
14-Oct-2010 16:47:33 oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
14-Oct-2010 16:47:38 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
14-Oct-2010 16:48:33 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
14-Oct-2010 16:48:33 oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
14-Oct-2010 16:50:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
14-Oct-2010 16:50:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://apt-lnxtst-01.aptus.co.uk:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at 14-Oct-2010 16:50:12
orapwd FILE=filename PASSWORD=password ENTRIES=max_users
oracle@apt-lnxtst-01:/opt/oracle/product/10.2/cfgtoollogs/emca> emca -config dbcontrol db -repos recreate
STARTED EMCA at 14-Oct-2010 16:42:11
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /opt/oracle/product/10.2
Database hostname ................ apt-lnxtst-01.aptus.co.uk
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
14-Oct-2010 16:42:34 oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2/cfgtoollogs/emca/orcl/emca_2010-10-14_04-42-11-PM.log.
14-Oct-2010 16:42:35 oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
14-Oct-2010 16:42:43 oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Search This Blog
Total Pageviews
Monday, 14 March 2011
Friday, 11 March 2011
Unix AT command
unix at command
unix at
to set Unix AT job
bash-3.00$ at -t 201103111805 <<< this a time and date
at> cd /apps/documentum/dba/log/0000717c/sysadmin/dm_clean
at> nohup time iapi ccprod1 -Udmadmin -Pwhocares -RDMCleanDoc.txt >DMCleanDocAnuj.out&
at> .
at>
commands will be executed using /usr/bin/bash
job 1299866700.a at Fri Mar 11 18:05:00 2011
ctrl D <<<<< for end of at command
this is a command "iapi cccprod1 -Udmadmin -Pwhocares -RDMCleanDoc.txt >DMCleanDocAnuj.out& "
to list Unix AT job in Unix
-bash-3.00$ at -l
1299866400.a Fri Mar 11 18:00:00 2011
1299866700.a Fri Mar 11 18:05:00 2011
to remove AT job
-bash-3.00$ at -r 1299866400.a
unix at
to set Unix AT job
bash-3.00$ at -t 201103111805 <<< this a time and date
at> cd /apps/documentum/dba/log/0000717c/sysadmin/dm_clean
at> nohup time iapi ccprod1 -Udmadmin -Pwhocares -RDMCleanDoc.txt >DMCleanDocAnuj.out&
at> .
at>
commands will be executed using /usr/bin/bash
job 1299866700.a at Fri Mar 11 18:05:00 2011
ctrl D <<<<< for end of at command
this is a command "iapi cccprod1 -Udmadmin -Pwhocares -RDMCleanDoc.txt >DMCleanDocAnuj.out& "
to list Unix AT job in Unix
-bash-3.00$ at -l
1299866400.a Fri Mar 11 18:00:00 2011
1299866700.a Fri Mar 11 18:05:00 2011
to remove AT job
-bash-3.00$ at -r 1299866400.a
Friday, 4 March 2011
How to review Oracle patch log file ...
To put line number on this file ...
awk '{print NR $0}' patch.10.2.0.4.log >patch10_number.log
grep -i "error" patch10_number.log >patch_err.log
awk '{print NR $0}' patch_err.log|grep -i "error" >test
awk '{print NR $0}' patch.10.2.0.4.log >patch10_number.log
grep -i "error" patch10_number.log >patch_err.log
awk '{print NR $0}' patch_err.log|grep -i "error" >test
Thursday, 3 March 2011
Is session Tracing on for Oracle session ?
sql_trace—Shows- (TRUE/FALSE) if SQL tracing has been enabled in the session
sql_trace_waits- If session tracing is enabled, you can have the trace write wait information to the trace file;
sql_trace_binds- If the session uses bind variables, This column shows TRUE/FALSE.
SQL> select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds
from v$session where username = 'SCOTT' ;
SID SERIAL# SQL_TRAC SQL_T SQL_T
---------- ---------- -------- ----- -----
42 8482 DISABLED FALSE FALSE
From this query we notice that tracing is not enabled in the session with SID 42 and Serial# 8482
Now, enable tracing of wait events, but not of bind variables.
Oracle package dbms_monitor to enable tracing.
begin
dbms_monitor.session_trace_enable (
session_id => 42,
serial_num => 8482,
waits => true,
binds => false
);
end;
/
select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session
where username = 'SCOTT' ;
SID SERIAL# SQL_TRAC SQL_T SQL_T
---------- ---------- -------- ----- -----
42 8482 ENABLED TRUE FALSE
View V$SESSION is populated only if the procedure session_trace_enable
in the package dbms_monitor is used to enable tracing,
not by alter session set sql_trace = true or setting the event 10046
sql_trace_waits- If session tracing is enabled, you can have the trace write wait information to the trace file;
sql_trace_binds- If the session uses bind variables, This column shows TRUE/FALSE.
SQL> select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds
from v$session where username = 'SCOTT' ;
SID SERIAL# SQL_TRAC SQL_T SQL_T
---------- ---------- -------- ----- -----
42 8482 DISABLED FALSE FALSE
From this query we notice that tracing is not enabled in the session with SID 42 and Serial# 8482
Now, enable tracing of wait events, but not of bind variables.
Oracle package dbms_monitor to enable tracing.
begin
dbms_monitor.session_trace_enable (
session_id => 42,
serial_num => 8482,
waits => true,
binds => false
);
end;
/
select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session
where username = 'SCOTT' ;
SID SERIAL# SQL_TRAC SQL_T SQL_T
---------- ---------- -------- ----- -----
42 8482 ENABLED TRUE FALSE
View V$SESSION is populated only if the procedure session_trace_enable
in the package dbms_monitor is used to enable tracing,
not by alter session set sql_trace = true or setting the event 10046
Friday, 25 February 2011
Oracle text index re create script
spool index_scripts.lst
set long 2000000000
set head off
set pagesize 10000
select ctx_report.create_index_script ('username.text_index_name') from dual;
select ctx_report.describe_index('username.text_index_name') FROM DUAL;
spool off
set long 2000000000
set head off
set pagesize 10000
select ctx_report.create_index_script ('username.text_index_name') from dual;
select ctx_report.describe_index('username.text_index_name') FROM DUAL;
spool off
netstat linux
apt-lnxtst-01:/etc/init.d # netstat -planet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:8192 0.0.0.0:* LISTEN 0 9282 -
tcp 0 0 0.0.0.0:8193 0.0.0.0:* LISTEN 0 9271 -
tcp 0 0 0.0.0.0:8194 0.0.0.0:* LISTEN 0 9272 -
tcp 0 0 0.0.0.0:38115 0.0.0.0:* LISTEN 0 9574 -
tcp 0 0 1.1.1.1:389 0.0.0.0:* LISTEN 0 9421 -
tcp 0 0 192.168.2.232:389 0.0.0.0:* LISTEN 0 9420 -
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 7005 26955 -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
apt-lnxtst-01:/etc/init.d # netstat -t –s
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 apt-lnxtst-01.apt:38115 apt-lnxtst-01.apt:11927 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 192.168.2.106:4791 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:40562 192.168.2.106:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 apt-lnxtst-01.apt:63080 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:11927 apt-lnxtst-01.apt:38115 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:63080 apt-lnxtst-01.aptu:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh apt-amd-02.tus.:52499 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh amd64-05.tus.co:58674 ESTABLISHED
netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq
apt-lnxtst-01:/etc/init.d # netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
1 192.168.2.253
2 192.168.2.106
2 192.168.2.251
4 192.168.2.232
5 192.168.2.240
14
31 0.0.0.0
apt-lnxtst-01:/etc/init.d # netstat -anp | grep 80
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN -
tcp 0 0 192.168.2.232:8194 192.168.2.232:63080 ESTABLISHED -
tcp 0 0 192.168.2.232:63080 192.168.2.232:8194 ESTABLISHED -
tcp 0 0 :::7780 :::* LISTEN -
tcp 0 0 :::80 :::* LISTEN -
tcp 1 0 192.168.2.232:143 192.168.2.240:58038 CLOSE_WAIT -
unix 2 [ ACC ] STREAM LISTENING 8041 - /var/run/nscd/socket
unix 3 [ ] STREAM CONNECTED 188180 -
unix 3 [ ] STREAM CONNECTED 9280 -
unix 2 [ ] DGRAM 8055 -
unix 2 [ ] DGRAM 8040 -
unix 2 [ ] DGRAM 8039 -
unix 3 [ ] STREAM CONNECTED 6806 -
-a, --all, --listening display all sockets (default: connected)
-n, --numeric don't resolve names
-p, --programs display PID/Program name for sockets
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:8192 0.0.0.0:* LISTEN 0 9282 -
tcp 0 0 0.0.0.0:8193 0.0.0.0:* LISTEN 0 9271 -
tcp 0 0 0.0.0.0:8194 0.0.0.0:* LISTEN 0 9272 -
tcp 0 0 0.0.0.0:38115 0.0.0.0:* LISTEN 0 9574 -
tcp 0 0 1.1.1.1:389 0.0.0.0:* LISTEN 0 9421 -
tcp 0 0 192.168.2.232:389 0.0.0.0:* LISTEN 0 9420 -
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 7005 26955 -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
apt-lnxtst-01:/etc/init.d # netstat -t –s
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 apt-lnxtst-01.apt:38115 apt-lnxtst-01.apt:11927 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 192.168.2.106:4791 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:40562 192.168.2.106:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 apt-lnxtst-01.apt:63080 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:11927 apt-lnxtst-01.apt:38115 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:63080 apt-lnxtst-01.aptu:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh apt-amd-02.tus.:52499 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh amd64-05.tus.co:58674 ESTABLISHED
netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq
apt-lnxtst-01:/etc/init.d # netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
1 192.168.2.253
2 192.168.2.106
2 192.168.2.251
4 192.168.2.232
5 192.168.2.240
14
31 0.0.0.0
apt-lnxtst-01:/etc/init.d # netstat -anp | grep 80
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN -
tcp 0 0 192.168.2.232:8194 192.168.2.232:63080 ESTABLISHED -
tcp 0 0 192.168.2.232:63080 192.168.2.232:8194 ESTABLISHED -
tcp 0 0 :::7780 :::* LISTEN -
tcp 0 0 :::80 :::* LISTEN -
tcp 1 0 192.168.2.232:143 192.168.2.240:58038 CLOSE_WAIT -
unix 2 [ ACC ] STREAM LISTENING 8041 - /var/run/nscd/socket
unix 3 [ ] STREAM CONNECTED 188180 -
unix 3 [ ] STREAM CONNECTED 9280 -
unix 2 [ ] DGRAM 8055 -
unix 2 [ ] DGRAM 8040 -
unix 2 [ ] DGRAM 8039 -
unix 3 [ ] STREAM CONNECTED 6806 -
-a, --all, --listening display all sockets (default: connected)
-n, --numeric don't resolve names
-p, --programs display PID/Program name for sockets
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Mysql database error
apt-lnxtst-01:/etc/init.d # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
check any other mysql database is running on port 3306 or not ?????????
(3306 is the default port for mysql)
lnxtst:/etc/init.d # netstat -planet|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
lnxtst:/etc/init.d # su - mysql
mysql@apt-lnxtst-01:~> /etc/init.d/mysql start
Starting service MySQL
apt-lnxtst-01:/etc/init.d # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
check any other mysql database is running on port 3306 or not ?????????
(3306 is the default port for mysql)
lnxtst:/etc/init.d # netstat -planet|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
lnxtst:/etc/init.d # su - mysql
mysql@apt-lnxtst-01:~> /etc/init.d/mysql start
Starting service MySQL
Subscribe to:
Posts (Atom)
Oracle DBA
anuj blog Archive
- ► 2011 (362)
