SQL & PL/SQL :: Linking Two Database

Apr 6, 2010

I am using two databases one prd1 and another ftn. I want to do some data verification between these two databases. So I created the following db link in prd1 and also in ftn.

CREATE PUBLIC database LINK ftn
CONNECT TO ftn_link IDENTIFIED BY password
USING ftn

CREATE PUBLIC database LINK prd1
CONNECT TO prd1_link IDENTIFIED BY password
USING prd1

I gave the following sql command from prd1 but it showed error message.

ORA-12154: TNS:could not resolve service name

SELECT A.CUST_ID_MSS_OWNER, B.CUST_ID_MSS_OWNER
FROM MSS_V_CAR_REC A, mss_v_car_rec@ftn b
WHERE a.lic_no_org = b.lic_no_org;

I have already created the sql net configuration also.

View 12 Replies


ADVERTISEMENT

Forms :: Linking A List Box To A Database Field

Aug 3, 2010

I remember a method in which I used a property in the property pallete to specify the query in which i wanted the list linked with, it gave me the option to input a static list or as mentioned a dynamic list which was dependent on a query entry, but I cant for the life of me remember where this property was.

View 4 Replies View Related

SQL & PL/SQL :: Linking 2 Tables Without Exact Matches

Mar 4, 2011

I have two tables as per attachement - TABLE_A has Vehicle details while TABLE_B has Address details:

I am trying to build a query in order to link the Vehicle Details with their Address Details.

I would require an SQL that links records in TABLE_A with records in TABLE_B when group_number are the same; however links with group_number '999' (for the same customer_number) if there are no exact matches.

SELECT A.*,B.*
FROM TABKE_A A, TABLE_B B
WHERE ((A.CUSTOMER_NUMBER = B.CUSTOMER_NUMBER AND A.GROUP_NUMBER = B.GROUP_NUMBER)
OR (A.CUSTOMER_NUMBER = B.CUSTOMER_NUMBER AND A.GROUP_NUMBER = '999'))

The only problem with such query is that record in TABLE_A with group_number '456' will return 2 times. One with address having group_number '456' and one with group_number '999'.

View 8 Replies View Related

SQL & PL/SQL :: Linking Two Tables With Extra Field

Oct 1, 2011

Once I add an extra column to link the two tables the number of rows is reduced by one, however when I try to get this extra record I find none matching the same criteria that led to reducing the records.

SQL> SELECT count(*)
2 FROM N_CONTRACT NC, N_WITHDRAWAL_REQUEST NWR
3 WHERE NC.fk_temP_withdrawal_req_serial = NWR.SERIAL_NUMBER;
COUNT(*)
----------
2243
[code]...

View 3 Replies View Related

SQL & PL/SQL :: Linking Table Challenge - Showing A Value Only Once Not For Each Match?

May 23, 2012

TABLE 1 : COSTS

I have a table of Costs. We have Jobs that run and there will be a cost associated with a particular machine.So JobNo 1 may run on Machine A and have a cost of 50 dollars. Although its now shown below JobNO 1 could run on MachineB and so on.

JOBNO MACHINE COST
1 MachineA 50
2 MachineA 70
3 MachineA 100

TABLE 2: OPERATIONS

We have operators (PERSONCODE) run the jobs on the machines. So Job 1 may be run by PERSONCODE 8 (e.g. Tony) and it may run on MachineA or MachineB.Multipe people may run a particular job. The PERSONCODE will be unique to the Job and it is actually unique to the list. A person never works on more than one job.

JOBNO MACHINE PERSONCODE
1 MachineA8
1 MachineA7
1 MachineB6
2 MachineA3
2 MachineA2
2 MachineA1
3 MachineA4

DESIRED RESULT:

I need to assign the COSTs to the OPERATIONS table but only want it to show next to one person (next to the appropriate machine).

DESIRED RESULT:

JOBNO MACHINE PERSONCODE COST
1 MachineA8 50
1 MachineA7
1 MachineB6
2 MachineA3 70
2 MachineA2
2 MachineA1
3 MachineA4 100

[code]....

View 5 Replies View Related

Data Guard :: Apply Patches On Oracle Database With Logical Standby Database?

Apr 22, 2011

