Comunication between two databases
Hy !
I have 2 computers both of them with windows xp profesional. Their IP's are 192.168.0.1
and 192.168.0.2
The first computer is in a workgroup, and the second is in a domain.
The firewalls are disabled.
The ping works fine. I had configured the tnsnames.ora
My problem is that tnsping doesn't work.
(TNS-03505: Failed to resolve name)
Can you help me?
Thanks!
Daniel
You have a tnsnames.ora somewhere on your system. That's the system trying to tnsping. (Either, or both systems.)
Find that tnsnames.ora file.
Make a backup copy.
Open that file.
Find the 'HOST=xxxx' entry.
Change the xxxx from the host name to the IP address.
Try the tnsping.
Basically it sounds like the machine can not get a translation from host name to IP address. That is often done in a 'hosts.' file (C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS. or /etc/hosts) or in DNS. Or by hand, as I recommend for a test.
Message was edited by:
Hans Forbrich
After you get the two machines communicating, as verified by ping.
Similar Messages
-
How to ...synchronization between two databases
Hi,
I want to set up automatic synchronization between two databases. For example, database DB1 and DB2 have table t1 and t2 with the same columns. If someone updates a record in table t1, I want automatically update the record in t2 or vice-versa.
How can I make an automatic system like that?1) What is the business goal you're trying to satisfy? Failover, reporting, replication, geographic co-location, etc. each have their own set of technologies. Explaining what you're trying to accomplish from a business perspective will help us identify which technology (or technologies) to focus on.
2) Are you synchronizing a single table? Or multiple tables? Or all the tables in a schema? Or all the tables in a database?
3) Is there a stable network connection between the boxes?
4) What version of Oracle do you have (10.2, 10.1, 9.2, 9.0.1, etc)? What edition (standard, express, enterprise, etc)?
5) How quickly after a change has been made on DB1 does the change need to reflect on DB2?
6) Am I correct in understanding that you want to be able to change the same row of data on either DB1 or DB2? So the replication needs to go in both directions?
Justin -
How to check similarity between two Databases 9i & 10g after imp in 10g
Dear all,
Source
=======
OS server ==> HP-UX
Oracle version ==> Oracle 9.2.0.8
DB Name ==> MSST
DB total users ==> 320
Full export in ==> /u02/export/Jan09.dmp
Tablespaces ==> SC, SC_I, SA, SA_I, PP, PP_I, AC, AC_I, SD
Destination
============
OS server ==> HP-UX
DB Name ==> CHDB
Existg DB users ==> 20
Oracle version ==> Oracle 10.2.0.4
copied 9i dump file in ==> /u03/export
Tablespaces created same as Oracle 9i i.e;
Tablespaces ==> SC, SC_I, SA, SA_I, PP, PP_I, AC, AC_I, SD
I had run full import on Destination server i.e; Oracle 10g & following is the command i used:
imp system/pwd@conn_string file=/u03/export/Jan09.dmp log=/u03/export/Jan09_imp.log full=y ignore=y statistics=none
*=== Imported successfully with few errors like ====*
IMP-00017: following statement failed with ORACLE error 2299:
"ALTER TABLE "EMP_PROMOTIONS_ORD" ADD CONSTRAINT "EMP_PROMOTIONS_ORD_UK" UN"
"IQUE ("EMP_NO", "RANK_NO_FOLLOW") USING INDEX PCTFREE 10 INITRANS 2 MAXTRAN"
"S 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "PP" "
"LOGGING ENABLE "
IMP-00003: ORACLE error 2299 encountered
ORA-02299: cannot validate (PP.EMP_PROMOTIONS_ORD_UK) - duplicate keys found
ORA-02299: cannot validate (PP.EMP_PROMOTIONS_ORD_UK) - duplicate keys found
. . importing table "EMP_PROMOTION_DETAILS" 13333 rows imported
. . importing table "EMP_PROMOTION_MAST" 725 rows imported
. . importing table "EMP_PUNISHMENT" 271 rows imported
. . importing table "EMP_REPORT_BOOKS" 60528 rows imported
. . importing table "EMP_SALARY_HISTORIES" 120871 rows imported
. . importing table "EMP_SALARY_HISTORIES_TEMP" 77044 rows imported
. . importing table "EMP_TRANSACTIONS" 96536 rows imported
IMP-00017: following statement failed with ORACLE error 2299:
"ALTER TABLE "EMP_TRANSACTIONS" ADD CONSTRAINT "TRANS_UK" UNIQUE ("EMP_NO","
" "DIR_NO", "DIR_DATE", "TRN_CODE") USING INDEX PCTFREE 10 INITRANS 2 MAXTRA"
"NS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "PP_"
"I" NOLOGGING ENABLE "
IMP-00003: ORACLE error 2299 encountered
ORA-02299: cannot validate (PP.TRANS_UK) - duplicate keys found
Now my question is
===================
How to check everything is same/similar like Oracle 9i database ( source ), for example ( i used this technique ):
Can anyone tell me how to check similarity between two Databases 9i & 10g after import in 10g.
MSST_DB>SHOW USER
MSST_DB>SA
MSST_DB>select object_type, count(*) from user_objects group by objects;
OBJECT_TYPE COUNT(*)
DATABASE LINK 2
FUNCTION 23
INDEX 1795
LOB 6
PACKAGE 8
PACKAGE BODY 8
PROCEDURE 30
SEQUENCE 67
SYNONYM 60
TABLE 644
TRIGGER 3
VIEW 20
CHDB_DB>SHOW USER
CHDB_DB>SA
CHDB_DB>select object_type, count(*) from user_objects group by objects;
OBJECT_TYPE COUNT(*)
INDEX 1794
PROCEDURE 30
TABLE 644
TRIGGER 3
VIEW 20
FUNCTION 23
SYNONYM 60
PACKAGE BODY 8
SEQUENCE 67
PACKAGE 8
LOB 6
Edited by: VIKHARAHMED on Jan 10, 2012 3:02 AM[url http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#sthref67]Guide.
-
Synchronisation of data between two databases
i have two databases having tables with same fields and i would like to transfer the data from one database to the other , how do i do that? is there any link which talks about synchronisation of data between two databases?
Make the database name same in both databases and use Veritas tools for data copy.
-
How to find the difference in object definition between two databases
Hi,
Can any one suggest me how to find the difference in object definition between two different databases. Is there any tool or by OEM? If so how?
Regards
Naveenthis link may be helpful...
http://www.dbspecialists.com/scripts.html -
How can i make network between two databases ?
Good Morning to all ;
Going to configure oracle 10g - ( I trying to exchange data between two different databases.
Each database is configured in different operating systems.
For ex : one database from windows XP(seperate virtual machinne)
one database from linux rhel (seperate virtual machinne)
I am waiting for some suggestions ..
Thanks ..
Edited by: 969352 on Mar 19, 2013 10:04 AM969352 wrote:
What virtualization product are you using?*#* vmware-toolbox-cmd -v
8.1.3.9911 (build-203739)
VMWARE Product Information :
Version : 7.0.0 build - 203739
OK. You will need to make sure the ip addresses you assign to your vms are in the same subnet as the adapter create by the installation of vmware. Once you get the fundamental network setup fixed, you can treat these vms just like any machine in your data center. Forget the vm console and access them exactly like you would any remote server -- putty for the linux machine and Windows Remote Desktop for the Windows machine.
At a command prompt on the host, issue this:
c:> ipconfig -allYou will get back info on several net adapters, two of which are identified as being with vmware -- vmNet1 and vmNet8. Note the IP addresses of both. We'll need it later.
You will also need to know how you configured the network adapters on your vm's -- NAT, bridged, hostonly, ???
Note that these issues are out of scope for this forum. I don't mind helping, but I no longer have a vmware installation to reference details.
What have you actually tried to do? ( Data Transfer )I tried to exchange data from windows database to linux DB
That's pretty vague. Exactly how did you try to "exchange data"? A sql statement using a db_link? export/import? Carrier Pigeon?
>
Where are you stuck?
I don't know , how to configure ip and necessary information for windows database.
Configuring an IP address is purely an OS admin issue and is out of scope for this database forum.
Google is your friend, but only if you use it: [url http://lmgtfy.com/?q=configure+windows+ip+address]http://lmgtfy.com/?q=configure+windows+ip+address
>
That's it Edstevens .. thanks .. -
Connection Between Two Databases
Hi,
I have two databases called DBS1 and DBS2. Both are in one system. I need link between these two databases. I want a query as follows.
select * from cust@DBS2; # from DBS1
select * from temp_cust@DBS1; # from DBS2
Is possible link between DBS1 and DBS2.
Can any one tell me how to link these two databases each other.
Best Regards,
Nilopher.
nullNilopher,
You can connect to two different Oracle databases by creating a database link. When you say that both databases are in one system I assume you mean two databases on the same server. To create a database link you can do the following:
While logged onto DBS1:
create database link dbs2
connect to username identified by password
using 'dbs2.world'
Username and password are the user and password you want to connect as in dbs2.
If you want everyone to be able to access the database link you can say create public database link... otherwise only the user that created the database link can use it.
This should work assuming the database server tnsnames.ora file looks like this:
dbs2.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= hostname)(Port= 1521))
(CONNECT_DATA = (SERVICE_NAME = dbs2))
If your databases are on two different servers you'd have to look at each one's tnsnames.ora file and make sure each one had an entry for the other's database.
I believe the database link name must be the same as the SERVICE_NAME if the parameter GLOBAL_NAMES=TRUE, if it's FALSE you can name it something else. By default this parameter is set to TRUE so I called the database link in the example dbs2.
You can then access data from dbs2 while logged into dbs1 exactly how you said:
select * from cust@DBS2;
You can then repeat the process to do the same thing on dbs2 to connect to dbs1.
Hope this helps. -
Trigger in a join table between two database
Hi an Happy new year
I have two database, one is dedicated to security and the second for my multitenancy application
In this two databases one have tables USER, USER_JOIN_USER_ROLE and USER_ROLE
the second, USER (where fields are differents), USER_JOIN_USER_ROLE and USER_ROLE
the two join table must be the same and USER_ROLE are the same in the two databases.
I plan to use a trigger to replicate from the application database to the security one, I already use triggers to Replicate USER and set the differents fields.
I'm new in triggers using.
My user replication trigger seems like that
CREATE TRIGGER [dbo].[USER_REPLICATION]
ON [dbo].[DM_USER]
AFTER INSERT
AS
BEGIN
DECLARE @EmployeeId int = (SELECT FKEmployee FROM inserted)
DECLARE @Login nvarchar(50) = (SELECT LoginUser FROM Inserted)
DECLARE @Password nvarchar(50) = (SELECT PasswordUser FROM Inserted)
DECLARE @Tenant int = (SELECT IdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
DECLARE @CompanyId int = (SELECT ExtIdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
DECLARE @LegalEntityId int = (SELECT FKLegalEntity FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
DECLARE @LastName nvarchar(255) = (SELECT LastNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
DECLARE @FirstName nvarchar(255) = (SELECT FirstNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
DECLARE @EMail nvarchar(255) = (SELECT EMail FROM inserted)
SET NOCOUNT ON;
INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER(LoginUser, PasswordUser, FKCompany, TenantId, LegalEntityId, LastName, FirstName, Email)
VALUES (@Login, @Password, @CompanyId, @Tenant, @LegalEntityId, @LastName, @FirstName, @EMail)
UPDATE [TEST_MULTI].[dbo].[DM_USER] SET ExtIdUser = (SELECT IdUser FROM [DM_SECURITY_MASTER].[dbo].[DM_USER]
WHERE LoginUser = @Login
AND PasswordUser = @Password
AND FKCompany = @CompanyId
AND TenantId = @Tenant
AND LegalEntityId = @LegalEntityId
AND LastName = @LastName
AND FirstName = @FirstName
AND EMail = @EMail)
WHERE IdUser = (SELECT IdUser FROM Inserted)
END
but I cannot figure how to use a trigger to update a collection and not find anything on it, any help welcome
I use Windows Identity Foundation in my code and update or insert can set multiple rowsHello and thanks for help.
The trigger i give as example already works fine but Fanny Liu is for sure better than mine and I will try it. Users insertions are not multiple, only one user can be inserted at the same time
My question was most on using triggers to update a collection via a Join table between my user and users roles
I wrote it Yesterday for INSERT
USE [TEST_MULTI]
GO
/****** Object: Trigger [dbo].[USER_ROLE_INSERT_REPLICATION] Script Date: 01/03/2014 10:56:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:
-- Create date: 2014/02/01
-- Description: Replication INSERT on MASTER DATABASE
-- =============================================
ALTER TRIGGER [dbo].[USER_ROLE_INSERT_REPLICATION]
ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
AFTER INSERT
AS
DECLARE InsertCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM inserted)
DECLARE @UserId int, @UserRoleId int
OPEN InsertCursor
FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
IF NOT EXISTS(SELECT * FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId
AND FKUserRole = @UserRoleId)
INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE (FKUser, FKUserRole) VALUES (@UserMasterId, @UserRoleId)
FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
END
CLOSE InsertCursor;
DEALLOCATE InsertCursor;
And for DELETE
USE [TEST_MULTI]
GO
/****** Object: Trigger [dbo].[USER_ROLE_DELETE_REPLICATION] Script Date: 01/03/2014 10:57:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:
-- Create date: 2014/02/01
-- Description: Replicate DELETE on MASTER DATABASE
-- =============================================
ALTER TRIGGER [dbo].[USER_ROLE_DELETE_REPLICATION]
ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
AFTER DELETE
AS
DECLARE DeleteCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM deleted)
DECLARE @UserId int, @UserRoleId int
OPEN DeleteCursor
FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
DELETE FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId AND FKUserRole = @UserRoleId
FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
END
CLOSE DeleteCursor;
DEALLOCATE DeleteCursor;
It works fine
Thanks for help, I will mark it as answered -
Get Differences between two databases
Hello there,
I need to check if there are differences between 2 databases, both on 10g. As I do not want to check all tables, triggers, procedures and so on manually I wonder whether there is a script where I just need to give the db_names for checking both databases?
best regards,
JörnHi there,
first, I need to know structural differences like row datatypes, indexes or triggers. I don't need to know what exactly is different just which objects.
Second, I would also like content - differences between two tables, so the exact table data compared to each other. But this is not as important as the first one.
best regards
Jörn -
Transfer large data between two databases via ODI
Hi, we want to transfer our 2 billion records (70gb) A database oracle server to B database oracle server via ODI LKM SQL to Oracle (SQLLDR).We use a filter like "prod_enter_date>sysdate-1" for daily records(about 200.000).It takes about 1 our.How can we transfer data faster, thanks for your advice.
OK so assuming the Oracle DB's can see each on the network other have a word with your DBA's about creating a DBLink and test out the LKM DB Link KM.
Also try Uli's amended LKM if dont want to be too intrusive on your souce system creating synonyms etc. : http://sonra.io/tag/lkm-db-links/
I have used both and they work fine.
Basically you are currently unloading a large amount of data, transfering to another location and then uploading that data with no transformation to the target environment, a DBLink LKM will transfer this data without the need to unload / upload , just the network transfer.
Another thread here : https://forums.oracle.com/message/9630782
To re-quote the that thread quoting the documentaion for that LKM : "As it says in the component description - "This module is recommended when developing interfaces between two Oracle servers." -
How to switch between two databases
Hi,
I have a requiremet of using two databases for one of my projects. one which have login related data and second database is having the actual client data.
my question is " how can i configure single java application to switch from one database to another database? "
Thanks in advance.use two connections, one per database, of course.
% -
Synchronisation between two databases tables
Hello,
In my case DATABASE A is always updating table TABLE XYZ of DATABASE B through MQ Series using online messages. Due to some reasons that link is down, could any one suggest how we keep continue synchronisation of these two databases, we can not modify any thing on DATABASE A we can only read it as it is master database while DATABSE B is updated by A.
Table of DATABASE A is containing 2 Million records same with B. Can any one let me know how to compare the rows of the tables of each database and if some rows are missing in DATABASE B it should be updated by DATABASE A.
Please suggest any solution so that both databases should be kepy synchroinised at table rows level.
ThanksRead my suggestion in your other thread : Re: Two Different Databases Tables Synchronisation
Nicolas. -
Rollback does not work between two databases
I have two databases, A and B and a database link.
I have a procedure in database A that has calls to procedures of database B. When commit in A then gives error (ora-06512), then I make rollback, but only does for database A, in database B has recorded the data. It's normally? What's happens?
ThanksI'm afraid you'll need to give as more information; ORA-06512 is a very generic message and is used to indicate which line another error occured. Can you tell us what that error was, and exactly what you're trying to do?
Thanks,
Colin -
Switiching between two databases
Hi all,
I have two databases Say Database_1 and Database_2, currently im working on Database_1 and want to switch over to Database_2, how is that achived,please clarify?
Thanks in Advance,
- SriMaybe you just need to set environment variable ORACLE_SID to Database_2 instead of Database_1 or TNS connect string such as:
sqlplus .../...@Database_2 What do you exactly mean by switching ? Copy one database into another one or just connect to another database ? -
Datapump between two databases
I have two databases, by usıng datapump I would lıke to move package,procedures and views to other database.
expdp live/live@rac DIRECTORY=my_dir DUMPFILE=plsql.dmp INCLUDE=VIEW,PROCEDURE,PACKAGE,FUNCTION
impdp test/test@orcl DIRECTORY=my_dir DUMPFILE=plsql.dmp remap_schema=LIVE:TEST
but I couldnt manage to do the import,because I thınk second server dont know the dırectory that I created ın fırst machıne.>> I thınk second server dont know the dırectory that I created ın fırst machıne.
Yes, you have to have directory created in Second server as well. Otherwise, it will not recognize as existing directory.
Create the directory i.e. my_dire using CREATE DIRECTORY commands, and grant read and write privilege to test user, and finally do import.
Regards,
Sabdar Syed.
Maybe you are looking for
-
Two questions about a G5 Power Mac
Hi I just got a refurbished Power Mac G5 running OSX 10.4.11 Anybody know what's the most up to date version of MS Office I can run on it? Also I tried to install OSX 10.5.4 (which I have on my Mac Book) but it said it wasn't allowed. Is 10.4.11 the
-
I've downloaded iTunes on my new iPad but some one else's details come up when I try to download apps. How do I change it to my account details in Oder to download?
-
Make imported SWF into a button
I need to import a SWF and make it clickable on the fly. So I tried making a button, then overlaying the button with a movie clip. Then loading the swf into the mc. But once I load the swf it becomes unclickable. Any suggestions?
-
Error screens when opening up dreamweaver; effecting functionality.
When opening up a file in Dreamweaver, two error screens pop up. The first one says "Attempted an unsupported operation" and the second one says, "Encountered an improper argument". Dreamweaver will still work after this but becomes very buggy and ce
-
Syncing Notes on iPad with iMac
When I make a note on my iPad it does not change the existing note on my iMac. When I make a change on my iMac I get a second note on my iPad leaving the original unchanged. Notes is connected to iCloud on both computers!