Unable to execute Map from Database link
Hi
Been trying to research this issue but have had no luck in finding an answer. Here is the situation:
We have an apex application that resides on database "A"
Our OWB Design Repository (11.1.0.7) and Runtime Environment both exist on database "B"
Maps exists and execute under normal procedures as the "ETL" user on database "B", However we would like to allow the "APEX" user to execute a map from database "A" across a database link to a user that can execute the map without any issue.
When we try to execute the map across the database link from toad or sqlplus we get no error returned, the procedure runs and kicks off a map execution (as seen in ALL_RT_AUDIT_EXECUTIONS) or from the control center executions. However the Map execution immediately fails with no explanation as to why??
what makes even less sense is that the user on database "B" that the database link connects to.. can execute the same procedure all day long if logged directly into database "B".. but the moment you try to call it across the database link.. it errors with no message as to why.
We are calling the "WB_WORKSPACE_MANAGEMENT.SET_WORKSPACE".. so that is not the issue.. I am assuming this is either a bug.. or we are missing an additional call/privilege. The user for the database link is a registered user in the workspace, obviously this works since the database link user can run the procedure if logged in locally to database "B"
Any thoughts???
Figured out our problem..
Found RETURN_CODE column in ALL_RT_AUDIT_EXECUTIONS table.. point to -2064 which is an ora-2064
NOTE 1026597.6 - CALLING REMOTE PACKAGE RECEIVES ORA-2064 explains that a commit is issued in a coordinated session from an RPC procedure call with OUT parameters or function call. Action: simplify remote update statement.
The problem here is that "Commit Control" was set to Automatic for the mappings we were calling. Oracle does not like when a transaction is initiated on database "A" and has a commit issued on database "B" from the map.
Makes sense.. we switched the commit control to "Manual" and are able to process correctly by issuing a commit from the session on database "A"
Hope this helps anyone that runs into this issue themselves..
Similar Messages
-
Unable to access values from database in login page..
Hey all,
Friends I have a login.jsp page and I want if i enter username and password then it will be accessed from database and after verifying the details it will open main.jsp.I made a database as "abc" and created DSN as 1st_login having table 1st_login. But the problem is that I am unable to access values from database.
So Please help me.
Following is my code:
<HTML>
<body background="a.jpg">
<marquee>
<CENTER><font size="5" face="times" color="#993300"><b>Welcome to the"<U><I>XYZ</I></U>" of ABC</font></b></CENTER></marquee>
<br>
<br>
<br>
<br><br>
<br>
<form name="login_form">
<CENTER><font size="4" face="times new roman">
Username
<input name="username" type="text" class="inputbox" alt="username" size="20" />
<br>
<br>
Password
<input type="password" name="pwd" class="inputbox" size="20" alt="password" />
<br/>
<input type="hidden" name="option" value="login" />
<br>
<input type="SUBMIT" name="SUBMIT" class="button" value="Submit" onClick="return check();"> </CENTER>
</td>
</tr>
<tr>
<td>
</form>
</table>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc:odbc:1st_login");
Statement statement = connection.createStatement();
String query = "SELECT username, password FROM 1st_login WHERE username='";
query += request.getParameter("username") + "' AND password='";
query += request.getParameter("password") + "';";
ResultSet resSum = statement.executeQuery(query);
//change: you gotta move the pointer to the first row of the result set.
resSum.next();
if (request.getParameter("username").equalsIgnoreCase(resSum.getString("username")) && request.getParameter("password").equalsIgnoreCase(resSum.getString("password")))
%>
//now it must connected to next page..
<%
else
%>
<h2>You better check your username and password!</h2>
<%
}catch (SQLException ex ){
System.err.println( ex);
}catch (Exception er){
er.printStackTrace();
%>
<input type="hidden" name="op2" value="login" />
<input type="hidden" name="lang" value="english" />
<input type="hidden" name="return" value="/" />
<input type="hidden" name="message" value="0" />
<br>
<br><br>
<br><br>
<br><br><br><br><br>
<font size="2" face="arial" color="#993300">
<p align="center"> <B>ABC © PQR</B>
</BODY>
</HTML>
and in this code i am getting following error
C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:93: cannot find symbol_
C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:93: cannot find symbol_
C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:94: cannot find symbol_
C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:95: cannot find symbol_
4 errors
C:\Project\SRS\nbproject\build-impl.xml:360: The following error occurred while executing this line:
C:\Project\SRS\nbproject\build-impl.xml:142: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 6 seconds)As long as you're unable to compile Java code, please use the 'New to Java' forum. This is really trival.
To ease writing, debugging and maintenance, I highly recommend you to write Java code in Java classes rather than JSP files. Start learning Servlets. -
Execute procedure over database link
Hi,
I''m working on a package where you can select the required database, paste some query and with clicking on a button it will execute and create an explain plan for this query.
Therefore i've create a procedure on each database that put's the explain plan in the PLAN_TABLE.
To do this i need to execute this prodecure from the package. I use the following code:
DBA_OWNER.DB_PCD_EXPLAIN_PLAN@DBA_LINK_533.WORLD(p_query);
This is working fine as this database link allready exists to the required database. But i want to make the database link name variable. I've allready created the dynamic database link:
l_link varchar2(20) := 'DBA_LINK';
l_link_nr number(4) := dbms_random.value(0,1000);
l_db varchar2(20) := l_link||'_'||l_link_nr;
l_statement varchar2(4000);
begin
l_statement := 'create database link '||l_db||' connect to **** identified by ***** using '''||p_database||'.WORLD''';
execute immediate l_statement ;
So now i have the dynamic databaselink that is created each time i call the package.
now i want to use this databaselink to call the procedure. this is where it goes wrong.
The code i'm using:
DBA_OWNER.DB_PCD_EXPLAIN_PLAN@l_db(p_query);
is not acceoted when i build the package.
The follwoing error message is showed.
PACKAGE BODY DBA_OWNER.PCK_EXPLAIN_PLAN
On line: 66
PLS-00352: Unable to access another database 'L_DB'
Does someone know how to use this variable to execute the procedure on the remote db?Any procedures you call have to be accessible at compile time, so the database link must also exist at compile time.
You can get around this by putting your procedure call to DB_PCD_EXPLAIN_PLAN inside dynamic SQL, the same as you are doing to create the database link. Dynamic SQL is not checked until runtime.
Think about the risk if this procedure is exploited. You are creating a way for someone to run arbitrary code in an any database in your environment, with presumably a highly-privileged ID, if it can run an explain plan against any schema in any target database.
This is exposing some significant security issues. Read up on SQL injection, and have someone else review the code for security issues before deploying this. -
Procedure containg select from Database link
Hi,
I have one database link xxx which is getting some data from one table from Sqlserver database.
Now I am writing one procedure which contain
if(c=1) --get from databaselink
select name,num from table1@xxx;
else --get from the Oracle table;
Now iam calling that procedure from .net application which is giving the following error :ORA-01002: fetch out of sequence
ORA-02063: preceding line from FSPDEV_TO_AVERY_ORGRPT
it is giving the above error if c=1 otherwise the else part is working fine.
What i need to do?
ThanksHi,
Thanks for your response.
my procedure is like this:
Cur_Out sysrefcursor
if(c=1) --get from databaselink
Open Cur_out for
select name,num from table1@xxx;
else --get from the Oracle table;
Open Cur_out for Select from Oracle table;
I will try to execute the procedure from SQLPLUS.
thanks -
Execute stored procedures + database link
Hi,
I have a stored procedure named "proc1" in the "user1" schema in the "db1" database.
I have another database "db2".
I have a public database link named "db2_to_db1", which connects from the "db2" database to "db1" database connecting with the user "user1" from "db1". I tested the database link.... is OK.
I have a public synonym for "user1"."proc1"@"db1" named "p_proc1"
So, I want to execute the stored procedure "proc1" from "db2".
I tried this from Forms and SQLPLUS...
(1)
DECLARE
BEGIN
p_proc1(...,...,...);
END;
(2)
DECLARE
BEGIN
user1.p_proc1(...,...,...)@db2_to_db1;
END;
(2)
DECLARE
BEGIN
p_proc1(...,...,...)@db2_to_db1;
END;
.........but no one of those codes are right, I got an error like this:
ORA-06550: line 12, column 3:
PLS-00201: identifier 'SDI_CON_TRAFO_SID' must be declared
Please I need some help....
What can I do in order to execute a stored rpocedure of other database with a databse link??????
I almost forget.... I already checked the "execute" privilegies over the stored procedure.... and is OK.What is the identifier 'SDI_CON_TRAFO_SID'? It sounds like you have a problem with dependencies rather than with how to call it.
-
How to recover password from Database link in Oracle 10G
Hi guys,
How can I get a user password from DBLink in Oracle 10G?
From sys.link$ the column "PASSWORD" is empty and the crypted data comming from the new column "PASSWORDX" does not work by using "... identified by values..."
Any idea?
Thanks...Why do you need to know the password? If you need to re-create the link in another database you can use dbms_metadata to generate the DDL for the database link and for a fixed database link the DDL will include an encrypted password that will match the remote database password.
select dbms_metadata.get_ddl('DB_LINK','Link_name','Owner') from sys.dual
On version 9.2 it extracts the actual visible plan text password. On 10g+ encrypted representation in values clause
HTH -- Mark D Powell -- -
Create View from Database Links - Question
Question
I'm missing something simple.
I'm trying to create a view, from a Database Link.
CREATE VIEW view_name
AS SELECT a.*
FROM schema.tablename@dblink a;
When I run this in the SQL Commands window.
I get this error message.
ORA-00933: SQL command not properly ended
What am I missing? Any help is appreciated...<i>CREATE VIEW vw_name
AS SELECT a.*
FROM [email protected] a;
</i>
<br>
1) User (schema) which is creating view must have proper db_link to source database. For that try this for testing purpose:
select 1 from [email protected]<br>
If this fail then db_link is not ok! This step is absolute must to go any further step to!!!
<br>
2) when db_link is set, then your view should be named as:
CREATE VIEW vw_name
AS SELECT *
FROM <b>schema_name</b>.[email protected];<br>
please pay attention to "schema_name", because from remote side every table is in some schema so it really need declaration of owner schema.
<br>
Hope this helps... -
Return ref cursor from database link/stored proc? do-able?
Is it possible to return a REF CURSOR from a stored procedure that is being called from a remote database via a database link???
We are trying from Pro*Cobol on MVS (which has db link pointing to AIX thru db link) and get a 00993 error, which seems to say this is not possible.
Before I give up, thought I would check with the experts....
Thanks in advance.You can't return Java objects as stored procedure or query results.
Douglas -
Query builder: tables from Database Link
Hi APEX people,
Is there a way to use tables from a (remote) Database Link in the Query Builder?
In the Query Builder I seem to have only access to locally (schema) stored tables.
I already tried to define a Synonym for the remote tables I wanted to use, but that didn't work either.
Thanks in advance.
MauriceHi,
First of all, can you select from them ie
SELECT *
FROM my_table@my_linkAlso you can't see them as tables in the schema because they're not tables in the schema.
Try creating a view like...
CREATE OR REPLACE FORCE VIEW m_table_vw AS
SELECT *
FROM my_table@my_link;You should be able to see the view in the schema in the query builder and use that.
Cheers
Ben -
Hi,
I have a map which conditionally inserts data tables. The map works fine if I execute using from OWB UI. It inserts data as expected.
The same map if executed from PL/SQL it doesn't execute.
Status from PL/SQL...
declare
v varchar2(1000);
begin
map_abc.main(v,123);
end;
Audit run id = 270625
Return result = OK
Execution status = COMPLETE
No. task errors = 0
No. task warnings = 0
No. errors = 0
No. selected = 0
No. inserted = 0
No. updated = 0
No. deleted = 0
No. discarded= 0
No. merged = 0
No. corrected= 0
select mr.execution_audit_id,
mr.map_name "Map Name"
, to_char(r.start_time,'DD-MON hh24:mi') "Exec Date"
, to_char(trunc(r.elapse_time/60))
|| 'm '
|| to_char(r.elapse_time - 60 * trunc(r.elapse_time/60))
|| 's' "Exec Time"
, nvl(r.number_records_merged,0)+nvl(r.number_records_inserted,0)+nvl(r.number_records_updated,0) "No Records"
from all_rt_audit_map_runs mr
, all_rt_audit_step_runs r
, all_rt_audit_step_run_targets t
where execution_audit_id = 270625
and mr.map_run_id = r.map_run_id
and mr.map_run_id = t.map_run_id
and r.step_id = t.step_id
and r.run_status = 'COMPLETE'
order by r.start_time DESC;
No Rows found
---- Status from OWB
Returns Audit id 270634.
Audit ID MapName Exec Date Time Rows
270634 "MAP_ABC" 16-JUL 13:53 0m 0s 1
270634 "MAP_ABC" 16-JUL 13:53 0m 0s 0
270634 "MAP_ABC" 16-JUL 13:53 0m 0s 0
270634 "MAP_ABC" 16-JUL 13:53 0m 0s 2
Any Ideas/thoughts
-DvvB
Edited by: user512679 on Jul 17, 2009 9:56 AMIt only happens when any previous execution of the map in SQL fails then all the subsequent map executions completes 'OK' without processing any rows and without logging any audit information.
Execute the map in New SQL session to have successful execution.
-DvvB -
Unable to execute javascript from backing bean
Hello experts, I want to execute javascript function from backing bean method.
In my .jsff page, I have added the javascript as :
<jsp:root ..... >
<af:resource type="javascript" >
function fileDownloadJS() {
alert(" tesing js from backing bean");
</af:resource>
</jsp:root>
in my backing bean method :
public void callJSfuntion(ActionEvent actionEvent) {
RenderKit rk = FacesContext.getCurrentInstance().getRenderKit();
ExtendedRenderKitService erks = (ExtendedRenderKitService) Service.getService(rk, ExtendedRenderKitService.class);
erks.addScript(context, "fileDownloadJS();");
I have table in my .jsff page, inside table column, I have command link and when I click the link, I am invoking bean method :
<af:table ....>
<af:column sortProperty="title" sortable="true"
headerText="File name" width="250px" id="Title"
clientComponent="true">
<af:commandLink id="cl1" actionListener="#{MyBean.callJSfuntion}" clientComponent="true">
<af:outputText value="#{row.title}" id="ot1"/>
</af:commandLink>
</af:column>
.</table>
But when I run my taskflow and click on the link inside the table column, JS function is not invoked.
Absolutely no clue what is the issue.
Appreciate if you can help me out to resolve this issue. Thank you.For debugging purpose can you try :
<script type="javascript" >
function fileDownloadJS() {
alert(" tesing js from backing bean");
</script>
put it on top of the page and let me know what happens.
If it doesn't work try writing the function itself in your addScript(context, script); to see if it works. -
Execute report from database procedure
I want to know if some way exists of sending to execute a. rdf (that in turn generates a pdf) from a procedure stored in the database. This because I want it to execute (the procedure) from a job of the database. thank you, ahead of time."
hello,
this functionality will be provided in oracle9i reports (as part of 9iAS release 2). in 6i you can submit an HTTP-request using the databse-package UTIL_HTTP.
regards,
the oracle reports team -
Finding whole mapping from database file - filesystems - logical volume manager - logical partitions
Hello,
Trying to make reverse engeneering of database files and their physical carriers on logical partitions ( fdisk ).
And not able to make whole path from filesystem down to partitions with intermediate logical volumes.
1. select from dba_data_files ...
2. df -k
to get the listing of filesystems
3. vgdisplay
4. lvdisplay
5. cat /proc/partitions
6. fdisk /dev/sda -l
fdisk /dev/sdb -l
Problem I have is that not able to determine which partitions are consisten in logical volumes. And then which logical volumens are consisted in filesystem.
Thank you for hint or direction.Hello Wadhah,
Before start the discussion let me explain I am newcommer to Oracle Linux. My genetic with dba experience of Oracle is from IBM UNIX ( AIX 6.1 ) and Oracle 11gr2.
First task is to get the complete picture of one database on Oracle Linux for future maintenance tasks and make database more flexible and
preparing for more intense work:
-adding datafiles,
-optimize/replace archive redolog files on separated filesystem from ORACLE_BASE
- separating auditing log files from $ORACLE_BASE to own filesystem
- separating diag directory on separated file system ( logging, tracing )
- adding/enlarging TEMP ts
- adding/enlarging undo
- enlarging redo for higher transaction rate ( to reduce number of switched per time perceived in alert_SID.log )
- adding online redo and control files mirrors
So in this context try to inspect content of the disk space from the highest logical level in V$, DBA views down to fdisk partitions.
The idea was to go in these steps:
1. select paths of present online redo groups, datafiles, controlfiles, temp, undo
from V$, dba views
2. For the paths got from the step 1
locate filesystems and for those filesystems inspect which are on logical volumens and which are directly on partitions.
3. For all used logical volumes locate the logical partitions and their disks /dev/sda, /dev/sdb, ... -
Views created from Database link over dg4msql has column type as long
Hi All,
I am reading some views from SQL server using dg4msql to Oracle database 11G r2.
All working well except columns that are typically varchar2 are now of type LONG. This is causing issues given the wide range of restrictions of data type long.
Is there a way that when I create a view in Oracle like:
CREATE or replace view as v1 (
select a1, a2, a3 from msqlserver_table@dblink)The columns don't come up as long but as varchar2??
Problem is once its in long format, I can't change it to another format in a SELECT statement (like cast it as varchar 2 etc)\
Thanks.
Edited by: xarg-Xrc on Oct 3, 2012 7:26 PMHi kgronau,
Here is the output of the command
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT mm/dd/yyyy
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET AL32UTF8
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE -
Execute Mapping from OMBPlus (TCL Scripting)
Hi Experts,
I was going through OMB Plus Commands. However could not find the option to execute OWB Mapping. I am planning to execute an OWB Map of whose name i will send as a parameter to the script and it will execute only that particular Map.
Could you please help me with this.
Regards,+
Ravi R+Try this:
OMBSTART MAPPING '$mapname' IN '$targetlocation'
Maybe you are looking for
-
How could be possible to deliver Mac Pro without a keyboard?
I've ordered my Mac Pro in Bulgaria from the local Apple reseller - http://www.bbs.bg/ but when they delivered my Mac I've found that there isn't keyboard. There is a mouse, software, manuals, cables, but the keyboard is missing. Peter Penkov, Busine
-
Oracle DB Link from Oracle to SQL Server
Dear buddies, I am trying to create a dblink from Oracle to SQL Server. This is my tnsnames.ora sq = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=LOCALHOST)(PORT=1521) (CONNECT_DATA=(SID=sq)) (HS=OK) )This is my listener SID_LIST_LISTENER =
-
How to handle line item for posting a document
Hello, I am using a function module to post a document, so far I have hard coded all the values in the test program. I am passing two internal tables to the function module, one which has header data and the other which has line item data. So far I h
-
How do I make itunes launch when I connect my device. When connecting my nano,the drive information comes up like I was using my computer instead of launching itunes.
-
Unable to create account for SAPserviceEC6
Hi, I have the above problem when trying to install 6.0. We reformat the server clean few times and still have the same error message. happened in step 3: Create user for SAP system, Log: INFO 2009-08-08 22:45:47.991 Nothing to do. User privileges a