OWB sql
How can I use my own written SQL in mapping without using the expression builder. Like if I want a subquery.
Is there any function to get start and end date of month from current date.
Hi Tom
I'm pretty sure you can use yur own SQL inside OWB, I'm just not certain how. As I have mentioned before I don't have an OWB version up and running where I am so I am unable to check.
Regarding the functions you asked, it all depends as to whether you are using a fiscal period or a calendar period. Let's assume you're using a calendar period where the 1st of the month is the start date and the 30th or 31st (or 28th or 29th if February) is the end date. Look at this code:
Start date:
TRUNC(SYSDATE, 'MM')
End date:
TRUNC(ADD_MONTHS(SYSDATE, 1), 'MM') - 1
I hope this helps
Best wishes
Michael Armstrong-Smith
URL: http://learndiscoverer.com
Blog: http://learndiscoverer.blogspot.com
Similar Messages
-
OWB : SQL*Loader configuration ?
Hi,
I've just migrated to OWB 11.2.0.3, Windows XP, 32 bit client, to 11.2.0.3 database server (RHEL6 64bit).
I've been using a 'bespoke' SQL*Lodaer (sqlldr) script, in version 10, which is located under the $OWB_HOME path. Would anyone know if it's possible to configure OWB 11.2.0.3 to execute a 'bespoke sqlldr' script from a user specified location, please ?
Thanks,
NigelHi Nigel
There's a blog post below that should give you help...
https://blogs.oracle.com/warehousebuilder/entry/owb_invoking_sql_loader_from
Cheers
David -
There are some reports on the OWB exchange for SQL Developer primarily based on the OWB runtime audit views for OWB 10gR2. They are based on the public views and should be used with SQL Developer 1.1 and up. They have been used when developing process flows and maps to get a quicker turnaround time of diagnosing problems and progressing. They are not all encompassing but are handy if you already use SQL Developer.
Exchange:
http://www.oracle.com/technology/products/warehouse/htdocs/OWBexchange.html
Zip with reports and overview:
http://www.oracle.com/technology/products/warehouse/htdocs/Experts/owb_sqldeveloper.zip
If anyone has comments or additional reports that are useful let me know.
DavidEach of my reports has its own tab. The main report has a tab. Then when I drill down it opens a new tab.
So for me I just select the main report tab.
What tabs open when you run the main report and then drill down one level? -
Execute SQL*Loader mapping
Hi all,
I'm trying to execute a deployed OWB SQL*Loader mapping, using the oem_exec_template.sql script. I've got the following error:
Stage 1: Decoding Parameters
| location_name=ORA_LOC_DWH
| task_type=SQLLoader
| task_name=MAP_SA_AGGK_FEVO
Stage 2: Opening Task
declare
ERROR at line 1:
ORA-20001: Task not found - Please check the Task Type, Name and Location are
correct.
ORA-06512: at line 268
I can execute the mapping out of the OWB client and I'm also have no problems to execute a PLSQL mapping via that script.
Did anybody use this script for a SQL*Loader mapping before?
Regards UweHi Jean-Perre,
the names of the location and the mapping should be OK. Only the mapping STEP_TYPE seems to be different (UPPERCASE) to the one which is used inside of your script.
OMB+> OMBRETRIEVE ORACLE_MODULE 'ORA_DWH_SA' GET REF LOCATION
ORA_LOC_DWH
OMB+> OMBCC 'ORA_DWH_SA'
Context changed.
OMB+> OMBLIST MAPPINGS
MAP_SA_AGGK_FEVO MAP_SA_AGGK_KK_KONTO MAP_SA_AGGK_KK_KUNDE MAP_SA_BCV_YT
OMB+> OMBRETRIEVE MAPPING 'MAP_SA_AGGK_FEVO' GET PROPERTIES (STEP_TYPE)
SQLLOADER
The mapping is deployed, otherwise i couldn't execute the mapping out of the OWB client.
Regards Uwe -
Oem_exec_template.sql
I am planning to schedule mappings using OEM and referred this:
http://www.oracle.com/technology/products/warehouse/htdocs/oem_scheduling_viewlet_swf.html
But I cannot find oem_exec_template.sql script in the mentioned directory.....I am using OWB 11gor here is the script:
rem SYNOPSYS
rem
rem @oem_exec_template.sql rt_owner location_name {PLSQL | SQL_LOADER | PROCESS} task_name system_params custom_params
rem
rem NAME
rem
rem oem_exec_template.sql - OEM Execution Template
rem
rem USAGE
rem
rem rt_owner := e.g. MY_RUNTIME - Name of the Runtime Repository Owner
rem
rem location_name :- e.g. MY_WAREHOUSE - Physical Name of the Location to which this task was deployed
rem (i.e. a DB Location or a Process Location or the Platform Schema)
rem Note: Always use "PlaformSchema" for SQL_LOADER types.
rem
rem task_type :- PLSQL - OWB PL/SQL Mapping
rem | SQL_LOADER - OWB SQL*Loader Mapping
rem | PROCESS - OWB ProcessFlow
rem
rem task_name :- e.g. MY_MAPPING - Physical Name of the Deployed Object
rem
rem custom_params :- { , | (name = value [, name = value]...)}
rem e.g. ","
rem or MY_PARAM=1,YOUR_PARAM=true
rem
rem system_params :- { , | (name = value [, name = value]...)}
rem e.g. ","
rem or MY_PARAM=1,YOUR_PARAM=true
rem
rem RETURNS
rem
rem 0 if task reports SUCCESS or WARNING, otherwise >0
rem
rem
rem DESCRIPTION
rem
rem This SQL*Plus script can be pasted into a user-defined OEM SQL*Plus Job. This job
rem can be then used with OEM's 'Create Like' functionality to either create new
rem parameterized jobs or to submit new jobs for immediate execution.
rem
rem This script is design to be run from a Runtime User, not the Runtime Repository Owner.
rem The Runtime Repository Owner is nominated to the parameters.
rem
rem In its unchanged form the script takes the three keys required to identify
rem the executable task.
rem
rem The task is executed with the default parameters configured prior to deployment.
rem
rem The custom_params and system_params values override the default input parameters
rem of the task.
rem
rem Note: The comma character can be escaped using the backslash character; likewise the backslash
rem character can be escaped by itself.
rem
rem A list of the valid System Parameters for each task type can be obtained from the OWB
rem documentation, but generally the deployed defaults are sufficient. The Custom Parameters
rem are defined on the object in the OWB Designer.
rem
rem EXAMPLE
rem
rem @oem_exec_template.sql MY_RUNTIME MY_WAREHOUSE PLSQL MY_MAPPING "," ","
rem @oem_exec_template.sql MY_RUNTIME PlatformSchema SQL_LOADER MY_LOAD "," ","
rem @oem_exec_template.sql MY_RUNTIME MY_WORKFLOW PROCESS MY_PROCESS "," ","
rem
rem Note: @oem_exec_template.sql must not included in the OEM parameter field as is added
rem automatically by OEM.
define OEM_FRIENDLY=true
set serveroutput on
set verify off
whenever sqlerror exit failure;
define REPOS_OWNER=&1
define LOCATION_NAME=&2
define TASK_TYPE=&3
define TASK_NAME=&4
define SYSTEM_PARAMS=&5
define CUSTOM_PARAMS=&6
alter session set current_schema = &REPOS_OWNER;
set role wb_r_&REPOS_OWNER, wb_u_&REPOS_OWNER;
variable exec_return_code number;
declare
l_oem_style boolean := &OEM_FRIENDLY;
l_audit_execution_id number; -- Audit Execution Id
l_audit_result number := wb_rt_api_exec.RESULT_FAILURE; -- Result Code
l_audit_result_disp varchar2(64) := 'FAILURE'; -- Result Display Code
l_task_type_name varchar2(64); -- Task Type Name
l_task_type varchar2(64); -- Task Type
l_task_name varchar2(64); -- Task Name
l_location_name varchar2(64); -- Location Name
procedure override_input_parameter
p_audit_execution_id in number,
p_parameter_name in varchar2,
p_value in varchar2,
p_parameter_kind in number
is
l_parameter_kind varchar2(64);
begin
if p_parameter_kind = wb_rt_api_exec.PARAMETER_KIND_SYSTEM
then
l_parameter_kind := 'SYSTEM';
else
l_parameter_kind := 'CUSTOM';
end if;
dbms_output.put_line('| ' || p_parameter_name || '%' || l_parameter_kind || '=' || '''' || p_value || '''');
wb_rt_api_exec.override_input_parameter
p_audit_execution_id,
p_parameter_name,
p_value,
p_parameter_kind
end;
procedure override_input_parameters
p_audit_execution_id in number,
p_parameters varchar2,
p_parameter_kind in number
is
l_anchor_offset number := 1;
l_start_offset number := 1;
l_equals_offset number;
l_comma_offset number;
l_value_offset number;
l_esc_offset number;
l_esc_count number;
l_esc_char varchar2(4);
l_parameter_name varchar2(4000);
l_parameter_value varchar2(4000);
function strip_escape
p_escapedString varchar2
return varchar2
is
l_strippedString varchar2(4000);
l_a_char varchar2(4);
l_b_char varchar2(4);
l_strip_offset number := 1;
begin
loop
exit when p_escapedString is null or l_strip_offset > length(p_escapedString);
l_a_char := SUBSTR(p_escapedString, l_strip_offset, 1);
if l_strip_offset = length(p_escapedString)
then
l_strippedString := l_strippedString || l_a_char;
exit;
else
if l_a_char = '\'
then
l_b_char := SUBSTR(p_escapedString, l_strip_offset + 1, 1);
if l_b_char = '\' or l_b_char = ','
then
l_strippedString := l_strippedString || l_b_char;
l_strip_offset := l_strip_offset + 1;
end if;
else
l_strippedString := l_strippedString || l_a_char;
end if;
end if;
l_strip_offset := l_strip_offset + 1;
end loop;
return l_strippedString;
end;
begin
loop
l_equals_offset := INSTR(p_parameters, '=', l_start_offset);
exit when l_equals_offset = 0;
l_start_offset := l_equals_offset + 1;
loop
l_comma_offset := INSTR(p_parameters, ',', l_start_offset);
if l_comma_offset = 0
then
l_comma_offset := length(p_parameters) + 1;
exit;
else
l_esc_count := 0;
l_esc_offset := l_comma_offset - 1;
loop
l_esc_char := SUBSTR(p_parameters, l_esc_offset, 1);
exit when l_esc_char != '\';
l_esc_count := l_esc_count + 1;
l_esc_offset := l_esc_offset - 1;
end loop;
if MOD(l_esc_count, 2) != 0
then
l_start_offset := l_comma_offset + 1;
else
exit;
end if;
end if;
end loop;
l_parameter_name := LTRIM(RTRIM(SUBSTR(p_parameters, l_anchor_offset, l_equals_offset - l_anchor_offset)));
l_parameter_value := strip_escape(SUBSTR(p_parameters, l_equals_offset + 1, l_comma_offset - (l_equals_offset + 1)));
-- Override Input Parameter
override_input_parameter(p_audit_execution_id, l_parameter_name, l_parameter_value, p_parameter_kind);
exit when l_comma_offset >= length(p_parameters)-1;
l_start_offset := l_comma_offset + 1;
l_anchor_offset := l_start_offset;
end loop;
end;
procedure override_custom_input_params
p_audit_execution_id in number,
p_parameters varchar2
is
l_parameter_kind number := wb_rt_api_exec.PARAMETER_KIND_CUSTOM;
begin
override_input_parameters(p_audit_execution_id, p_parameters, l_parameter_kind);
null;
end;
procedure override_system_input_params
p_audit_execution_id in number,
p_parameters varchar2
is
l_parameter_kind number := wb_rt_api_exec.PARAMETER_KIND_SYSTEM;
begin
override_input_parameters(p_audit_execution_id, p_parameters, l_parameter_kind);
null;
end;
begin
-- Initialize Return Code
:exec_return_code := wb_rt_api_exec.RESULT_FAILURE;
-- Import Parameters
dbms_output.put_line('Stage 1: Decoding Parameters');
l_task_type_name := '&TASK_TYPE';
if UPPER(l_task_type_name) = 'PLSQL'
then
l_task_type := 'PLSQL';
elsif UPPER(l_task_type_name) = 'SQL_LOADER'
then
l_task_type := 'SQLLoader';
elsif UPPER(l_task_type_name) = 'PROCESS'
then
l_task_type := 'ProcessFlow';
else
l_task_type := l_task_type_name;
end if;
l_task_name := '&TASK_NAME';
l_location_name := '&LOCATION_NAME';
dbms_output.put_line('| location_name=' || l_location_name);
dbms_output.put_line('| task_type=' || l_task_type);
dbms_output.put_line('| task_name=' || l_task_name);
-- Decode Parameters
begin
-- Prepare Execution
dbms_output.put_line('Stage 2: Opening Task');
l_audit_execution_id := wb_rt_api_exec.open(l_task_type, l_task_name, l_location_name);
dbms_output.put_line('| l_audit_execution_id=' || to_char(l_audit_execution_id));
commit;
-- Override Parameters
dbms_output.put_line('Stage 3: Overriding Parameters');
override_system_input_params(l_audit_execution_id, '&SYSTEM_PARAMS');
override_custom_input_params(l_audit_execution_id, '&CUSTOM_PARAMS');
-- Execute
dbms_output.put_line('Stage 4: Executing Task');
l_audit_result := wb_rt_api_exec.execute(l_audit_execution_id);
if l_audit_result = wb_rt_api_exec.RESULT_SUCCESS
then
l_audit_result_disp := 'SUCCESS';
elsif l_audit_result = wb_rt_api_exec.RESULT_WARNING
then
l_audit_result_disp := 'WARNING';
elsif l_audit_result = wb_rt_api_exec.RESULT_FAILURE
then
l_audit_result_disp := 'FAILURE';
else
l_audit_result_disp := 'UNKNOWN';
end if;
dbms_output.put_line('| l_audit_result=' || to_char(l_audit_result) || ' (' || l_audit_result_disp || ')');
-- Finish Execution
dbms_output.put_line('Stage 5: Closing Task');
wb_rt_api_exec.close(l_audit_execution_id);
commit;
dbms_output.put_line('Stage 6: Processing Result');
if l_oem_style
then
if l_audit_result = wb_rt_api_exec.RESULT_SUCCESS
then
:exec_return_code := 0;
elsif l_audit_result = wb_rt_api_exec.RESULT_WARNING
then
:exec_return_code := 0;
else
:exec_return_code := l_audit_result;
end if;
else
:exec_return_code := l_audit_result;
end if;
dbms_output.put_line('| exit=' || to_char(:exec_return_code));
exception
when no_data_found
then
raise_application_error(-20001, 'Task not found - Please check the Task Type, Name and Location are correct.');
end;
end;
exit :exec_return_code;
; -
Confusion over DBCA script generated for manual RAC DB creation
Version:11.2.0.4/RHEL 6.3
We would like to create our 3-node RAC DB manually. DBCA cannot meet our requirement because our redo log files, datafiles, tempfiles and control files are placed in a complicated manner . If we use DBCA , we will have to spend a lot of time configuring to our requirements after the DB creation.
I generated the DB creation scripts from DBCA (DB Name = BRCFPRD )
DBCA placed the db creation scripts in the specified directory in all the 3 nodes !!
They all have almost the same contents . The only difference being the instance name (BRCFPRD12.sql for Node2, ... etc).
Scripts in each node have the createDB.sql statement which has CREATE DATABASE "BRCFPRD" statement. Why is this ? The database need to be created only from one node. Then why did DBCA place createDB.sql in all nodes ?
I just want to run the script from just one node , say Node1 and it should create the 3-Node RAC DB. How can I do this manually?
-- The scripts genereated by DBCA in Node1
apex.sql
BRCFPRD1.sh
BRCFPRD1.sql
context.sql
CreateClustDBViews.sql
CreateDB.sql
CreateDBCatalog.sql
CreateDBFiles.sql
cwmlite.sql
emRepository.sql
init.ora
interMedia.sql
JServer.sql
lockAccount.sql
ordinst.sql
owb.sql
postDBCreation.sql
spatial.sql
xdb_protocol.sql
-- The contents of the main shell script BRCFPRD1.sh
$ cat BRCFPRD1.sh
#!/bin/sh
OLD_UMASK=`umask`
umask 0027
mkdir -p /optware/product/admin/BRCFPRD/adump
mkdir -p /optware/product/admin/BRCFPRD/dpdump
mkdir -p /optware/product/admin/BRCFPRD/hdump
mkdir -p /optware/product/admin/BRCFPRD/pfile
mkdir -p /optware/product/cfgtoollogs/dbca/BRCFPRD
umask ${OLD_UMASK}
ORACLE_SID=BRCFPRD1; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
echo You should Add this entry in the /etc/oratab: BRCFPRD:/optware/product/oracle/11.2.0:Y
/optware/product/oracle/11.2.0/bin/sqlplus /nolog @/optware/product/BRCFPRD1.sql
-- Contents of BRCFSPRD1.sql
$ cat BRCFPRD1.sql
set verify off
ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
ACCEPT sysmanPassword CHAR PROMPT 'Enter new password for SYSMAN: ' HIDE
ACCEPT dbsnmpPassword CHAR PROMPT 'Enter new password for DBSNMP: ' HIDE
host /optware/product/oracle/11.2.0/bin/orapwd file=/optware/product/oracle/11.2.0/dbs/orapwBRCFPRD1 force=y
host /grid/product/11.2.0/bin/setasmgidwrap o=/optware/product/oracle/11.2.0/bin/oracle
host /optware/product/oracle/11.2.0/bin/srvctl add database -d BRCFPRD -o /optware/product/oracle/11.2.0 -p +DATA/BRCFPRD/spfileBRCFPRD.ora -n BRCFPRD -a "DATA,ARCH_DG"
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD1 -n cimprd175
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD3 -n cimprd177
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD2 -n cimprd176
host /optware/product/oracle/11.2.0/bin/srvctl disable database -d BRCFPRD
@/optware/product/CreateDB.sql
@/optware/product/CreateDBFiles.sql
@/optware/product/CreateDBCatalog.sql
@/optware/product/JServer.sql
@/optware/product/context.sql
@/optware/product/xdb_protocol.sql
@/optware/product/ordinst.sql
@/optware/product/interMedia.sql
@/optware/product/cwmlite.sql
@/optware/product/spatial.sql
@/optware/product/emRepository.sql
@/optware/product/apex.sql
@/optware/product/owb.sql
@/optware/product/CreateClustDBViews.sql
host echo "SPFILE='+DATA/BRCFPRD/spfileBRCFPRD.ora'" > /optware/product/oracle/11.2.0/dbs/initBRCFPRD1.ora
@/optware/product/lockAccount.sql
@/optware/product/postDBCreation.sql
-- Contents of CreateDB.sql in Node1
$ cat /optware/product/CreateDB.sql
SET VERIFY OFF
connect "SYS"/"&&sysPassword" as SYSDBA
set echo on
spool /optware/product/CreateDB.log append
startup nomount pfile="/optware/product/init.ora";
CREATE DATABASE "BRCFPRD"
MAXINSTANCES 32
MAXLOGHISTORY 1
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 3000
DATAFILE SIZE 700M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE SIZE 600M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 SIZE 28672M,
GROUP 2 SIZE 28672M
USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
set linesize 2048;
column ctl_files NEW_VALUE ctl_files;
select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
host echo &ctl_files >>/optware/product/init.ora;
spool offIf you look at scripts generated in Node2 and Node3 , you can see all scripts except the instance specific ones are commented using REM .
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl add instance -d STOMPER -i STOMPER1 -n ugxtlprd186
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl add instance -d STOMPER -i STOMPER2 -n ugxtlprd187
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl disable database -d STOMPER
REM @/u01/product/CreateDB.sql
REM @/u01/product/CreateDBFiles.sql
REM @/u01/product/CreateDBCatalog.sql
REM @/u01/product/JServer.sql
REM @/u01/product/context.sql
<snipped > -
I am loading fixed width flat-files into Oracle tables using OWB (SQL*Loader). What's the best way by which I can test the validity/correctness of data i.e. match apples-to-apples ?
Do you use any test scripts ? If so, then could you please elaborate ?
Uptil now, I have been only checking for count validations but not actual data validation.
Your inputs will be invaluable.
Thanks
John.Hi,
I validate using a set of functions in a package that return substitute values. On the basis of these substitue values records are accepted or rejected. The set contains functions for validation of date & number fields.
So, in short. Write function to validate numbers or dates. Insert known substitue values for erroneous data and validate in the next step on these substitute values.
Hope this is what you're looking for.
Cheers,
Rob -
Process Flow errors - how do you see them
Hi there
Created and deployed a process flow but when run it either comes up with warnings or errors. Really simple process flow to run two mappings which, individually run fine. when run the process flow in Conrol Cenetr has error or warning symbol, click job details but can't see what the error, warning message is.
Any ideas how to see them - this is the first process flow I've created?
Many ThanksHi
You can either;
* use the repository browser and view the audit trail there (must start the browser listener first).
* use the OWB SQL Developer reports that use the public views on the exchange, the error details are recorded in the public views.
http://www.oracle.com/technology/products/warehouse/htdocs/Experts/owb_sqldeveloper.zip
I created these for a quicker turnaround time in building/debugging process flows. The browser is the official mechanism.
This is fixed in 10.2.0.3 - you will see the errors in the control center manager, where you might have expected them in the first place!
Cheers
David -
I have a number of OMB Scripts which import/export etc.. Within this script I capture the password from the user so that I can connect to the repository. I found a new class in the latest java which will mask this password and I want to use this within my TCL Script. From what I've read you should be able to call Java Classes from a TCL Script however it gives me a java.lang.reflect.InvocationTargetException
error. Any help you would be appreciated. (Error at bottom of post)
Thanks
Sean
I've included the Call and the class below.
Within my tcl script
package require java
set t [ java::new finance.ombpass ]
set owbreppass [$t run]
JAVA ombpass.Java
(The Class file ombpass.class in contained in the folder "finance" located under
oracle\product\owb\10204\owb\bin\admin\)
The TCL Source is being called after performing a cd to that directory.
package finance;
import java.io.Console;
public class ombpass{
public String run() {
Console cons = System.console();
char [] pswd = cons.readPassword("Password: ");
String s = new String(pswd);
System.out.println(s);
return s;
ERROR THROWN...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at Launcher.main(Launcher.java:167)
Caused by: java.lang.UnsupportedClassVersionError: finance/ombpass (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at tcl.lang.TclClassLoader.loadClass(TclClassLoader.java:148)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at tcl.lang.JavaInvoke.getClassByName(JavaInvoke.java:712)
at tcl.lang.FuncSig.get(FuncSig.java:216)
at tcl.lang.JavaInvoke.newInstance(JavaInvoke.java:67)
at tcl.lang.JavaNewCmd.cmdProc(JavaNewCmd.java:105)
at tcl.lang.Parser.evalObjv(Parser.java:818)
at tcl.lang.Parser.eval2(Parser.java:1221)
at tcl.lang.Parser.evalTokens(Parser.java:1001)
at tcl.lang.Parser.eval2(Parser.java:1208)
at tcl.lang.Procedure.cmdProc(Procedure.java:161)
at tcl.lang.Parser.evalObjv(Parser.java:818)
at tcl.lang.Parser.eval2(Parser.java:1221)
at tcl.lang.Interp.eval(Interp.java:2189)
at tcl.lang.Interp.eval(Interp.java:2273)
at tcl.lang.SwitchCmd.cmdProc(SwitchCmd.java:141)
at tcl.lang.Parser.evalObjv(Parser.java:818)
at tcl.lang.Parser.eval2(Parser.java:1221)
at tcl.lang.Procedure.cmdProc(Procedure.java:161)
at tcl.lang.Parser.evalObjv(Parser.java:818)
at tcl.lang.Parser.eval2(Parser.java:1221)
at tcl.lang.Interp.eval(Interp.java:2189)
at tcl.lang.Interp.evalFile(Interp.java:2368)
at tcl.lang.SourceCmd.cmdProc(SourceCmd.java:75)
at tcl.lang.Parser.evalObjv(Parser.java:818)
at tcl.lang.Parser.eval2(Parser.java:1221)
at tcl.lang.Interp.eval(Interp.java:2189)
at tcl.lang.Interp.eval(Interp.java:2273)
at tcl.lang.Interp.recordAndEval(Interp.java:2328)
at tcl.lang.TclConsoleThread$2.processEvent(TclShell.java:424)
at tcl.lang.Notifier.serviceEvent(Notifier.java:444)
at tcl.lang.Notifier.doOneEvent(Notifier.java:585)
at tcl.lang.TclShell.run(TclShell.java:170)
at tcl.lang.TclShell.run(TclShell.java:68)
at oracle.owb.scripting.OMBShell.main(OMBShell.java:38)
... 5 more
java.lang.reflect.InvocationTargetExceptionBesides "package require java", you also need to "java import" your class into TCL. For example, this is how I implemented my OMB-SQL package:
package require java
# PVCS Version Information
#/* $Workfile: omb_sql_library.tcl $ $Revision: 2.3 $ */
#/* $Author: michael.broughton $
#/* $Date: 16 Dec 2008 10:10:36 $ */
proc oracleConnect { serverName databaseName portNumber username password } {
# import required classes
java::import java.sql.Connection
java::import java.sql.DriverManager
java::import java.sql.ResultSet
java::import java.sql.SQLWarning
java::import java.sql.Statement
java::import java.sql.CallableStatement
java::import java.sql.ResultSetMetaData
java::import java.sql.DatabaseMetaData
java::import java.sql.Types
java::import oracle.jdbc.OracleDatabaseMetaData
# load database driver .
java::call Class forName oracle.jdbc.OracleDriver
# set the connection url.
append url jdbc:oracle:thin
append url :
append url $username
append url /
append url $password
append url "@"
append url $serverName
append url :
append url $portNumber
append url :
append url $databaseName
set oraConnection [ java::call DriverManager getConnection $url ]
set oraDatabaseMetaData [ $oraConnection getMetaData ]
set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
puts "Connected to: $url"
puts "$oraDatabaseVersion"
return $oraConnection
proc oracleDisconnect { oraConnect } {
$oraConnect close
proc oraJDBCType { oraType } {
#translation of JDBC types as defined in XOPEN interface
set rv "NUMBER"
switch $oraType {
"0" {set rv "NULL"}
"1" {set rv "CHAR"}
"2" {set rv "NUMBER"}
"3" {set rv "DECIMAL"}
"4" {set rv "INTEGER"}
"5" {set rv "SMALLINT"}
"6" {set rv "FLOAT"}
"7" {set rv "REAL"}
"8" {set rv "DOUBLE"}
"12" {set rv "VARCHAR"}
"16" {set rv "BOOLEAN"}
"91" {set rv "DATE"}
"92" {set rv "TIME"}
"93" {set rv "TIMESTAMP"}
default {set rv "OBJECT"}
return $rv
proc oracleQuery { oraConnect oraQuery } {
set oraStatement [ $oraConnect createStatement ]
set oraResults [ $oraStatement executeQuery $oraQuery ]
# The following metadata dump is not required, but will be a helpfull sort of thing
# if ever want to really build an abstraction layer
#set oraResultsMetaData [ $oraResults getMetaData ]
#set columnCount [ $oraResultsMetaData getColumnCount ]
#set i 1
#puts "ResultSet Metadata:"
#while { $i <= $columnCount} {
# set fname [ $oraResultsMetaData getColumnName $i]
# set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
# puts "Output Field $i Name: $fname Type: $ftype"
# incr i
# end of metadata dump
return $oraResults
proc run_exec_template { oraConnect rtOwner locName taskType taskName {custParms ""} {sysParms ""} } {
# rt_owner := e.g. MY_RUNTIME - Name of the Runtime Repository Owner
# location_name :- e.g. MY_WAREHOUSE - Physical Name of the Location to which this task was deployed
# (i.e. a DB Location or a Process Location or the Platform Schema)
# Note: Always use "PlaformSchema" for SQL_LOADER and SAP types.
# task_type :- PLSQLMAP - OWB PL/SQL Mapping
# | SQLLOADERCONTROLFILE - OWB SQL*Loader Mapping
# | PROCESSFLOW - OWB ProcessFlow
# | ABAPFILE - OWB SAP Mapping
# | DATAAUDITOR - OWB DataAuditor Mapping
# | SCHEDULEDJOB - OWB Scheduled Job
# task_name :- e.g. MY_MAPPING - Physical Name of the Deployed Object. This can be optionally qualified
# by the name of a deployed parent, such as the Processflow Package name
# of a Processflow. A module name cannot be used here because it is not
# a deployable object.
# system_params :- { , | (name = value [, name = value]...)}
# e.g. ","
# or MY_PARAM=1,YOUR_PARAM=true
# custom_params :- { , | (name = value [, name = value]...)}
# e.g. ","
# or MY_PARAM=1,YOUR_PARAM=true
# RETURNS
# 1 if task reports SUCCESS, 2 if WARNING, 3 if ERROR
set oraStmt [ $oraConnect createStatement ]
set tmpRslt [ $oraStmt execute "alter session set current_schema=$rtOwner" ]
set tmpRslt [ $oraStmt execute "set role owb_o_$rtOwner" ]
set tmpRslt [ $oraStmt execute "set role owb_d_$rtOwner" ]
set callString "declare x number; begin x := wb_rt_api_exec.run_task('$rtOwner','$locName','$taskType','$taskName','$custParms','$sysParms'); end;"
set oraCall [ $oraConnect prepareCall $callString ]
#$oraCall registerOutParameter { 1 java.lang.Integer int} {4 java:lang:Integer int}
#$oraCall setString 2 $rtOwner
#$oraCall setString 3 $locName
#$oraCall setString 4 $taskType
#$oraCall setString 5 $taskName
#$oraCall setString 6 $sysParms
#$oraCall setString 7 $custParms
$oraCall execute
#set retVal [$oraCall getInt 1]
#set back to the default schema
set oraDatabaseMetaData [ $oraConnect getMetaData ]
set oraUser [$oraDatabaseMetaData getUserName]
set tmpRslt [ oraStmt execute "alter session set current_schema=$oraUser" ]
# SAMPLE CODE to run a quick query and dump the results. #
#set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
#set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
#for each row in the result set
#while {[$oraRs next]} {
#grab the field values
# set procName [$oraRs getString name]
# set procCount [$oraRs getInt numlines]
# puts "Program unit $procName comprises $procCount lines"
#$oraRs close
#oracleDisconnect $oraConnI do not know if you will need to play with classpaths or anything to get a successfull import as I never tried to do anything with custom classes. Oracle also has a demo example of integrating java with OMB+ to create modal dialogs which might provide additional guidance. It is available here: http://www.oracle.com/technology/sample_code/products/warehouse/files/owb_params.html
Good luck with it! -
When you are in the OWB Design Center, you can explore down through your project, into a module, and right click on Views. If you click Import..., you are taken to the Import Metadata Wizard. If I select only View, and then press Next, I am shown a list of Views that I can import. I select one and click Next again, then Finish. The View is now available for use within Design Center (to build mappings, etc.)
I need to automate this process, and have been working with OMB Plus as a solution to automating other things within OWB. My first inclination was to try the OMBIMPORT command, but frankly the documentation is a little cryptic to me on this particular thing. (And I have successfully automated Mapping Creation).
Has anyone done this before? Am I barking up the wrong tree with OMB Plus?
Thanks,
-KennethAnother try.....
#FILE: loadviews.tcl
package require java
# Basic Connection Details
# OWB Repository Connection
set OWB_DEG_USER username
set OWB_DEG_PASS password
set OWB_DEG_HOST myserver
set OWB_DEG_PORT 1555
set OWB_DEG_SRVC orcl
set OWB_DEG_REPOS owb_mgr
set SPOOLFILE "c:/omb/logfile.txt"
# Procedures from our standard OWB library
# Default logging function.
# Accepts inputs: LOGMSG - a text string to output
# FORCELOG - if "1" then output regardless of VERBOSE_LOG setting
proc log_msg { LOGTYPE LOGMSG } {
global SPOOLFILE
set fout [open "$SPOOLFILE" a+]
puts $fout "$LOGTYPE:-> $LOGMSG"
puts "$LOGTYPE:-> $LOGMSG"
close $fout
# Default rollbabk and exit with error code function.
proc exit_failure { msg } {
log_msg ERROR "$msg"
log_msg ERROR "Rolling Back....."
exec_omb OMBROLLBACK
log_msg ERROR "Exiting....."
# return and also bail from calling function
return -code 2
# Generic wrapper for OMB+ calls
proc exec_omb { args } {
# log_msg OMBCMD "$args"
# the point of this is simply to return errorMsg or return string, whichever is applicable,
# to simplify error checking using omb_error{}
if [catch { set retstr [eval $args] } errmsg] {
log_msg OMB_ERROR "$errmsg"
log_msg "" ""
return $errmsg
} else {
# log_msg OMB_SUCCESS "$retstr"
# log_msg "" ""
return $retstr
# Generic test for errors returned from OMB+ calls
proc omb_error { retstr } {
# OMB, Oracle, or java errors may have caused a failure.
if [string match OMB0* $retstr] {
return 1
} elseif [string match ORA-* $retstr] {
return 1
} elseif [string match java.* $retstr] {
return 1
} else {
return 0
# Procedures from our standard OWB/SQL library
proc oracleConnect { serverName databaseName portNumber username password } {
# import required classes
java::import java.sql.Connection
java::import java.sql.DriverManager
java::import java.sql.ResultSet
java::import java.sql.SQLWarning
java::import java.sql.Statement
java::import java.sql.CallableStatement
java::import java.sql.ResultSetMetaData
java::import java.sql.DatabaseMetaData
java::import java.sql.Types
java::import oracle.jdbc.OracleDatabaseMetaData
# load database driver .
java::call Class forName oracle.jdbc.OracleDriver
# set the connection url.
append url jdbc:oracle:thin
append url :
append url $username
append url /
append url $password
append url "@"
append url $serverName
append url :
append url $portNumber
append url :
append url $databaseName
set oraConnection [ java::call DriverManager getConnection $url ]
set oraDatabaseMetaData [ $oraConnection getMetaData ]
set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
puts "Connected to: $url"
puts "$oraDatabaseVersion"
return $oraConnection
proc oracleDisconnect { oraConnect } {
$oraConnect close
proc oracleQuery { oraConnect oraQuery } {
set oraStatement [ $oraConnect createStatement ]
set oraResults [ $oraStatement executeQuery $oraQuery ]
return $oraResults
# MAIN SCRIPT BODY
proc load_view { viewname modulename} {
exec_omb OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_VIEW' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE VIEW '$viewname' SET REF TARGET ORACLE_MODULE '$modulename'
exec_omb OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_VIEW'
exec_omb OMBDROP IMPORT_ACTION_PLAN 'IMPORT_VIEW'
# Connect to repos
log_msg LOG "Connecting to Repository"
set print [exec_omb OMBCONNECT $OWB_DEG_USER/$OWB_DEG_PASS@$OWB_DEG_HOST:$OWB_DEG_PORT:$OWB_DEG_SRVC USE REPOSITORY '$OWB_DEG_REPOS']
if [omb_error $print] {
if [string match OMB01041* $print] {
log_msg LOG "Already connected ....."
} else {
log_msg ERROR "Unable to connect to repository."
log_msg ERROR "Exiting Script.............."
return
} else {
log_msg LOG "Connected to Repository"
# Connect to project
puts -nonewline "Which project do you want to import to? "
set CHK_PROJECT_NAME [gets stdin]
set print [exec_omb OMBCC '$CHK_PROJECT_NAME']
if [omb_error $print] {
log_msg LOG "Project $CHK_PROJECT_NAME does not exist. No Import Required...."
exec_omb OMBDISCONNECT
return
} else {
log_msg LOG "Verified project $CHK_PROJECT_NAME exists"
puts -nonewline "Which module do you want to import to? "
set ORA_MODULE_NAME [gets stdin]
set print [exec_omb OMBCC '$ORA_MODULE_NAME']
if [omb_error $print] {
log_msg LOG "Module $ORA_MODULE_NAME does not exist. No Import Required...."
exec_omb OMBDISCONNECT
return
} else {
log_msg LOG "Verified module $ORA_MODULE_NAME exists"
exec_omb OMBCC '..'
set CURRENT_DEPLOYED_LOCATION [exec_omb OMBRETRIEVE ORACLE_MODULE '$ORA_MODULE_NAME' GET REFERENCE LOCATION]
if [omb_error $print] {
log_msg LOG "Unable to retrieve location to match top . Exiting...."
exec_omb OMBDISCONNECT
return
} else {
log_msg LOG "Retrieved location $CURRENT_DEPLOYED_LOCATION"
set CHK_SCHEMA [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (SCHEMA)]
set CHK_HOST [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (HOST)]
set CHK_PORT [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (PORT)]
set CHK_SERVICE [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (SERVICE)]
set CHK_PASSWORD [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (PASSWORD)]
if [string match "{}" $CHK_PASSWORD] {
#Password not stored in repository
log_msg LOG " "
puts -nonewline "Require password for schema $CHK_SCHEMA? "
set CHK_PASSWORD [gets stdin]
# Validate to Control Center
log_msg LOG "Connecting to Control Center "
set print [exec_omb OMBCONNECT CONTROL_CENTER USE '$CHK_PASSWORD' ]
if [omb_error $print] {
exec_omb OMBROLLBACK
log_msg ERROR "Unable to connect to Control Center "
log_msg ERROR "$print"
exit_failure "Exiting Script.............."
exec_omb OMBCOMMIT
log_msg LOG "Checking existing MetaData."
set print [exec_omb OMBALTER LOCATION '$CURRENT_DEPLOYED_LOCATION' SET PROPERTIES (PASSWORD) VALUES ('$CHK_PASSWORD')]
exec_omb OMBCOMMIT
exec_omb OMBCC '$ORA_MODULE_NAME'
log_msg LOG "Making SQL*Plus Connection...."
set oracle_view_lst {}
log_msg LOG "Getting views defined in database...."
log_msg LOG " "
set oraConn [oracleConnect $CHK_HOST $CHK_SERVICE $CHK_PORT $CHK_SCHEMA $CHK_PASSWORD ]
set sqlStr "select object_name from all_objects where owner = '$CHK_SCHEMA' and object_type = 'VIEW'"
set oraRs [oracleQuery $oraConn $sqlStr]
while {[$oraRs next]} {
set vwName [$oraRs getString object_name]
lappend oracle_view_lst $vwName
$oraRs close
$oraConn close
foreach viewname $oracle_view_lst {
log_msg LOG "Checking view $viewname .... "
#see if view already in OWB. An OMBRETRIEVE will error out if it doesn't exist.
set owb_column_lst [ exec_omb OMBRETRIEVE VIEW '$viewname' GET COLUMNS ]
if [omb_error $owb_column_lst] {
log_msg LOG "Need to import view $viewname "
exec_omb OMBCC '..'
load_view $viewname $ORA_MODULE_NAME
exec_omb OMBCC '$ORA_MODULE_NAME'
} else {
log_msg LOG "View $viewname already in OWB"
log_msg LOG " "
log_msg LOG "Done Views. Exiting..."
log_msg LOG " "
exec_omb OMBDISCONNECT -
Failed to create Database Link in OWB 9.2 for remote SQL Server
Hi,
I have to create Database link for connecting to SQL server in a different machine.I am using OWB 9.2 and XP.
Dataserver is the machine name which is running SQL Server
I included follwing lines in TNSNAMES.ORA file
hsodbc.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dataserver)(PORT = 1433)
(CONNECT_DATA = (SID=hsodbc.world)
(HS =OK)
I included follwing lines in Listener.ORA file
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dataserver)(PORT = 1433)
(SID_DESC=
(SID_NAME=hsodbc.world)
(ORACLE_HOME=C:\ora92)
(PROGRAM=hsodbc)
I included follwing lines in inithsodbc.ORA file
HS_FDS_CONNECT_INFO = testdsn
HS_FDS_TRACE_LEVEL = 0
While creating new database link I gave the follwing values
DB Link Name : Mylink
SQL * Net Connect String: hsodbc
User Name: sa
password:<my password>
Then clicked "Create and Test" button to get the follwing error message
Testing...
Failed.
ORA-12154 TNS:could not resolve service name
*Cause: The service name specified is not defined correctly in the TNSNAMES.ORA file
*Action: Make the following checks and correct the error:
- Verify that a TNSNAMES.ORA file exists on your repository server
in the proper place and is accessible. See the operating
system specific manual for details on the required name and location.
- Check to see that the service name exists in one of the
TNSNAMES.ORA files and add it if necessary.
- Make sure there are no syntax errors in the file.
Particularly look for unmatched parentheses or stray characters.
Any error in a TNSNAMES.ORA file makes it unusable. See
Chapter 4 in the SQL*Net V2 Administrator's Guide. If possible,
regenerate the configuration files using the Oracle Network Manager.
Is there anything wrong in my configuration. Please help me in getting out of this problem.
Thanks in advance
AndyHi Mark,
Thanks Mark.I did the changes in the specified .ora file but now it shows a different error message.
The error is
Testing...
Failed.
Cwm Error Message: SQL Exception
Cwm Error: SQL Exception
Class Name: CacheMediator
Method Name: getDDEntryFromDB
Repository Error Message: ORA-28545: error diagnosed by Net8 when connecting to an agent
NCRO: Failed to make RSLV connection
ORA-02063: preceding 2 lines from MYLINK
Query: select 1 from dual@MyLink
I got the same error when i tried manually in sql plus.
Please help me in getting out of thid problem
Thanks in advance
Andy -
Connect SQL server source from OWB
Hi,
I have to connect to SQL Server source from OWB.
I am using OWB 10.2 version and Owb is installed on UNIX platform.
I have created system DSN, made respective entries in hs/admin and edited listener.ora file.
In OWB Non-Oracle sorces trying to connect with ODBC connection to SQL server source.
It is throwing erorr 'ORA-28545:error diagonised by Net8 agent when connecting to an agent Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from OWB-2339'
How to check System DSN is setup properly on UNIX or not.
Could anyone help out on this.Hi David,
I have created db link and queried with select statement.
It has thrown following error.
" ORA-12537: TNS:connection closed".
And, I don't know how to use "trace level gateway service configuration property in the service .ora file".
I want to start from the first.
Could you please give me the guidelines on, how to connect to a Sql server source(Which is on Remote Server) from OWB.
What are the prerequisites and steps.
Thanks for your help,
Shaik. -
Connect to MS SQL server from OWB on Linux platform
Hi,
I want to connect to MS SQL server through OWB, on Linux platform.
I suppose I would use JDBC driver, and Heterogeneous services. Is that possible?
I did not see anything on JDBC driver for MS SQL server for Linux platform from Oracle.
Also, I was wondering is Oracle Gateway 10g for Linux a way to connect to MSSQL server?
Any leads would be appreciated.
Thanks
AniHi,
This quite an actual topic for myself, so I decided to take some time to collect some information.
Start at:
* Oracle Generic Connectivity and Oracle Transparent Gateway - http://www.oracle.com/technology/products/gateways/gateways_fov.html
You can use the free Heterogenous Services component named Generic Connectivity for connecting to SqlServer over ODBC. You will need to find (or purchase?) a third-party ODBC driver for SqlServer for Linux, e.g. from www.datadirect.com. Setting this up will allow you to define a databaselink to the SqlServer. Open Gateways implements a limited set of the oracle SQL, so you will have to find out what is possible and what not.
See also:
* How To Setup HSODBC on Linux - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=264567.1
* Generic Connectivity Available on Linux x86 with 10g - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=261726.1
You can also use the Transparent Gateway for SqlServer (HS), which is about EURO 12000 per computer(!). This gives you a full implementation of Oracle SQL and you can access the SqlServer like it was Oracle.
You can also install Microsofts JDBC drivers into Oracle's JVM, and connect through JDBC to SqlServer. This is however not supported by Oracle, but it will work. See:
* What is required for a Java Stored Procedure to connect to a SQL Server Database? - https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=276167.1
See also:
* Options for Connecting to Foreign Data Stores and Non-Oracle Databases - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=233876.1
* JDBC Developer's Guide - http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/overvw.htm
Good luck, Erik Ykema -
Error while connecting to SQL SERVER from OWB
HI All,
I got the following error while connecting to SQL SERVER from OWB(10gR2).
1). Created DSN with (GMSCADA)
2). tnsnames file is updated with the following information
GMSCADA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.60.29)(PORT = 1433))
(CONNECT_DATA =
(SERVICE_NAME = SA)
3). Tried to connect to SQL SERVER frm OWB
Username: sa
password: sa
host: 172.16.60.29
port: 1433
service name: GMSCADA
schema: sa
I got the following error, when I click Test Connection:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from OWB_3095
Regards,
Kumar.Hi David,
What is Gateway, How I have to setup, Please let me know.
I tried according to the Demo, But still I am facing the same problem. Which system IP I have to put in the host details.
Can u please let me know.
Regards,
Kumar. -
How to run OWB mappings from SQL*Plus
Hi:
I used to run OWB mappings using the sample code RUN_MY_OWB_STUFF in a customized PL/SQL procedure. This works for OWB 10g release 1 but not for OWB Paris (10g Release 2) because the execution always returns FAILURE.
Is there something new in OWB Paris that RUN_MY_OWB_STUFF doesn't work anymore?
Thanks,
Hazbleydi C. VerásteguiHi Maruthi:
I already check the input parameters of the mapping. I'm setting them as a custom parameters. This is the output of the execution:
16:01:11 SQL> EXEC PR_RUN_OWBMAPPING_TABLA2('MPG_EMPLEADOS_NOMINA_PERIODO',2007,01);
Stage 1: Decoding Parameters
| location_name=LOC_DM_STAGING
| task_type=PLSQL
| task_name=MPG_EMPLEADOS_NOMINA_PERIODO
Stage 2: Opening Task
| l_audit_execution_id=39635
Stage 3: Overriding Parameters
| P_ANO%CUSTOM='2007'
| P_MES%CUSTOM='1'
Stage 4: Executing Task
| l_audit_result=3 (FAILURE)
Stage 5: Closing Task
Stage 6: Processing Result
| exit=3
By the way, RUN_MY_OWB_STUFF is the same as RUN_OWB_CODE.sql except for the two first parameters (p_result and p_audit_id):
create or replace procedure run_owb_code
( p_result out number
, p_audit_id out number
, p_repos_owner in varchar2 default null
, p_location_name in varchar2 default null
, p_task_type in varchar2 default null
, p_task_name in varchar2 default null
, p_system_params in varchar2 default '","'
, p_custom_params in varchar2 default '","'
, p_oem_friendly in number default 0
is
CREATE OR REPLACE function run_my_owb_stuff
( p_repos_owner in varchar2 default null
, p_location_name in varchar2 default null
, p_task_type in varchar2 default null
, p_task_name in varchar2 default null
, p_system_params in varchar2 default '","'
, p_custom_params in varchar2 default '","'
, p_oem_friendly in number default 0
) return number
is
How do you invoke your wrapper PL/SQL with these two first parameters?
Thanks in advance,
Hazbleydi C. Verástegui
Maybe you are looking for
-
Not install itunes on windous 7
friends need your help! not not install itunes on windous 7 already tried all the options to clear the cache, delete all old clean up the registry, turned off the antivirus does not help. writes installer found configuration errors before Itunes. dur
-
Hi All I am using weblogic 10.3.4 over solaris10 x86 vmware. I have jdk1.7.0_05. While starting weblogic admin i am getting below error , can someone please suggest something. JAVA Memory arguments: -Xms512m -Xmx512m WLS Start Mode=Production CLASSPA
-
Downloading Excel File in CSV Format
Hi All, How can I Download a file in .CSV Format? I am using the below shown code. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING BIN_FILESIZE = FILENAME = 'C:\Documents and Settings\sandeepp3\Desktop\sample.
-
I have latest update but some sites tell me i don't.
Trying to access Al Jazerra. No problems before but now keeps telling me I need to update flash player which I have done. Is this a problem with Al Jazerra or my computer? Help! Thank you, myshadowone2007
-
Location reports_path variable
Hi all, we are using reports 11g and need to change the reports_path we have done this before in a file that also contained tns_admin= but can't find this anymore does anyone know the name of this file ? (and I don't mean rwserver.conf, the file we c