Database Link To Fetch Values From View?

Dec 8, 2008

Here is the information about database I need to connect from my view, as the underlying table for my view is in this database

Database instance : orcl
Machine name : contentm (not sure, if this needs to be used)

so in my schema, I tried the following

CREATE DATABASE LINK product_lnk2 USING 'orcl'
select * from cont20.V_FB_PRODUCT_NM@product_lnk2

where cont20 is the schema on orcl

But it gives me this error ORA-12154: TNS:could not resolve the connect identifier specified

View 4 Replies


ADVERTISEMENT

10g Materialized View Using A Database Link

May 20, 2009

In Oracle 10gR2.If a materialized view uses a database link for the query in order to create a snapshot of data on a remote instance, does the name of the database link have to be an entry in the tnsnames.ora file?

The following link suggests not, but is not version specific: Materialized View - Oracle Wiki FAQ

However, the following 11g documentation suggests that the database link name must be the same as the global name of the target database.URL..
I can't any info specific to 10gR2.

We have three instances. Our application metadata is stored in a schema in B.METADATA. There is a shell schema (B.METADATASHLL) that provides access to the tables to remote applications.

On instance A, we have a shell schema (A.METADATASHLL) that creates materialized views as follows:
CREATE DATABASE LINK METADATA_PRIME
CONNECT TO metadatashll IDENTIFIED BY password
USING 'B';

Our materialized view is created using the query SELECT * FROM METADATA.APPLICATIONS@METADATA_PRIME WHERE Application = 'A';

The query works, but the materialized view does not.I'm being told that the database link has to be named B as follows

CREATE DATABASE LINK B
CONNECT TO metadatashll IDENTIFIED BY password
USING 'B';

Which means that I can only have one public link to instance B, and I'm in a pickle if I create a second application (which I have) using the same model).

View 6 Replies View Related

Security :: View / Obtain Password Once Database Link Has Been Created?

Dec 24, 2011

Is there a way to view/obtain the password once a database link has been created. Some sys dba table?

View 7 Replies View Related

PL/SQL :: How To Fetch Values From Two Columns Using Values From One Column

Jul 25, 2013

From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

View 2 Replies View Related

SQL & PL/SQL :: View To Find DB Link Type

Feb 21, 2012

Is there any view to find out the Types (Public or Private) of the DB LINK already created?

View 6 Replies View Related

PL/SQL :: Materialized View Link With All Options?

Dec 28, 2012

materialized view link with all options?

View 3 Replies View Related

Error In Creating Materialized View With DB Link?

Aug 7, 2013

we have the following requirement for creating materialized view.

In database "DB1", a table "abc" is there in "user1" schema.
In database "DB2", in "user2", we are accessing the "abc" through DB link "DBL1" to DB1:
select * from user1.abc@DBL1;
we have created a public synonym for "user1.abc@DBL1" as "sabc".

In database "DB3", we need to create the materialized view to access "abc" in DB1 through DB2. we are not allowed to access "DB1" directly from "DB3". so we create a db link as "DBL2" in "DB3" to "DB2".

when i try to create a materialized view as below:
create materialized view abc_mv
as
select * from sabc@DBL2;

But got the error as "synonym translation invalid". When i access the SQL statement separately as below
select * from sabc@DBL2, its working but in Materialized view, it shown that error. Even i tried with schema name as well like "user2.sabc@DBL2" , but that also thrown same error.

Is there any option available for this type of creating materialized view?

View 1 Replies View Related

SQL & PL/SQL :: Ref Cursor As In Parameter / How To Fetch Column Values

Sep 21, 2010

i have a proc that is taking p_serial_number refsursor as in parameter. the structure of p_serial_number is required to be

mfg_prod_cdchar (3 byte)
mfg_prod_seq_no char (6 byte)

How do I need to define this ref cursor ? and when I use it in my Procedure how do I fetch the column values ?

View 6 Replies View Related

PL/SQL :: Fetch DISTINCT Values From Partitioned Table

May 12, 2013

What is the fastest way to fetch DISTINCT values from partitioned table?

1) DISTINCT/UNIQUE
2) GROUP BY
3) PARTITION BY OVER()
4) MAX(ROWID)

Table Definition
CREATE TABLE STG_SOS_SALES_FACT_STUDY
(
  CNTRY_KEY     NUMBER,
  STUDY_ID      NUMBER,
  PRD_KEY_YEAR  NUMBER,
  PRD_KEY_WEEK  NUMBER,
  DATE_FROM     DATE,

[Code]...

-> PARTITION BY RANGE (PRD_KEY_YEAR, PRD_KEY_WEEK)
-> SUBPARTITION BY LIST (CNTRY_KEY)

** Local Partition Indexes
1) CN_SD_CTG_PRD_PRDC_IDX = STG_SOS_SALES_FACT_STUDY (PRD_KEY_YEAR, PRD_KEY_WEEK, CNTRY_KEY, STUDY_ID, CTG_ID, PRDC_KEY)
2) CN_SD_PRD_STR_CTG_IDX = STG_SOS_SALES_FACT_STUDY (PRD_KEY_YEAR, PRD_KEY_WEEK, CNTRY_KEY, STUDY_ID, STR_KEY)#Query:
SELECT DISTINCT PRD_KEY_WEEK, PRD_KEY_YEAR