I got a primary database with a logical standby database running Oracle 11g. I got two client applications, one is the production site pointing to the primary one, another one is just a backup site pointing to the logical one.Things will only be written into the primary database every mid night and client applications can only query the database but not add, update nor delete.And now, I want to apply the latest patch on both of my databases. I am also the DNS administrator, I can make the name server pointing to the backup site instead of the production one.I want to firstly apply the patch on the logical one, and then the physical one.

I found some reference which explains how to apply patches by adopting "Rolling Upgrade Method". however, I want to avoid doing any "switch over" mentioned in the reference because I can make use of name server. Can I just apply patches as the following way?

1)Stop SQL apply
2)Apply patches on logical standby database
3)let the name server point to the backup site
4)Apply patches on the primary database
5)Start SQL apply
6)Let the name server point back to the production site

View 2 Replies View Related

Data Guard :: Flashback Snapshot Standby Database Or New Primary Database After Failover?

Aug 30, 2013

If flashback is enable in physical standby database 1. If we failover at 11AM can I flash back NEW primary database to 6 AM ? 2. if I convert physically standby database to snapshot standby database at 11AM ,  Can I  flashback snapshot standby database to 6 AM and do some works on it (DML operations)  then   converting the snapshot standby database into physical standby database ?  

View 1 Replies View Related

Streams :: Apply Archivelog / Generated Before Reset-log Of Source Database In Destination Database

Feb 9, 2013

Database Version - 10.2.0.4.0
OS - Red Hat Linux

We have configured oracle one way stream between two databases. Source database is capturing the changes (No downstream configured). Configuration was working fine but destination database was lagging behind very much i.e about 15 days behind the source database. We are ok with this but the problem is now that , as per client request we have restored previous backup and open the database with resetlog option in source database. After resetlog , archivelog sequence has been changed and stream is not working.

Can I apply the previous archivelog (before resetlog archivelogs ) in destination database anyway.Source database is a production database.

View 1 Replies View Related

RMAN :: Clone 2 Node RAC Database To Single Instance Non-RAC Database Using Existing Backup

Jul 25, 2012

I tried to clone a 2 node rac database to single instance non rac database using existing backup. I have not used connectivity to target or catalog. rman duplicate finished with below messages:

