if you get X11 connnection refused issue when you try to nohup start opmanager, the cause might you set up X11 forwording in PUTY connection.
Unselect X11 forwording and start opmanager. It should work fine.
Thursday, December 29, 2011
Friday, December 16, 2011
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
What are the symptoms?
The local_listener parameter has been set, the listener is running, but when attempting to start the instance an ORA-00119 is reported:
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LIST_ANDY'
Why is this happening?
Oracle only checks for listeners running on the default port (1521). It would have to spend all day trying every possible port number otherwise. You'll need to give it some help to find your listener.
How do I fix it?
Simply add an entry to the servers tnsnames.ora pointing at the listener. For example my listener 'LIST_ANDY' is running on port 3801, so I would add the following entry to my tnsnames:
LIST_ANDY = (ADDRESS = (PROTOCOL = TCP)(HOST = fermat)(PORT = 3801))
Test it with tnsping:
tnsping
Then try starting your instance again - it should work now.
reference:
http://www.shutdownabort.com/errors/ORA-00119.php
The local_listener parameter has been set, the listener is running, but when attempting to start the instance an ORA-00119 is reported:
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LIST_ANDY'
Why is this happening?
Oracle only checks for listeners running on the default port (1521). It would have to spend all day trying every possible port number otherwise. You'll need to give it some help to find your listener.
How do I fix it?
Simply add an entry to the servers tnsnames.ora pointing at the listener. For example my listener 'LIST_ANDY' is running on port 3801, so I would add the following entry to my tnsnames:
LIST_ANDY = (ADDRESS = (PROTOCOL = TCP)(HOST = fermat)(PORT = 3801))
Test it with tnsping:
tnsping
Then try starting your instance again - it should work now.
reference:
http://www.shutdownabort.com/errors/ORA-00119.php
Wednesday, December 14, 2011
dbms_stats
Table statistics
Number of rows
Number of blocks
Average row length
Column statistics
Number of distinct values (NDV) in column
Number of nulls in column
Data distribution (histogram)
Extended statistics
Index statistics
Number of leaf blocks
Levels
Clustering factor
System statistics
I/O performance and utilization
CPU performance and utilization
13.6.1 Statistics on Tables, Indexes and Columns
Statistics on tables, indexes, and columns are stored in the data dictionary. To view statistics in the data dictionary, query the appropriate data dictionary view (USER, ALL, or DBA). These DBA_* views include the following:
DBA_TABLES
DBA_OBJECT_TABLES
DBA_TAB_STATISTICS
DBA_TAB_COL_STATISTICS
DBA_TAB_HISTOGRAMS
DBA_TAB_COLS
DBA_COL_GROUP_COLUMNS
DBA_INDEXES
DBA_IND_STATISTICS
DBA_CLUSTERS
DBA_TAB_PARTITIONS
DBA_TAB_SUBPARTITIONS
DBA_IND_PARTITIONS
DBA_IND_SUBPARTITIONS
DBA_PART_COL_STATISTICS
DBA_PART_HISTOGRAMS
DBA_SUBPART_COL_STATISTICS
DBA_SUBPART_HISTOGRAMS
Procedure Collects
GATHER_INDEX_STATS
Index statistics
GATHER_TABLE_STATS
Table, column, and index statistics
GATHER_SCHEMA_STATS
Statistics for all objects in a schema
GATHER_DICTIONARY_STATS
Statistics for all dictionary objects
GATHER_DATABASE_STATS
Statistics for all objects in a database
Number of rows
Number of blocks
Average row length
Column statistics
Number of distinct values (NDV) in column
Number of nulls in column
Data distribution (histogram)
Extended statistics
Index statistics
Number of leaf blocks
Levels
Clustering factor
System statistics
I/O performance and utilization
CPU performance and utilization
13.6.1 Statistics on Tables, Indexes and Columns
Statistics on tables, indexes, and columns are stored in the data dictionary. To view statistics in the data dictionary, query the appropriate data dictionary view (USER, ALL, or DBA). These DBA_* views include the following:
DBA_TABLES
DBA_OBJECT_TABLES
DBA_TAB_STATISTICS
DBA_TAB_COL_STATISTICS
DBA_TAB_HISTOGRAMS
DBA_TAB_COLS
DBA_COL_GROUP_COLUMNS
DBA_INDEXES
DBA_IND_STATISTICS
DBA_CLUSTERS
DBA_TAB_PARTITIONS
DBA_TAB_SUBPARTITIONS
DBA_IND_PARTITIONS
DBA_IND_SUBPARTITIONS
DBA_PART_COL_STATISTICS
DBA_PART_HISTOGRAMS
DBA_SUBPART_COL_STATISTICS
DBA_SUBPART_HISTOGRAMS
Procedure Collects
GATHER_INDEX_STATS
Index statistics
GATHER_TABLE_STATS
Table, column, and index statistics
GATHER_SCHEMA_STATS
Statistics for all objects in a schema
GATHER_DICTIONARY_STATS
Statistics for all dictionary objects
GATHER_DATABASE_STATS
Statistics for all objects in a database
Thursday, December 8, 2011
afterlogin trigger
CREATE OR REPLACE TRIGGER afterlogon
AFTER LOGON on DATABASE
declare
userprofile varchar2(30);
os_user varchar2(30);
host varchar2(30);
user varchar2(30);
ip_addr varchar2(30);
BEGIN
select profile into userprofile from dba_users where username = sys_context('userenv','session_user');
select sys_context('userenv','os_user') into os_user from dual;
select sys_context('userenv','host') into host from dual;
select sys_context('userenv','session_user') into user from dual;
select sys_context('userenv','ip_address') into ip_addr from dual;
IF userprofile = 'XXCUST'
and ip_addr like '192.168.%' THEN
--insert into sys.tetb3 values(userprofile,os_user,user,host,ip_addr,'R');
--commit;
RAISE_APPLICATION_ERROR (-20001, 'You are not allowed to log into service account from this machine');
END IF;
END;
/
AFTER LOGON on DATABASE
declare
userprofile varchar2(30);
os_user varchar2(30);
host varchar2(30);
user varchar2(30);
ip_addr varchar2(30);
BEGIN
select profile into userprofile from dba_users where username = sys_context('userenv','session_user');
select sys_context('userenv','os_user') into os_user from dual;
select sys_context('userenv','host') into host from dual;
select sys_context('userenv','session_user') into user from dual;
select sys_context('userenv','ip_address') into ip_addr from dual;
IF userprofile = 'XXCUST'
and ip_addr like '192.168.%' THEN
--insert into sys.tetb3 values(userprofile,os_user,user,host,ip_addr,'R');
--commit;
RAISE_APPLICATION_ERROR (-20001, 'You are not allowed to log into service account from this machine');
END IF;
END;
/
dbms_scheduler
#create a simple job
# plsql version
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'job1',
job_type => 'PLSQL_BLOCK',
job_action => 'INSERT INTO employees VALUES (7935, ''SALLY'',
''DOGAN'', ''sally.dogan@xyzcorp.com'', NULL, SYSDATE,''AD_PRES'', NULL,
NULL, NULL, NULL);',
start_date => SYSDATE,
repeat_interval => 'FREQ = DAILY; INTERVAL =',
enabled => true);
END;
/
BEGIN
DBMS_SCHEDULER.DROP_JOB('job1');
END;
/
# procedure version.
create or replace procedure job_1
as
begin
DELETE FROM SYS.AUD$
WHERE NTIMESTAMP# < TO_TIMESTAMP (sysdate - 10 ); commit; end del_aud_tab; / BEGIN DBMS_SCHEDULER.CREATE_JOB( job_name => 'job_1',
job_type => 'PLSQL_BLOCK',
job_action => 'begin del_aud_tab; end;',
start_date => SYSDATE,
repeat_interval => 'FREQ = DAILY; INTERVAL =1',
enabled => true);
END;
/
# plsql version
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'job1',
job_type => 'PLSQL_BLOCK',
job_action => 'INSERT INTO employees VALUES (7935, ''SALLY'',
''DOGAN'', ''sally.dogan@xyzcorp.com'', NULL, SYSDATE,''AD_PRES'', NULL,
NULL, NULL, NULL);',
start_date => SYSDATE,
repeat_interval => 'FREQ = DAILY; INTERVAL =',
enabled => true);
END;
/
BEGIN
DBMS_SCHEDULER.DROP_JOB('job1');
END;
/
# procedure version.
create or replace procedure job_1
as
begin
DELETE FROM SYS.AUD$
WHERE NTIMESTAMP# < TO_TIMESTAMP (sysdate - 10 ); commit; end del_aud_tab; / BEGIN DBMS_SCHEDULER.CREATE_JOB( job_name => 'job_1',
job_type => 'PLSQL_BLOCK',
job_action => 'begin del_aud_tab; end;',
start_date => SYSDATE,
repeat_interval => 'FREQ = DAILY; INTERVAL =1',
enabled => true);
END;
/
Friday, December 2, 2011
install flashplayer plugin to firefox on centos linux
1. download rpm from adobe
adobe-release-x86_64-1.0-1.noarch.rpm
2. install it use rpm
rpm -i adobe-release-x86_64-1.0-1.noarch.rpm
3. install flash-plugin use yum
yum install flash-plugin.x86_64
4. restart friefox
you should be good to have flash player plugin on firefox.
reference:
http://digitizor.com/2009/05/19/how-to-get-flash-plugin-to-work-on-firefox-3-for-linux/
adobe-release-x86_64-1.0-1.noarch.rpm
2. install it use rpm
rpm -i adobe-release-x86_64-1.0-1.noarch.rpm
3. install flash-plugin use yum
yum install flash-plugin.x86_64
4. restart friefox
you should be good to have flash player plugin on firefox.
reference:
http://digitizor.com/2009/05/19/how-to-get-flash-plugin-to-work-on-firefox-3-for-linux/
no session created in vncviewer
This issue may be caused by X environment setup on server side
1. check log file:
cat /home/oracle/.vnc/westoracle:1.log
Found below error:
error opening security policy file /usr/lib64/xserver/SecurityPolicy
/home/oracle/.vnc/xstartup: line 9: xsetroot: command not found
/home/oracle/.vnc/xstartup: line 11: xterm: command not found
/home/oracle/.vnc/xstartup: line 12: twm: command not found
Could not init font path element unix/:7100, removing from list!
the problem is missing of xsetroot xterm twm command.
2. install the missing command:
yum install xorg-x11-server-utils-7.1-4.fc6.x86_64 for xsetroot
yum install xterm-215-8.el5_4.1.x86_64 for xterm
yum install xorg-x11-twm-1.0.1-3.1.x86_64 for twm
3. restart vncserver
you should have opened session in vncviewer
reference:
http://www.linuxquestions.org/questions/linux-newbie-8/starting-gnome-session-over-vnc-268828/
http://www.linuxquestions.org/questions/linux-newbie-8/centos-5-3-vnc-problems-802176/
https://forums.oracle.com/forums/thread.jspa?threadID=870033
http://www.linuxquestions.org/questions/fedora-35/could-not-init-font-path-element-unix-7100-removing-from-list-156348/
1. check log file:
cat /home/oracle/.vnc/westoracle:1.log
Found below error:
error opening security policy file /usr/lib64/xserver/SecurityPolicy
/home/oracle/.vnc/xstartup: line 9: xsetroot: command not found
/home/oracle/.vnc/xstartup: line 11: xterm: command not found
/home/oracle/.vnc/xstartup: line 12: twm: command not found
Could not init font path element unix/:7100, removing from list!
the problem is missing of xsetroot xterm twm command.
2. install the missing command:
yum install xorg-x11-server-utils-7.1-4.fc6.x86_64 for xsetroot
yum install xterm-215-8.el5_4.1.x86_64 for xterm
yum install xorg-x11-twm-1.0.1-3.1.x86_64 for twm
3. restart vncserver
you should have opened session in vncviewer
reference:
http://www.linuxquestions.org/questions/linux-newbie-8/starting-gnome-session-over-vnc-268828/
http://www.linuxquestions.org/questions/linux-newbie-8/centos-5-3-vnc-problems-802176/
https://forums.oracle.com/forums/thread.jspa?threadID=870033
http://www.linuxquestions.org/questions/fedora-35/could-not-init-font-path-element-unix-7100-removing-from-list-156348/
Subscribe to:
Posts (Atom)