[Code]...

** Explain Plan:
Plan
SELECT STATEMENT  ALL_ROWSCost: 6,235  Bytes: 629  Cardinality: 37                           
      8 HASH UNIQUE  Cost: 6,235  Bytes: 629  Cardinality: 37                      
         7 CONCATENATION                 
              3 PARTITION RANGE ITERATOR  Cost: 1,985  Bytes: 1,031,900  Cardinality: 60,700  Partition #: 3  Partitions accessed #194 - #207          

[Code]...

Partition #: 7  Partitions determined by Key ValuesThe above query is taking around 6-7 minutes to fetch the data.

View 12 Replies View Related

SQL & PL/SQL :: How To Fetch Values From Other Tables In Application On-submit Process

May 4, 2012

In Oracle Apex 4.1,The Leave_transaction Table has the following Fields,

1.Leave_id
2.Emp_name
3.From_date
4.To_date
5.Remaining_days

The Emp_Master Table has the following columns,

1.Emp_id
2.Emp_Name
3.Remaining_days

Holiday_master table has the list of holiday dates as "From_Date"

I have the form based on the Leave_Transaction Table, and I have created the Process, as "On-submit-after computations and validations" and posted the following PLSQL code,

declare
days number(3);
ex_days emp_master.remaining_days%type;
new_rem_days emp_master.remaining_days%type;
begin

[code]....

If the Dates is between from_date and To_date comes in Saturday and sunday and/or if any Date is exist in the Hpliday_master table it will exclude and return the count(*) remaining dates, For example,

If the From_date is 04-may-2012' and To_date is 08-may-2012,

Here the dates 5th may and 6th may are "saturday" and "sunday"

and if any date between From_date and To_date is exist in Holiday_Master Table i.e say here it is 07-may-2012, Then the remaining dates are(excluding sat,sunday and dates in holiday_table),

04-may-2012,
08-may-2012.

so the count(*) is 2.

I am using the above code but still it returning 5,I think this

...where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master))

code is not working.

View 39 Replies View Related

Server Utilities :: Exclude View In IMPDP Using Network Link Giving Error

Jan 14, 2011

I am using below command to import a schema using network link. Command is :

impdp system directory = IMP_DIR schemas = XYZ network_link = PQR remap_schema = XYZ:XYZ exclude=view: "= 'XYZ.VW_ACCEPTDETAILS'"

This command is giving below error

LRM-00116: syntax error at 'view:' following '='

When I have tried Like in place of '=' sign i.e. EXCLUDE = VIEW:"LIKE '%VW_ACCEPTDETAILS%'" , it gives me below error:

UDI-00014: invalid value for parameter, 'exclude'

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

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

Forms :: ORA-24374 / Define Not Done Before Fetch Or Execute And Fetch

Mar 24, 2011

FRM-40501: ORACLE error: unable to reserve record for update or delete.

ORA-24374: define not done before fetch or execute and fetch

My master-detail form has single canvas. For both blocks, master and detail, two tables joined together in each. One table to be updated, second table has some info for reference (query only).

I am getting these errors when in detail block the item from LOV is selected for existing record. This does not happen for new record inserted in detail block.

View 1 Replies View Related

OO4O And Wizards :: How To Fetch Columns In Cursor Using FETCH

Nov 1, 2012

create or replace PROCEDURE newprocedur(outname OUT VARCHAR2,outroll OUT NUMBER) AS

CURSOR c1 IS
select Name,Rollno,Section from emp;
BEGIN
Open c1;
fetch c1 into outname,outroll;

Here out of 3 columns in cursor is it possible to fetch only two columns using FETCH like i did above?

View 1 Replies View Related

Application Express :: Hyperlink Column With Link Parameters As Region Column Values

Apr 10, 2013

On my APEX page i have region which has sql query as source and it displays as HTML table the query result to the user.

I want to display addinonal column with a hyperlink inside, and that hyperlink would have CGI/URL-parameters which contains the other values of the HTML row.

So, let's say my APEX region queryes columns as "select c1, c2, c3, c4 ..." and displays out values "V1, V2, V3, V4" then i want to have addional output column with such hyperlink:

a href="f?p=100:7:13467554876288::NO::c1,c2,c3,c4:v1,v2,v3,v4">My link column with CGI-parameters</aHow can i create such hyperlink?

The overall idea is that the link would forward to a page which loads those values "v1,v2,v3,v4" into form fields and user can proceed from there.

---

"Application Express 4.2.1.00.08"

