Problem Description
Whenever you made an attempt to connect with a higher version Export Data Pump client(expdp) to a lower version database then UDE-00018 error occurs.
Here expdp version 11.1.0.6.0 and you tried to export database 10.2.0.1.0.
C:\>F:\app\Administrator\product\11.1.0\db_1\BIN\expdp.exe arju/a@orcl schemas=arju directory=d dumpfile=test.dmp
Export: Release 11.1.0.6.0 - Production on Tuesday, 03 February, 2009 23:09:00
Copyright (c) 2003, 2007, Oracle. All rights reserved.
UDE-00018: Data Pump client is incompatible with database version 10.2.0.1.0
Similarly, if you made an attempt to connect with a higher version Import Data Pump client to a lower version database then UDI-00018 error returns.
Here impdp version 11.1.0.6.0 and you tried to import data into database 10.2.0.1.0.
C:\>F:\app\Administrator\product\11.1.0\db_1\BIN\impdp.exe arju/a@orcl tables=test directory=d dumpfile=test.dmp
Import: Release 11.1.0.6.0 - Production on Tuesday, 03 February, 2009 23:03:11
Copyright (c) 2003, 2007, Oracle. All rights reserved.
UDI-00018: Data Pump client is incompatible with database version 10.2.0.1.0
Cause of the Problem
With the help of higher version of data pump client either impdp or expdp connect to a lower version database is not supported. If you try to do so either UDI-00018(for import) or UDE-00018 (for export) will occur.
An example for clarification
Example on this post is based on experimental issue and on windows environment. Here
TNSNAMES entry san connect to a database 11g,
TNSNAMES entry orcl connects to a database 10g,
Both 10g and 11g database contains a user named arju with password a.
In 10g database the parameter compatible is set to 10.2.0.1.0
In 11g database the parameter compatible is set to 11.1.0.0.0
Both databases are on the same computer.
Step 01: Connect to 11g database and create directory named d on to windows D: drive.
C:\>sqlplus arju/a@san
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Feb 3 22:37:20 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create directory d as 'd:';
Directory created.
Step 02: Connect to 10g database and create directory named d on to windows D: drive.
C:\>sqlplus arju/a@orcl
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Feb 3 22:37:46 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create directory d as 'd:';
Directory created.
Step 03: On 11g database create a table test and insert one row into it.
C:\>sqlplus arju/a@san
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Feb 3 22:38:17 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table test(a number);
Table created.
SQL> insert into test values(1);
1 row created.
SQL> commit;
Commit complete.
Step 04: Using 11g expdp take a dump of 11g's table test.
C:\>F:\app\Administrator\product\11.1.0\db_1\BIN\expdp.exe arju/a@san tables=test directory=d dumpfile=test.dmp
Export: Release 11.1.0.6.0 - Production on Tuesday, 03 February, 2009 22:39:43
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "ARJU"."SYS_EXPORT_TABLE_01": arju/********@san tables=test directory=d dumpfile=test.dmp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "ARJU"."TEST" 5.007 KB 1 rows
Master table "ARJU"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ARJU.SYS_EXPORT_TABLE_01 is:
D:\TEST.DMP
Job "ARJU"."SYS_EXPORT_TABLE_01" successfully completed at 22:40:20
Step 05: i)Using 10g impdp try to import this dump on to 10g database.
C:\>J:\oracle\product\10.2.0\db_1\BIN\impdp.exe arju/a@orcl directory=d dumpfile=test.dmp tables=test
Import: Release 10.2.0.1.0 - Production on Tuesday, 03 February, 2009 23:02:04
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 2.1 in dump file "d:\test.dmp"
ii)Using 11g impdp try to import this dump on to 10g database.
C:\>F:\app\Administrator\product\11.1.0\db_1\BIN\impdp.exe arju/a@orcl tables=test directory=d dumpfile=test.dmp
Import: Release 11.1.0.6.0 - Production on Tuesday, 03 February, 2009 23:03:11
Copyright (c) 2003, 2007, Oracle. All rights reserved.
UDI-00018: Data Pump client is incompatible with database version 10.2.0.1.0
Here is one more test whenever you try to use 11g expdp to export data from 10g,
C:\>F:\app\Administrator\product\11.1.0\db_1\BIN\expdp.exe arju/a@orcl schemas=arju directory=d dumpfile=test.dmp
Export: Release 11.1.0.6.0 - Production on Tuesday, 03 February, 2009 23:09:00
Copyright (c) 2003, 2007, Oracle. All rights reserved.
UDE-00018: Data Pump client is incompatible with database version 10.2.0.1.0
Solutions and things good to remember
1)Whenever you use expdp to export data always use the same version Export Data Pump client as the version of the database from which you are taking dump. Though, you can use up to one major version lower expdp client, but this is not recommended.
If your database version is 11.1.0.6.0 then you can use expdp tool of any of 11g or 10g but it is recommended to use 11.1.0.6.0 expdp tool.
2)Whenever you use impdp to import data always use the same version Import Data Pump client as the version of the database to which you are importing dump. Though, you can use up to one major version lower impdp client, but this is not recommended.
If your database version is 11.1.0.6.0 then you can use impdp tool of any of 11g or 10g but it is recommended to use 11.1.0.6.0 expdp tool.
3)Import Data Pump (impdp) can always read Export Data Pump (expdp) dumpfile sets created by older versions of the database. For example export dumpfile sets of database 10.1.0.5 can easily be imported into database version 11.1.0.6.
4)If you decide dumpfiles need to be imported into a lower version database, then while exporting data use the Export Data Pump parameter VERSION to match the compatibility level of the database to which you will import. For example to import dumpfile sets to a 10.2.0.1 database(where compatibility is set to 10.2.0.1) from a database 11.1.0.6(where compatibility is set to 11.1.0.0), while using data pump export client along with the command use VERSION parameter where value of VERSION need to be 10.2 i.e as a whole append "VERSION=10.2" words with your expdp command.
Related Documents
http://arjudba.blogspot.com/2009/02/important-guideline-about-data-pump.html
http://arjudba.blogspot.com/2009/02/how-to-do-data-pump-import-from-higher.html
http://arjudba.blogspot.com/2008/04/data-pump-exportimport-how-we-can-do-it.html
http://arjudba.blogspot.com/2008/04/exportimport-datapump-parameter-query.html
http://arjudba.blogspot.com/2008/04/improve-data-pump-performance.html
http://arjudba.blogspot.com/2009/02/how-to-take-data-pump-export-on-another.html
http://arjudba.blogspot.com/2009/02/compatibility-table-of-oracle-data-pump.html
http://arjudba.blogspot.com/2008/04/datapump-parameters-include-and-exclude.html
Tuesday, February 3, 2009
Monday, February 2, 2009
How to add google search box to your site
First of All Google itself offer a free custom search engine. You can follow link www.google.com/searchcode.html and then create a custom search engine. You can add selected sites to search or manually add some keywords to confine searching within your defined keywords.
Alternatively, you can add following codes to add a custom search engine. Just copy and paste following codes in your hrml/javascript.
Below is the output of this html.
Alternatively, you can add following codes to add a custom search engine. Just copy and paste following codes in your hrml/javascript.
<form method="get" action="http://www.google.com/search">
<input type="text" name="q" size="25" maxlength="255" value="" />
<input type="submit" value="Arju's Search Test" /> <br />
<input type="checkbox" name="sitesearch"
value="http://arjudba.blogspot.com" checked /> Arju's Site<br />
</form>
Below is the output of this html.
Import error ORA-39083, ORA-02298 parent keys not found
Error Description
From live server I have taken a dump and then in another database I have imported it. All tables, indexes, functions, constraints, procedures went fine. But while importing REF_CONSTRAINT two constraints failed to create.
From the import log,
Cause of the Problem
ORA-02298 throws because it was trying to enable a foreign key constraint on a table with data populated into it but it does not find any references parent key. As to enable a constraint it must satisfy the constraint condition and it could not enable foreign key constraint, so above error arises.
There may be several scenarios behind ORA-02298 while you doing import operation.
1)The data being imported is from a database where there is more than one user. The export is being done in user/schema mode, so only that user's data is being exported. Any tables that the user does not own, but may have a referential integrity link to, are not exported.
2)The export is taken while database was in read write mode and export was taken consistent. That is if you take export with exp command then you did not use CONSISTENT=Y option. And if you take data pump export with expdp command then you did not use FLASHBACK_SCN or FLASHBACK_TIME parameter to make the dump consistent. As a result at first parent table is exported and then some data is inserted into parent as well as child table. After parent table is exported child table is exported and child table contains those rows which references are not exist inside the parent table existed in the dump file. So, in case of import while enabling constraint it could not enable because referenced parent key is not there.
Solution of the Problem
If you face problem for cause 1) then find the parent table and before exporting child tables first import the parent tables dump and then import user dumps. Although if you take full export it will solve the problem.
If you face problem for cause 2) then while taking export by using exp utility use CONSISTENT=Y option.
And if you take data pump export by using expdp utility then use FLASHBACK_SCN or FLASHBACK_TIME parameter. You can query from database for the values of these parameters and use those value. You can follow http://arjudba.blogspot.com/2008/05/export-data-to-previous-time-or-point.html in order to have an idea about usage of these parameters. To know more about FLASHBACK_SCN or FLASHBACK_TIME parameters search within this blog.
Related Documents
http://arjudba.blogspot.com/2008/05/how-to-get-scn-from-database-timestamp.html
http://arjudba.blogspot.com/2008/05/export-data-to-previous-time-or-point.html
From live server I have taken a dump and then in another database I have imported it. All tables, indexes, functions, constraints, procedures went fine. But while importing REF_CONSTRAINT two constraints failed to create.
From the import log,
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
ORA-39083: Object type REF_CONSTRAINT failed to create with error:
ORA-02298: cannot validate (MAXIM.HIS_DET_HISID_FK) - parent keys not found
Failing sql is:
ALTER TABLE "MAXIM"."HISTORY_DETAIL" ADD CONSTRAINT "HIS_DET_HISID_FK" FOREIGN KEY
("HISTORY_ID") REFERENCES "MAXIM"."HISTORY" ("ID") ENABLE
ORA-39083: Object type REF_CONSTRAINT failed to create with error:
ORA-02298: cannot validate (MAXIM.FK_REGIS_PHON_SUBSCRIBERS) - parent keys not found
Failing sql is:
ALTER TABLE "MAXIM"."PHONES" ADD CONSTRAINT "FK_REGIS_PHON_SUBSCRIBERS"
FOREIGN KEY ("SB_ID") REFERENCES "MAXIM"."SUBSCRIBERS" ("ID") ENABLE
Cause of the Problem
ORA-02298 throws because it was trying to enable a foreign key constraint on a table with data populated into it but it does not find any references parent key. As to enable a constraint it must satisfy the constraint condition and it could not enable foreign key constraint, so above error arises.
There may be several scenarios behind ORA-02298 while you doing import operation.
1)The data being imported is from a database where there is more than one user. The export is being done in user/schema mode, so only that user's data is being exported. Any tables that the user does not own, but may have a referential integrity link to, are not exported.
2)The export is taken while database was in read write mode and export was taken consistent. That is if you take export with exp command then you did not use CONSISTENT=Y option. And if you take data pump export with expdp command then you did not use FLASHBACK_SCN or FLASHBACK_TIME parameter to make the dump consistent. As a result at first parent table is exported and then some data is inserted into parent as well as child table. After parent table is exported child table is exported and child table contains those rows which references are not exist inside the parent table existed in the dump file. So, in case of import while enabling constraint it could not enable because referenced parent key is not there.
Solution of the Problem
If you face problem for cause 1) then find the parent table and before exporting child tables first import the parent tables dump and then import user dumps. Although if you take full export it will solve the problem.
If you face problem for cause 2) then while taking export by using exp utility use CONSISTENT=Y option.
And if you take data pump export by using expdp utility then use FLASHBACK_SCN or FLASHBACK_TIME parameter. You can query from database for the values of these parameters and use those value. You can follow http://arjudba.blogspot.com/2008/05/export-data-to-previous-time-or-point.html in order to have an idea about usage of these parameters. To know more about FLASHBACK_SCN or FLASHBACK_TIME parameters search within this blog.
Related Documents
http://arjudba.blogspot.com/2008/05/how-to-get-scn-from-database-timestamp.html
http://arjudba.blogspot.com/2008/05/export-data-to-previous-time-or-point.html
The listener supports no services
Problem Description
Whenever I issue lsnrctl status command it says "The listener supports no services" and no one from outside could not connect to database through listener.
Below is my listener.ora file entry,
Cause of the Problem
A listener is configured with one or more listening protocol addresses, information about supported services, and parameters that control its run time behavior. Upon database startup, oracle process PMON register with listener service. If after database startup if a listener is created then database has no idea about the listener because inside listener.ora there is no entry of SID_LIST_{listener_name} where {listener_name} need to be replaced by your listener name.
Suppose if you have a listener named LISTENER then you should have a corresponding SID_LIST_LISTENER entry while will define $ORACLE_HOME and ORACLE_SID of the listener.
Problem Solution
I edited the listener.ora file as below.
Then bounce the listener by,
$lsnrctl stop
$lsnrctl start
And now listener supports service and from outside world you can connect to database.
Whenever I issue lsnrctl status command it says "The listener supports no services" and no one from outside could not connect to database through listener.
$lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-FEB-2009 16:22:01
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 02-FEB-2009 05:07:47
Uptime 0 days 11 hr. 14 min. 14 sec
Trace Level support
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /var/opt/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /var/opt/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listener Trace File /var/opt/oracle/oracle/product/10.2.0/db_1/network/trace/listener.trc
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully
Below is my listener.ora file entry,
$ cat /var/opt/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
# listener.ora Network Configuration File: /usr/oracle/product/11.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =127.0.0.1)(PORT = 1521))
)
)
Cause of the Problem
A listener is configured with one or more listening protocol addresses, information about supported services, and parameters that control its run time behavior. Upon database startup, oracle process PMON register with listener service. If after database startup if a listener is created then database has no idea about the listener because inside listener.ora there is no entry of SID_LIST_{listener_name} where {listener_name} need to be replaced by your listener name.
Suppose if you have a listener named LISTENER then you should have a corresponding SID_LIST_LISTENER entry while will define $ORACLE_HOME and ORACLE_SID of the listener.
Problem Solution
I edited the listener.ora file as below.
$ cat /var/opt/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
# listener.ora Network Configuration File: /usr/oracle/product/11.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /var/opt/oracle/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC=
(GLOBAL_DBNAME=thdb)
(ORACLE_HOME=/var/opt/oracle/oracle/product/10.2.0/db_1)
(SID_NAME=thdb)
)
)
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =THAI_DB)(PORT = 1521))
)
)
Then bounce the listener by,
$lsnrctl stop
$lsnrctl start
And now listener supports service and from outside world you can connect to database.
$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-FEB-2009 16:49:06
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 02-FEB-2009 16:43:16
Uptime 0 days 0 hr. 5 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /var/opt/oracle/oracle/product/10.2.0/db_1/network/adm in/listener.ora
Listener Log File /var/opt/oracle/oracle/product/10.2.0/db_1/network/log /listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=THAI_HP)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "thdb" has 1 instance(s).
Instance "thdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Related Documents
lsnrctl start fails with TNS-12541, TNS-12560,TNS-00511, Linux Error: 111:
Problem Description
Today while preparing a new production server we faced an interesting problem. After installing oracle database software and database no default listener is created, no sqlnet.ora file. However we manually create the listener.ora and sqlnet.ora as below.
Now if I start the listener it fails with TNS-12541, TNS-12560,TNS-00511, Linux Error: 111:Connection refused.
I tried many alternatives like changing host to IP address, localhost, hostname. But all fails. In the listener.ora file I set
TRACE_LEVEL_LISTENER = SUPPORT and I found the entry below.
Solution of the Problem
I guess the culprit is entry of /etc/hosts file. As if I set parameter host=localhost inside listener.ora it returns message localhost is not found.
Below was my /etc/hosts entry.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain THAI_HP
I changed this entry to below.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 THAI_HP localhost.localdomain localhost
And then everything goes ok.
Today while preparing a new production server we faced an interesting problem. After installing oracle database software and database no default listener is created, no sqlnet.ora file. However we manually create the listener.ora and sqlnet.ora as below.
Now if I start the listener it fails with TNS-12541, TNS-12560,TNS-00511, Linux Error: 111:Connection refused.
$lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-FEB-2009 15:51:20
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
TNS-12560: TNS: Protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=23.54.56.12)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS: Protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
I tried many alternatives like changing host to IP address, localhost, hostname. But all fails. In the listener.ora file I set
TRACE_LEVEL_LISTENER = SUPPORT and I found the entry below.
..
..
..
02-FEB-2009 05:07:47:534] nsnainit: NS Connection version: 313
[02-FEB-2009 05:07:47:534] nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
[02-FEB-2009 05:07:47:534] nsnainit: "or" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed
[02-FEB-2009 05:07:47:534] nsnainit: "or" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed
"and" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed
..
..
..
Solution of the Problem
I guess the culprit is entry of /etc/hosts file. As if I set parameter host=localhost inside listener.ora it returns message localhost is not found.
Below was my /etc/hosts entry.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain THAI_HP
I changed this entry to below.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 THAI_HP localhost.localdomain localhost
And then everything goes ok.
Sunday, February 1, 2009
Failed to shutdown DBConsole Gracefully
Problem Symptoms
While stopping dbconsole on our production server 10.2.0.1 by emctl it failed to stop with error message "Failed to shutdown DBConsole Gracefully" as below.
$ emctl stop dbconsole
TZ set to Asia/Bangkok
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
--- Failed to shutdown DBConsole Gracefully ---
failed.
Cause of the Problem
This problem may happen by two reasons as far as I faced.
Cause 01: The server has two active NIC cards and therefore two active IP addresses. DNS resolves to the IP address of eth1 and /etc/hosts lists the IP address of eth0.
In order to see the available NIC cards issue,
$ /sbin/ifconfig -a
Cause 02: Wrong entry inside /etc/hosts.
Inside the /etc/hosts the entry format is,
If I have the entry like,
for a machine named hostname database then error will possibly occur.
Solution of the Problem
If the error happened by Cause 01 then,
1)Be sure that nslookup returns the IP address of the primary network adaptor, normally eth0.
2)Set your ORACLE_SID. By export or setenv command you can set environmental variable based on your shell type.
3)Recrate your repository. You can simply do this by two consecutive comamnds.
$emca -deconfig dbcontrol db -repos drop
$emca -config dbcontrol db -repos create
If the error happen by Cause 02 then,
1)Be sure you have correct entry inside /etc/hosts in the following format.
For localhost, the entry should following for host database.
2)Set your ORACLE_SID. By export or setenv command you can set environmental variable based on your shell type.
Like,
export ORACLE_SID=test
where test is your database sid.
3)Recrate your repository. You can simply do this by two consecutive comamnds.
$emca -deconfig dbcontrol db -repos drop
$emca -config dbcontrol db -repos create
While stopping dbconsole on our production server 10.2.0.1 by emctl it failed to stop with error message "Failed to shutdown DBConsole Gracefully" as below.
$ emctl stop dbconsole
TZ set to Asia/Bangkok
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
--- Failed to shutdown DBConsole Gracefully ---
failed.
Cause of the Problem
This problem may happen by two reasons as far as I faced.
Cause 01: The server has two active NIC cards and therefore two active IP addresses. DNS resolves to the IP address of eth1 and /etc/hosts lists the IP address of eth0.
In order to see the available NIC cards issue,
$ /sbin/ifconfig -a
Cause 02: Wrong entry inside /etc/hosts.
Inside the /etc/hosts the entry format is,
IP Address fully qualified hostname simple or short hostname Alias
If I have the entry like,
127.0.0.1 localhost.localdomain database
for a machine named hostname database then error will possibly occur.
Solution of the Problem
If the error happened by Cause 01 then,
1)Be sure that nslookup returns the IP address of the primary network adaptor, normally eth0.
2)Set your ORACLE_SID. By export or setenv command you can set environmental variable based on your shell type.
3)Recrate your repository. You can simply do this by two consecutive comamnds.
$emca -deconfig dbcontrol db -repos drop
$emca -config dbcontrol db -repos create
If the error happen by Cause 02 then,
1)Be sure you have correct entry inside /etc/hosts in the following format.
For localhost, the entry should following for host database.
127.0.0.1 database localhost.localdomain localhost
2)Set your ORACLE_SID. By export or setenv command you can set environmental variable based on your shell type.
Like,
export ORACLE_SID=test
where test is your database sid.
3)Recrate your repository. You can simply do this by two consecutive comamnds.
$emca -deconfig dbcontrol db -repos drop
$emca -config dbcontrol db -repos create
Saturday, January 31, 2009
Copy files between Unix and Windows with rcp
There are many third party tools by which you can copy files between windows and unix machine. Some common tools are winscp, SSHSecureShellClient etc. Instead of using any third party tool, you can use original unix and windows built-in tool to do the task.
The RCP (Remote CoPy) is a standard UNIX tool and a Microsoft Windows 2000 tool that copies files/folder to and from computer running the RCP service.
Before you can use the RCP tool from a Windows-based computer you must do something in your UNIX computer.
you must turn on the RCP service and update the security files to allow the Windows-based computer to connect to your unix machine over this service.
The following steps will help you.
Step 01: Turn on RCP service on UNIX Host
Turn on the RCP service on unix machine by using inetd:
1. Log on as root.
2. Edit the file /etc/Inetd.conf.
3. Uncomment the lines that start with shell and that start with exec.
4. Save the file.
5. Use ps -ef |grep inetd and determine inetd service pid. Send the Host User Profile (HUP) signal to inetd by using kill or by using pkill.
6. Run inetd again.
To turn on the RCP service by using xinetd:
1. Log on as root.
2. Edit the file /etc/Xinetd.d/rsh. You may get another file based on your linux distrinution.
3. Change the line disable to no.
4. Save the file.
5. Use ps -ef |grep inetd and determine inetd service pid. Send the HUP signal to xinetd by using kill or by using pkill.
6. Run xinetd again.
Step 02: Set the security permissions
After turning on RCP services you must set the security permissions to allow the Windows host to connect to your computer.
1. Edit the file /etc/hosts.equiv. Based on your linux distribution this file may vary. You can get like /etc/hosts.allow.
2. In the file add a line that contains the name of your Windows host.
3. Add a second line that contains the name of your Windows host and the name of a user who can access the directory that you want to transfer. Separate the two elements with a tab character.
4. Save the file.
Step 03: Transfer the files or directory
From windows computer you can transfer files or folders using rcp using following syntax.
RCP [-a | -b] [-h] [-r] [host][.user:]source [host][.user:] path\destination
For example, to copy the file index.html from the path /home/oracle on the computer unixhost as the user oracle you must use from windows computer,
rcp unixhost.oracle:/home/oracle/index.html index.html
In order to copy whole directory you need to use -r(for recursive) with rcp command.
To copy test directory under /home/oracle on unix, from windows computer issue,
rcp -r unixhost.oracle:/home/oracle/test test
Related Documents
How to change/configure IP Address on Linux/ Fedora /Ubuntu
Screen -A very useful unix tool to work with remote system
Different ways to take Screenshot on Linux
How to change the hostname in Linux
Memory Usage of Solaris Operating System
The RCP (Remote CoPy) is a standard UNIX tool and a Microsoft Windows 2000 tool that copies files/folder to and from computer running the RCP service.
Before you can use the RCP tool from a Windows-based computer you must do something in your UNIX computer.
you must turn on the RCP service and update the security files to allow the Windows-based computer to connect to your unix machine over this service.
The following steps will help you.
Step 01: Turn on RCP service on UNIX Host
Turn on the RCP service on unix machine by using inetd:
1. Log on as root.
2. Edit the file /etc/Inetd.conf.
3. Uncomment the lines that start with shell and that start with exec.
4. Save the file.
5. Use ps -ef |grep inetd and determine inetd service pid. Send the Host User Profile (HUP) signal to inetd by using kill or by using pkill.
6. Run inetd again.
To turn on the RCP service by using xinetd:
1. Log on as root.
2. Edit the file /etc/Xinetd.d/rsh. You may get another file based on your linux distrinution.
3. Change the line disable to no.
4. Save the file.
5. Use ps -ef |grep inetd and determine inetd service pid. Send the HUP signal to xinetd by using kill or by using pkill.
6. Run xinetd again.
Step 02: Set the security permissions
After turning on RCP services you must set the security permissions to allow the Windows host to connect to your computer.
1. Edit the file /etc/hosts.equiv. Based on your linux distribution this file may vary. You can get like /etc/hosts.allow.
2. In the file add a line that contains the name of your Windows host.
3. Add a second line that contains the name of your Windows host and the name of a user who can access the directory that you want to transfer. Separate the two elements with a tab character.
4. Save the file.
Step 03: Transfer the files or directory
From windows computer you can transfer files or folders using rcp using following syntax.
RCP [-a | -b] [-h] [-r] [host][.user:]source [host][.user:] path\destination
For example, to copy the file index.html from the path /home/oracle on the computer unixhost as the user oracle you must use from windows computer,
rcp unixhost.oracle:/home/oracle/index.html index.html
In order to copy whole directory you need to use -r(for recursive) with rcp command.
To copy test directory under /home/oracle on unix, from windows computer issue,
rcp -r unixhost.oracle:/home/oracle/test test
Related Documents
How to change/configure IP Address on Linux/ Fedora /Ubuntu
Screen -A very useful unix tool to work with remote system
Different ways to take Screenshot on Linux
How to change the hostname in Linux
Memory Usage of Solaris Operating System
Subscribe to:
Posts (Atom)