Home » RDBMS Server » Server Administration » I need to import data to production database. The database details are not in tnsnames.ora. (Oracle,9,HP-UX)  () 1 Vote
I need to import data to production database. The database details are not in tnsnames.ora. [message #505553] Tue, 03 May 2011 14:11 Go to next message
vishnu_ora
Messages: 12
Registered: April 2011
Junior Member

Hi Masters,

I need to import data to production database. The database details are not in tnsnames.ora.

I am using easy connect method to connect to the database, since I am not able to edit tnsnames.ora.

Is there any way by which I can do the import ?

Can I do it like this

imp system/pwd@imp system/pwd@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))(C
ONNECT_DATA=(SID=xx))' ......................
Re: I need to import data to production database. The database details are not in tnsnames.ora. [message #505554 is a reply to message #505553] Tue, 03 May 2011 14:21 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
below works for me
oracle@bcm-laptop:~$ imp scott/tiger@'localhost:1521/v112'

Import: Release 11.2.0.1.0 - Production on Tue May 3 12:21:07 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Import data only (yes/no): no > 


imp user1/pass1@'dbserver:1521/orcl_sid'

[Updated on: Tue, 03 May 2011 14:22]

Report message to a moderator

Re: I need to import data to production database. The database details are not in tnsnames.ora. [message #505555 is a reply to message #505554] Tue, 03 May 2011 14:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
another little know fact about SQL*Net on *NIX systems is below

bcm@bcm-laptop:~$ cat ./.tnsnames.ora
BCM=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=V112)))
bcm@bcm-laptop:~$

Any OS user can create their own private tnsnames.ora file as shown above.
The file resides in $HOME is named tnsnames.ora & preceeded with a period character.
SQL*Net will utilize this file PRIOR to looking for any other tnsnames.ora files as shown below

bcm@bcm-laptop:~$ sqlplus scott/tiger@bcm

SQL*Plus: Release 11.2.0.1.0 Production on Tue May 3 12:29:08 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$
Re: I need to import data to production database. The database details are not in tnsnames.ora. [message #505559 is a reply to message #505555] Tue, 03 May 2011 15:15 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
The even "littler" known fact is that is also true for Windows.

I know, because some years ago I was searching for hours why my boss couldn't connect to a new database before I found a tnsnames.ora in his home directory from years ago. (%HOMEPATH%)
Re: I need to import data to production database. The database details are not in tnsnames.ora. [message #505560 is a reply to message #505559] Tue, 03 May 2011 15:32 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Alternatively have TNS_ADMIN variable point to any directory where you have write access & place tnsnames.ora file there.
Previous Topic: incorrect version of oracle
Next Topic: extract tablespace privilege
Goto Forum:
  


Current Time: Thu May 09 05:06:11 CDT 2024