View 2 Replies View Related

Application Express :: Can Pass More Than 3 Column Values With A Column Link

Jun 19, 2012

I want to pass multiple column values of a row in an interactive report page to hidden items in another page through column link. And I did it successfully. However, I found I need to pass more than 3 columns of a row in this report, while a column link only permits me to pass 3 column value at most. Is there anyway that I can pass more column values to hidden items in another page?

View 3 Replies View Related

PL/SQL :: Database Link From 11g To 10g?

Jul 5, 2012

I am trying to create a database link from the 11g database to the 10g database using:
create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;

It Returns
Database link created.

select sysdate from dual@ORCL10R2 returns error:
ERROR at line 1:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

what changes I need to make to tnsnames and listener at both servers.

View 1 Replies View Related

SQL & PL/SQL :: Insert Values Through View?

Mar 30, 2012

how to insert values through view.

View 5 Replies View Related

PL/SQL :: Query With Group By - Fetch Data From Database

Jul 26, 2013

I am trying to write a proper query to fetch data from database. Scenario:

I need to retrieve employees who are not working in multiple departments. scott@TESTCRM> select * from emp1;     

EMPNO     DEPTNO
---------- ----------     
7654         30      7698         30      7788         20      7788         30      7876         20      7900         10      7900         30    7902     20    7934     10 

scott@TESTCRM>  

Ouput Expected is      

EMPNO     DEPTNO
---------- ---------- 
7654         30      7698         30      7876         20      7902         20      7934         10

View 9 Replies View Related

OLE DB :: How To Fetch Host Database In System To Run Web Application

Nov 4, 2012

i am having database in server and i have to run my web application in client machine. how to set the connection of server database in web.config file.

View 1 Replies View Related

Database Link Not Active

May 15, 2013

I am newbie to oracle database.

I am using oracle 9i version and in EMCA satndalone application . I have created database links.

The database links have been created, and three databases are local.

When i am pressing the test button in emca . It gives notification database link not active.

What should i do?

View 3 Replies View Related

SQL & PL/SQL :: Using A Database Link In A Scheduled Job?

May 12, 2010

A procedure in a package uses a database link. The database link is defined without a username and a password. The user that uses the database link is supposed to be present in the opposite database as wel.

When the procedure is started in SQL*Plus or TOAD it runs perfect. But the procedure has to run in a scheduled job. And that doesn't work. The procedure fails because of: ORA-01017 invalid username/password. The user that is used to run the scheduled job is the right one.

View 5 Replies View Related

SQL & PL/SQL :: Database Link Creation

Jan 28, 2013

I have installed oracle database 11gr2 in laptop1 and installed oracle database 11gr2 in laptop2.Both the laptop's are connected to same internet connection through wifi. So my question is can i create a database link between these two databases using this wifi? give some steps in creation of a database link.

View 13 Replies View Related

DB LINK To External Database?

Jul 10, 2013

i need access to a view running on another database server. i configured my db link and tried to compile the view. but the following message occurs: ora-12154: TNS: Connection Identifier..

View 16 Replies View Related

INSERT Values In A VIEW With INNER JOIN

Aug 5, 2011

I have a question related with VIEWS

I would like INSERT data in a VIEW with a INNER JOIN, like this example:

CODECREATE VIEW MYVIEW (order_id,list_price,customer_id) AS
SELECT order_id, list_price, customer_id FROM ORDERS o
INNER JOIN PRODUCT_INFO p ON (o.order_id= p.pdt_id);

INSERT INTO MYVIEW VALUES (4,500,10); /* will cause an error*/

But when I try to execute the insert statement, the "SQL Developer" returns a error:

ORA-01779 - "cannot modify a column which maps to a non key-preserved".

Why can't I do it? Are there some way to do it?

View 3 Replies View Related

Link Server Database To Oracle DB?

Jan 9, 2012

I found a link to a topic concerning this issue (click here), but the question mentions that the poster was looking for a "band-aid" fix...if this method will work for a more long-term solution

View 1 Replies View Related

Forms :: Where To Create Database Link

Jun 18, 2013

Usually where should we create the database link? In the production or development? create public database link dblinkname connect to user_in_db2 identified by password_in_db2 using 'tnsentry name in db2'; In production or development?

View 2 Replies View Related

Networking And Gateways :: Database Link From 11g To 10g?

Jul 5, 2012

I am trying to create a database link from the 11g database to the 10g database using:

create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;

It Returns

Database link created.

select sysdate from dual@ORCL10R2 returns error:
ERROR at line 1:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

what changes I need to make to tnsnames and listener at both servers.

View 8 Replies View Related

SQL & PL/SQL :: Dynamic Database Link In Procedure?

Jun 7, 2011

Is it possible create dynamically database link within procedure.

It give me the following error

ORA-01031: insufficient privileges

But i can drop database link within procrdure.

Is there any way to do this?

View 4 Replies View Related







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