rman auxiliary sys/******@dbracdup
RMAN> duplicate database to dbrac spfile backup location '/oracle/backup';
...
...
Finished recover at 25-JUL-12
Segmentation fault

And the database was in mount stage, and when i tried to open database it failed with below error:

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-19838: Cannot use this control file to open database .

View 4 Replies View Related

Retrieve Info From Multiple Databases / Insert Into Central Database Via Database LINKS

Jun 10, 2013

I am trying to retrieve info from multiple DBs and insert into a central DB via DB LINKS.The links are retrieved via a cursor.

However I keep coming up against 'PL/SQL: ORA-00942: table or view does not exist'..how to handle db_links using a cursor in a pl/sql block? The code is as follows:

DECLARE
db_link_rec VARCHAR2(30);
CURSOR db_link_cur IS
SELECT DB_LINK
from MESSAGING_PROD_LIST;
BEGIN
OPEN db_link_cur;
LOOP
FETCH db_link_cur INTO db_link_rec;
EXIT when db_link_cur%NOTFOUND;
[code]....

View 1 Replies View Related

Performance Tuning :: Export SQL Plan From Test Database To Prod Database?

Jul 16, 2013

An SQL query is taking a lot of time than usual and not completing even left after hours! The query joins a table with a quite complex view.

The same query in a test database completes in less than 2 mins.

I would like to export the sql plan from test database to prod database.

how to export/import in 10.2.0.4 version for a particular sql statement's execution plan.

View 2 Replies View Related

Server Administration :: Database Configuration Assistant Not Working / When Create New Database

Mar 26, 2011

i am installing oracle database 8.1.7 on dell server power edge 2650 first time database successfully installed but when i want to crate new database by Database Configuration Assistant it is not working for new database creation.

View 1 Replies View Related

Client Tools :: Connecting Directly To Required Database (not Test Database)

Feb 17, 2012

we have a production database 'X'. Now i have created a test database 'T' and did'nt configured another listener to it! The issue is when i cam connecting to oracle through sqlplus i am directly connecting to Test database 'T' but not the production database 'X'----ofcourse i can login to production DB afterwards. but initially i want to access the production database 'X'.

View 15 Replies View Related

Export/Import/SQL Loader :: Refresh A PROD Database Into TEST Database

Jun 17, 2012

I need to refresh a PROD database into TEST database. The PROD and TEST runs on 10g. I need a full refresh. Is there any pre req's which i should keep in mind ?.

View 1 Replies View Related

Data Guard :: Creating Standby Database From Active Database Using RMAN

Dec 21, 2012

creating the standby database from Active database using RMAN and getting the below issue after i executed the duplicate command.

Version of Database:11g(11.2.0.1.0)
Operating System:Linux 5
Error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/21/2012 17:26:52
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
[code]....

provide any work arounds to proceed further in creating the standby database.

View 1 Replies View Related

Data Guard :: Switch (convert) Primary Database To Standby Database?

Jan 30, 2013

I have installed oracle 11g standard edition one and created both primary and standby database. now i want to know how to switch(convert) primary database to standby database.

View 8 Replies View Related

Backup & Recovery :: RMAN Using Target Database Control File / Separate Catalog Database

Mar 14, 2012

How one should know whether RMAN is using target database control file or using separate catalog database. Also what one should do if he dont have catalog users credentials.

View 3 Replies View Related

RMAN Duplicate Target Database For Standby From Active Database

Aug 23, 2010

I have failed to duplicate target db for standby from active db using spfile with the following errors:

RMAN-03009: failure of backup command on prim1 channel at 08/11/2010 05:25:09
ORA-19558: error de-allocating device
ORA-19557: device error, device type: DISK, device name:
ORA-17627: ORA-01041: internal error. hostdef extension doesn't exist

[Code].....

The script has successfully created on standby db all controlfiles and also has copied 2 data files DATA01.DBF and DATA02.DBF into the correct location. Then the errors above kicked in and stopped the rman dup process.

View 4 Replies View Related

Server Utilities :: Import Table From Another Database By Using Database Link?

Mar 17, 2010

i would like to import a table from another database by using database link.

impdp muba/muba tables=FUNCTION_NO directory=testdump NETWORK_LINK=DBLINK1

i created the public database link as system user

it gave error like

Import: Release 10.2.0.1.0 - Production on Wednesday, 17 March, 2010 11:07:02
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
Starting "MUBA"."SYS_IMPORT_TABLE_01": muba/******** tables=FUNCTION_NO directory=testdump NETWORK_LINK=DBLINK1
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

[code]....

after that i try to import as system user like

impdp system/passwd tables=FUNCTION_NO schemas=muba directory=testdump NETWORK_LINK=DBLINK1

but error like

Import: Release 10.2.0.1.0 - Production on Wednesday, 17 March, 2010 11:27:43
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
UDI-00010: multiple job modes requested, schema and tables.

when i use IMP utility

imp system/passwd file=dump.dmp fromuser=userA touser=userB log=dmplog.log but when i use IMPDP what is the parameter equal to fromuser & touser

View 3 Replies View Related

Convert Oracle Database (schema Data) To Postgresql Database

Oct 11, 2012

i want to convert oracle database(schema data) to postgresql database

which tool would be best and url to download and steps to convert from one database to another ?

View 2 Replies View Related

Data Guard :: Registering Primary Database To Catalog Database

Oct 9, 2012

Here we have a data guard environment with db1(db_unique_name) as primary and db2(db_unique_name) as physical standby database. Also we configured one schema on a third machine as catalog database using following steps. The steps executed in catalog database(appsdb):

SQL> create tablespace rmancatlog_tbs datafile '/u01/app/oracle/oradata/NEW/rman_catalog.dbf' size 500M autoextend off extent management local segment space management auto;

SQL> create user rman identified by oracle
2 default tablespace rmancatlog_tbs
3 quota unlimited on rmancatlog_tbs
4 ;SQL> GRANT connect, resource, recovery_catalog_owner TO rman;

RMAN> create catalog;
recovery catalog created

Added tns entries of catalog database in primary and standby. Then from primary database we tried to register to catalog database. It is showing that it is registering. But every query afterwards in rman is throwing the error. Below are the steps and error:

[oracle@db1 ~]$ rman target sys/oracle catalog rman/oracle@appsdb
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Aug 13 21:39:32 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: NIOS (DBID=1589015669)
connected to recovery catalog database
[code]....

View 4 Replies View Related

QUOTE V$DATABASE Displays Information About Database From Control File

Feb 8, 2011

The documentation for v$database says: QUOTE V$DATABASE displays information about the database from the control file. Is it safe to assume that there will only ever be one row queried from this view?

View 2 Replies View Related

Application Express :: Copy Team Development From Database To Another Database?

Feb 11, 2013

How can I copy Team Development from database to another database

View 3 Replies View Related

Upgradation And Migration Of 9i Database On HP-UX OS To 10g Database On Solaris Environment

Dec 29, 2010

I am part of a upgradation and migration proj where an Oracle 9i db on a HP-UX OS is going to be upgraded and migrated as 10g db on a solaris OS environment.I am from the application team(Data warehouse team) and we are yet to allocate a specific DBA for taking care of this activity.

We are still in the requirements stage...different requirements and challenges that should be taken care and would occur in the roadmap of this project from a DBA perspective.All your inputs would be very valuable to me.

View 2 Replies View Related

Create As Many As 100 Database With Upto 100 Users (max) For Each Database As Client

Aug 25, 2010

I have CPU based Oracle server license. In this case as per license policies of Oracle I can have unlimited database with unlimited users connecting it.

I need to create as many as 100 database with upto 100 users (max) for each database as client. What is the recommended hardware for this server? CPU/ RAM/Harddisk, recommended chipset on the motherboard (in case of database storage capacity required is not high typically - 20 GB is OK per database - average), redundancy is critical, also Oracle database vault is going to be installed; as security is of prime importance between users of different database. Which specific server models from specific vendors like IBM/ Dell/ HP are good ones for this purpose?

View 2 Replies View Related

Existing Database (11.2.0.3) Can Be Upgraded As Pluggable Database And Plug It In CDB?

Sep 11, 2013

I would like to know about oracle 12c. In 12c, when i read documents,i understood that one container DB(CDB) can contain upto 253 pluggable DB and this pluggable DB(PDB) is similar to our traditional database(pre 12c).

1) whether my existing database (11.2.0.3) can be upgraded as pluggable DB and plugged it in CDB?

2)i read that we can move from local data center model to cloud in this version. Is that mean that once PDB is ready, whether we can plug it in CDB using private cloud or public also possible?

3)If public cloud is possible, are both CDB and PDB accessed through cloud client only?If so, whether our user data that is available under PDB also moved to external place?

View 1 Replies View Related

Forms :: Use MS Sql Server Database With 6i Without Oracle Database Install

Feb 6, 2010

Can we use M.S Sql Server Database with Forms 6i with out oracle database install.

View 1 Replies View Related

Application Express :: Database Authentication Via Database Link?

Jun 26, 2013

Is it possible to use Database authentication in APEX through database link, and how?Also is it posible to read roles from users through database link?

View 3 Replies View Related

RMAN :: Error - Register Database With Catalog Database

Mar 4, 2013

I have created database with 11.2.0.3 in RHEL 5. I have catalog database(RMAN) with version 10.2.0.1 and 5 databases with different versions(10.2.0.1,10.2.0.3,10.2.0.5) registered with this catalog databases.

Now I want to register the 11.2.0.3 database with catalog (RMAN) database.

Am getting error while I register :

#rman target / catalog=rman/rman@rman

connected to target database: TEST (DBID=12345678)
connected to recovery catalog database

RMAN> register database;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of register command on default channel at 03/04/2013 10:27:12
RMAN-10015: error compiling PL/SQL program
RMAN-10033: error during compilation of job step 1: ORA-04023: Object RMAN.DBMS_RCVCAT could not be validated or authorized

View 9 Replies View Related

Migrate Data From MySQL Database To 11g Database

Nov 5, 2008

I need to migrate data from Mysql database to Oracle11g database.

a) is there any method available to import the all the sqls like table script,constraint scripts,data(insert ) script from Mysql.so that we can apply the sql directly to the oracle schema after making necessary changes(like datatype).

b) Is there any free tool available for the migration.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved