Passing System Parameters to sqlplus_exec_template.sql
Hey All,
I am running into problems passing system parameters to a SQL Loader mapping from within a shell script, and I hope someone can pick out what I am doing incorrectly. My call is as follows:
@sqlplus_exec_template.sql OWB9204_RT PlatformSchema SQL_LOADER $2 "data_file_name=$DATA_NAME,log_file_name=$DATA_NAME.log" ","
Here is the result:
Stage 1: Decoding Parameters
| location_name=PlatformSchema
| task_type=SQLLoader
| task_name=INTF_FILENAME_LDR
Stage 2: Opening Task
| l_audit_execution_id=152832
Stage 3: Overriding Parameters
| data_file_name%SYSTEM='filename_0501050745.dat'
declare
ERROR at line 1:
ORA-20016: The specified parameter information is invalid
ORA-06512: at "OWB9204_RT.WB_RTI_EXCEPTIONS", line 82
ORA-06512: at "OWB9204_RT.WB_RTI_EXECUTION", line 514
ORA-01403: no data found
ORA-06512: at "OWB9204_RT.WB_RT_EXECUTION", line 54
ORA-06512: at "OWB9204_RT.WB_RT_API_EXEC", line 187
ORA-06512: at line 32
ORA-06512: at line 134
ORA-06512: at line 164
ORA-06512: at line 214
I am using the system parameters defined in Note 292399.1, and I have tried several variations on syntax. Any help would be greatly appreciated.
David
Well, I answered my own question. It appears that even though note 292399.1 lists data_file_name and log_file_name, they are not modifiable at execution using sqlplus_exec_template. Only those parameters modifiable at execution time using the Deployment Manager can be changed. I tested this using BINDSIZE=5000000, and it ran without a problem.
Similar Messages
-
Passing URL parameters to PL/SQL Pages
Hi,
I want to pass parameters from url to the PL/SQL page . How is this possible?
http://myserver/pls/portal/url/PAGE/page_group/page/testplsqlpage?course_ref=##COURSE_ID##&staff_ref=##STAFF_ID##
I will to received course_ref and staff_ref in the PL/SQL page and pass the values to SQL query so that its filtered.
Can pls anyone guide me? If there is any alternate way or there is sample code pls let me know
Many Thanks
GaneshHi Mick,
Thanks for your reply. However my problem is still not resolved.
I have created a Omniportlet with lists the staff details. When I click on the staff link I am passing to parameters as follows
http://servername/pls/portal/url/PAGE/CCM_MIS_PORTAL/TUTOR_HOME/Course_Info?Param1=10017031/M2523&Param2=001434
on the receving page I have a omni portlet which must receive these 2 parameters and pass it on to the query and filter the results.
On the received page I have created 2 page parameters (Param1 and Param2)
I have assigned these 2 paramaters to the portlet paramers through page parameters' section
on the omni portlet in the query I have created 2 bind variables (p1, p2) and the default value of the bind variable is set using ##Param1## and ##Param2## so the received values from page is passed to to bind variable and hence to the query.
However the omni portlet is not received the parameters and I can not figure out whats wrong?
Is there any problem with my URL (guide says I should use relative URL)
Please help -
Pass date parameters to dataprocessor in Java
Hello I have created java class to execute data templates, but I have problem when I pass date parameters as it was from application dataprocessor fails without any error message and does not return any data (except output xml file header). How to pass date parameters correctly?
import java.sql.*;
import oracle.apps.xdo.dataengine.DataProcessor;
import com.sun.java.util.collections.Hashtable;
class oraConn
public static void main (String args []) throws SQLException
System.out.println("Start");
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
java.util.Properties ora_property = new java.util.Properties();
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:user/pass@host:port:sid");
try {
DataProcessor dataProcessor = new DataProcessor();
dataProcessor.setDataTemplate("/home/user/definition.xml");
Hashtable parameters = new Hashtable();
parameters.put("c_period_start_date","2009/01/01 00:00:00");
parameters.put("c_period_end_date","2009/12/31 00:00:00");
parameters.put("c_employed_before_date","");
parameters.put("c_org_hierarchy","63");
dataProcessor.setParameters(parameters);
dataProcessor.setConnection(conn);
dataProcessor.setOutput("/home/user/Out.xml");
dataProcessor.processData();
} catch (Exception e)
{System.out.println ("Data procesor Fail.");}
} catch (SQLException ex) {
System.out.println ("\n*** SQLException caught ***\n");
while (ex != null) {
System.out.println ("SQLState: " + ex.getSQLState ());
System.out.println ("Message: " + ex.getMessage ());
System.out.println ("Vendor: " + ex.getErrorCode ());
ex.printStackTrace();
ex = ex.getNextException ();
System.out.println ("");
}}}}Found out solution to my problem. I needed to import date not as string but as Date type.
-
Need help about using sqlplus_exec_template.sql
I tried to use sqlplus_exec_template.sql to execute our deployed mapping. At dos prompt I typed :
C:\>sqlplus username/[email protected] @C:\OWB\owb\rtp\sql\sqlplus_exec_template.sql
rtschema localhost SQL_LOADER CRD_APPL_MAPPING SKIP=0,LOAD=0,LOG_FILE
NAME=cvcpmapl.log,DIRECT=true,PARALLEL=false,ERRORS=50,ROWS=200,READSIZE=65536,BINDSIZ E=50000,AUDIT=true,PURGEGROUP=wb,target_store_uoid=F0E49963A42E4DB6AFF
85FFF8E05AB9E
SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 16 18:32:25 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Session altered.
Role set.
Stage 1: Decoding Parameters
| location_name=localhost:1521:odb
| task_type=SQL_LOADER
| task_name=CRD_APPL_MAPPING
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 261
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
=================================================
I am quite sure the task name and task type is correct. The task name is same as the one I saw in runtime repository schema -> table WB_RT_TASKS -> column TASK_NAME
, but I am very doubt about what should be the correct input for LOCATION, system parameter and custom parameter.
Can anyone give some help about where could I find the correct input for those parameter?
Thx in advance.
Rds
CHI 've tried to use :
sqlplus username/[email protected] @C:\OWB\owb\rtp\sql\sqlplus_exec_template.sql
rtschema OWBLOCATION SQL_LOADER CRD_APPL_MAPPING "," ","
where OWBLOCATION I have used the deploy location of the mapping for my case, created within OWB. The value is CCS_DEPLOY.
But the error is the same :
======================================================
Stage 1: Decoding Parameters
| location_name=CCS_DEPLOY
| task_type=SQL_LOADER
| task_name=CRD_APPL_MAPPING
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 261
========================================================
could you tell me the SQL used by WB_RT_API to get the task from runtime schema. So that I could check the correct location myself.
Or how could I view the pl/sql of WB_RT_API_EXEC which is wrapped.
Thx for your help.
Rg.
CH -
Passing user parameters to groovy script
From OIM 11gr2 ,I need to create users into LDAP through OID connector OID-11.1.1.6.0.
After creation , i need to pass user id and other parameters to groovy script to run a command on target system.
How do i pass these parameters to groovy script. Please assistHi,
I am calling the shell script from concurrent program and below is the log file of the concurrent program.
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
KORONT_041_SH module: KORONT - Daily Item Master Update
+---------------------------------------------------------------------------+
Current system time is 29-JUN-2011 10:09:35
+---------------------------------------------------------------------------+
REQUEST_ID: 68510795
USER_ID: 4219
PDC: 85
Item Number:
KORDC: 124
PDCSET: 1100000003
last_updated_in_hours: 24
EMAIL_ID: [email protected],[email protected]
SQLPATH: /e381/oracle/asodev01appl/custom/motont/1.0.0/sql/
RPTDIR: /e381/oracle/asodev01comn/admin/out/ASODEV01_asoprdb2
RPTFILE: o68510795.out
Table truncated.
*Enter value for 6: User requested Interrupt or EOF detected.*
Table truncated.
old 15: AND ic.organization_id = &&4
new 15: AND ic.organization_id = 1100000003
0 rows created.
Input truncated to 9 characters
old 8: AND organization_id = &&4
new 8: AND organization_id = 1100000003
0 rows created.
End of SQL
No record.
+---------------------------------------------------------------------------+
Executing request completion options...
+------------- 1) PRINT -------------+
Printing output file.
Request ID : 68510795
Number of copies : 0
Printer : noprint
+--------------------------------------+
Finished executing request completion options.
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 29-JUN-2011 10:09:38
+---------------------------------------------------------------------------+Regards,
Sreekanth -
Parameters to pl/sql pages
Hi all,
I installed the pdk examples showing how to pass parameters betweens pl/sql portlets. I saw it but not understand very weel. This is the same way to pass parameters between pl/sql pages? Is there any step-by-step that explain how to make the parameters passing more simple?
Best regards,
Joao Vitor.Hi Mick,
Thanks for your reply. However my problem is still not resolved.
I have created a Omniportlet with lists the staff details. When I click on the staff link I am passing to parameters as follows
http://servername/pls/portal/url/PAGE/CCM_MIS_PORTAL/TUTOR_HOME/Course_Info?Param1=10017031/M2523&Param2=001434
on the receving page I have a omni portlet which must receive these 2 parameters and pass it on to the query and filter the results.
On the received page I have created 2 page parameters (Param1 and Param2)
I have assigned these 2 paramaters to the portlet paramers through page parameters' section
on the omni portlet in the query I have created 2 bind variables (p1, p2) and the default value of the bind variable is set using ##Param1## and ##Param2## so the received values from page is passed to to bind variable and hence to the query.
However the omni portlet is not received the parameters and I can not figure out whats wrong?
Is there any problem with my URL (guide says I should use relative URL)
Please help -
How do I Pass a parameter to a SQL Component Task where the source SQL statement is also a variable
Hi,
I have been tasked with making a complex package more generic.
To achieve this I need to pass a parameter to a SQL Component Task where the source SQL statement is also a variable.
So to help articulate my question further I have create a package and database as follows; -
USE [KWPlay]
GO
/****** Object: Table [dbo].[tblTest] Script Date: 05/14/2014 17:08:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblTest](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[Description] [nvarchar](50) NULL,
CONSTRAINT [PK_tblTest] PRIMARY KEY CLUSTERED
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
I populated this table with a single record.
I unit tested the SQL within SSMS as follows;
SELECT * FROM dbo.tblTest
Result; -
ID
Description
1
Happy
DECLARE @myParam NVARCHAR(100)
SET @myParam = 'Sad'
UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
SELECT * FROM dbo.tblTest
Result; -
ID
Description
1
Sad
Within the package I created two variables as follows; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
Name: strStatus
Scope: Package
Data Type: String
Value: Happy
I then created a single ‘Execute SQL Task’ component within the control flow as follows; -
However when I run the above package I get the following error; -
SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = @myParam FR..." failed with the following error:
"Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.
The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the
errors.
SSIS package "Package.dtsx" finished: Failure.
I also tried; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
However I received the error; -
SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = ? FROM dbo...." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with
the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
Kind Regards,
Kieran.
Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/Tried; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
and; -
Result; -
SSIS package "Package.dtsx" starting.
SSIS package "Package.dtsx" finished: Success.
Therefore the answer was to put the parameter number rather than the parameter name under the parameter mapping tab-> parameter name column.
Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/ -
Passing an argument in the SQL Query of a View Object
Hi,
It is possible that this question has been asked before, however I have searched for a half an hour in the forums and couldn't find a solution.
I am also new to using JDeveloper and ADF. Here's the situation:
I am developing an application that doesn't have to do anything else then displaying data from a database. Pretty straightforward actually.
Now I have made a vew pages with several collapsible panels (af:showDetailHeader) and have setup the datasources (or so I thought).
All that remains is:
- drag & drop a view object, from the application module that I created, onto the collabsible panels, so a child element gets created which displays data from the database.
- hack the layout so it looks like I want it to.
The problem that I have is the following:
I am using a 'User'-class that contains values I need when quering the database.
That User-object is part of a user-session.
What I want, for example, is to use the 'getPersonId()' function of that User-object and pass the argument to a SQL-query of a certain view-object.
The query would become something like:
'SELECT * FROM people WHERE people.personId = :someNumber'.
Now I've read some stuff about variable binding, which is complemented by something like (backing bean code):
getDBTransaction().getRootApplicationModule().getACertainViewObject().setWhereClauseParameter(1, user.getPersonId());
The examples I have found that might match my wishes are not using business components, but EJB's. I am having difficulty with understanding the 'how'-part of variable binding.
Also, I do not know enough of ADF to be able to create a situation like:
'User loads page, collapsible panel 1 is fully shown, the others are undisclosed.'
(meaning, that for panel1 a query has been executed.)
'User clicks on collapsible panel 2 which triggers a backingbean that somehow retrieves data from a view object'.
I would appreciate any help that somebody can give.
If it is not too much of a problem, please provide code snippets in case you have a solution. I am new to ADF :(.
-edit
I am using JDeveloper 10.1.3.3.0 in case that is of any importance.
Message was edited by:
Hugo BoogHello Stijn,
I didn't think about a referenced bean rule in the faces-config.
I added it right away and I am now able to set parameters of a View-object, not using a page button and before the page loads. You made my day!
In case anyone ever reads this post again, the summary of how to generate a table based on a View-object using dynamic parameters.:
1a: Go to faces-config.xml -> Overview tab'
1b: Go to the menuitem "Referenced Beans"
1c: Click on 'new' and select the existing bean you want to access data from and input a name. In this example I use name="user"
2: Create a View-object using the wizard.
2a: Specify the query you want in the menuitem 'SQL Statement'.
Add the 'parameters' you want to. You will have something like:
"SELECT * FROM someTable WHERE table.columnname LIKE :someArgument".
- hint: if you want the result to become something like:
"SELECT * FROM someTable WHERE table.columnname LIKE '%someArgument%'" then you have to add the '%'-characters in your code itself (read: someClass.setParameter("%" + someArgument);).
2b: In the menuitem 'Bind Variables' you have to add the variables you are referring to in the query. If you look at the query in 2a, then you have to add a variable with name "someArgument".
2c: Add the View-object to a Application Module (create one if nessecairy).
3a: Open a .jsp(x) file. Drag the View-object created in step 2 from the 'Data Controls'-pane to the page.
3b: Click on the '+' of the View-object in the 'Data Controls'-pane and open 'Operations' and drag 'ExecuteWithParams' to your page as a button.
3c: We do not want to use a button, the action has to be executed immediatly. So In the page source remove the lines that were created after dropping 'ExecuteWithParams'.
3d: Right-click on the page and select "Go to Page Definition".
3e: Go to the action id that is called 'ExecuteWithParams#', where # is a number.
Change the id to something useful.
3f: Change the NDValue so it corresponds with the value you want.
Example:
<action id="getAddressData" IterBinding="AddressesView1Iterator"
InstanceName="MyHRServiceModuleDataControl.AddressView1"
DataControl="MyHRServiceModuleDataControl" RequiresUpdateModel="true" Action="95">
<NamedData NDName="someArgument" NDType="java.lang.String"
NDValue="#{user.personId}"/>
</action>
Note: It is possible to use the value of a Backing Bean in NDValue.
Note 2: user is the bean I referred to in the faces-config.xml!
3g: Under the executables item, add an 'invokeAction' to pass the parameter to the View-object before your JSP-file loads:
<executables>
<invokeAction Binds="getAddressData"
id="loadAddressDataOfPersonIdInSession"
Refresh="prepareModel"/>
Thank Stijn Haus for this :) -
Page Parameters in PL/SQL Pages
The OAS User's Guide says:
"You can define page parameters for PL/SQL Pages. Values for these parameters are passed to bind variables in the PL/SQL code. For example, if the PL/SQL page 'myplsqlpage' contains the PL/SQL statement 'a:=:param1'; and a page parameter is specified named 'param1' with the value '123' (param1=123), this URL is used to access the PL/SQL page in Oracle AS Portal:
http://myportal/myplsqlpage?param1=123
In the PL/SQL code, the bind variable 'a' is assigned the value '123'."
But I did that but I have the following message:
ORA-01008: not all the variables have been binded (WWS-22518).
Please I have an example.
Thanks in advance.Hi Patrick,
Your suggestion seems interesting and simplistic and I wonder if you could make it working. Because, I worked on a similar suggestion some months ago and it did not work. unless I am confusing your idea with something else, it is not designed to work - although it was claimed in the documentation to work. On talking to Oracle we were able to pin down that it was a documentation bug and a new note was created to state that.
You may wanna see the following Metalink Note which says that passing parameters from a PLSQL page is not allowed.
regards,
AMN
Subject: Unable To Pass Parameters To A PL/SQL Page
Doc ID: Note:550373.1
Cause
Page parameters were not designed to work with PL/SQL pages. However the Oracle® Application Server Portal User's Guide states that this is possible.
This is a documentation bug and it is related to the following unpublished bugs:
BUG 5007570: GET PARAMETERS IN PL/SQL PAGE
BUG 3473023: PASSING PARAMETERS TO PL/SQL PAGE IS ERRORING OUT - ORA-1008
Solution
-- To implement the solution, please execute the following steps::
PL/SQL pages do not support to pass parameters. If you need to pass page parameters to a database provider components such as forms and reports, then you need to create a simple page and follow notes below:
Note 265180.1
Title: How to pass parameters to a form, which is placed as a
portlet inside a page?
Note 287545.1
Title: How Pass Parameter Via URL to a Report Using Page Parameters -
Passing multiple parameters between two report portlets on the same page
Hi,
I want to pass multiple parameters between two report portlets on the same page.
I have been succussful passing a single parameter between two portlets. The
following are the steps :
(1) Created first report based on the query
SELECT htf.anchor('http://192.168.0.84:7778/servlet/page?&_pageid=97&_dad=portal30&_schema=portal30&_mode=3&dept_code='||DEPTNO,DEPTNO) Department, ename FROM EMP;
(2) Created 2nd report
select * from EMP where DEPTNO = :dept_code
(3) Added pl/sql code before display page on the 2nd report
portal30.wwv_name_value.replace_value(
l_arg_names, l_arg_values,
p_reference_path||'.dept_code',portal30.wwv_standard_util.string_to_table2(nvl(g
et_value('dept_code'),10)));
(4) Created a page and added these reports as portlets.
Sofar it works fine for one parameter (deptno) . Now I want to add one more
parameter say empno to my first report query and would like to pass both the
parameters deptno and empno to the 2nd report. Please tell me how to pass multiple parameters ?
Thanks
AsimHi,
You will have to do the same thing
The select will be like this
SELECT htf.anchor('http://toolsweb.us.oracle.com:2000/servlet/page?_pageid=97&_dad=mb&_schema=mybugs&_mode=3&dept_code='||DEPTNO||'&empno='||empno,DEPTNO) Department,ename
FROM EMP
In the additional plsql code do the same for empno like this
mybugs.wwv_name_value.replace_value(l_arg_names,l_arg_values, p_reference_path||'.dept_code',mybugs.wwv_standard_util.string_to_table2(nvl(get_value('dept_code'),10)));
mybugs.wwv_name_value.replace_value(l_arg_names,l_arg_values, p_reference_path||'.empno',mybugs.wwv_standard_util.string_to_table2(get_value('empno')));
Thanks,
Sharmila -
I have installed an Oracle 11gR2 on Oracle Linux Server 6.6 (Virtualbox). I have the users grid and oracle11g. Add groups and install grid infrastructure first as a grid user and install database as oracle user as in documentation successfully.
I have following users and groups as
[grid@orcl11g ~]$ id grid
uid=501(grid) gid=502(oinstall) groups=502(oinstall),492(vboxsf),501(grid),503(dba),505(asmdba),506(asmadmin),507(asmoper)
[grid@orcl11g ~]$ id oracle11g
uid=500(oracle11g) gid=502(oinstall) groups=502(oinstall),500(oracle11g),492(vboxsf),503(dba),504(oper),505(asmdba)
.bash_profile edited for oracle11g user as
"export TMP=/tmp
export ORACLE_HOSTNAME=orcl11g
export ORACLE_UNQNAME=ora11g
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ora11g
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
.bash_profile edited for grid user as
"export TMP=/tmp
export ORACLE_HOSTNAME=orcl11g
export ORACLE_UNQNAME=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
export GRID_HOME=$ORACLE_BASE/product/11.2.0/grid
export ORACLE_SID=+ASM
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
When I log on as grid user. I check the followings:
[grid@orcl11g ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@orcl11g ~]$ srvctl status database -d ora11g
Database is running.
[grid@orcl11g ~]$ sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 25 19:17:37 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
SQL> select status from v$instance;
STATUS
STARTED
Till here everything seems to be OK!!!!
When I log as oracle user. I check the followings:
[oracle11g@orcl11g ~]$ sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 25 19:21:46 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
SQL> select status from v$instance;
select status from v$instance
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initORA11G.ora'
Also when I log on as a grid user again and use following commands to shutdown and start database again the STATUS of instance is again STARTED not OPEN.
[grid@orcl11g ~]$ srvctl stop database -d ora11g -o normal
[grid@orcl11g ~]$ srvctl start database -d ora11g
And also when I edit /etc/oratab file. I change N to Y for +ASM. But when restart system it seems not changed value is N again.
+ASM:/u01/app/grid/product/11.2.0/grid:N # line added by Agent
ora11g:/u01/app/oracle/product/11.2.0/dbhome_1:Y
NOW QUESTIONS!!!!!
1. Why I can't change the status of database to OPEN as grid user?
2. The status is always STARTED when querying v$instance. İs it status of +ASM or database?
3. When checking database as grid user it seems to be Database runnning... If running why it is not in OPEN state? What is running means here?
4. When I log on as oracle user and query v$instance, then error shown above occured. And also when startup the database then another error occured as in above. WHY?
5. When I edit /etc/oratab file manually why second row saved but the first one is changed after restart the system?
6. Normally, which user have to start, stop or manage database? I think that oracle user is necessary for managing database and the grid user is only for managing ASM and Oracle Restart.
PLEASE HELP ME TO SOLVE THIS CHAOTİC SİTUATİON!!!
Thanks,
DBA_84I have installed an Oracle 11gR2 on Oracle Linux Server 6.6 (Virtualbox)
Pl identify exact version of 11gR2 to 4 decimal places. As noted in your other thread - Failed to start oracle-ohasd, error: Inappropriate ioctl for device ohasd failed to start at roothas.pl - you will need a minimum version of 11.2.0.3 for Linux 6.x - using a lower version may result in unexpected issues or problems. -
Named parameters in Native SQL
A little background first:
Our website uses Hibernate as it's JPA provider, but we've run into several issues with it, one of which they actively refuse to fix out of pure arrogance, even when we gave them a good patch for it. The other one is a performance issue that can be greatly improved by passing arrays as parameters, which I've read rumours is supported in EclipseLink. I first tried implementing a Hibernate UserType as they've specified and it turns out they never read them into the Map that looks-up parameter types during binding, even though it's loaded from their hibernate.cfg.xml. In other words, they're only pretending to support custom user types, but unless you're writing-out the full manual loading of their configuration, there's no way to do it.
After a day of trying to fix all the relation annotations that EclipseLink finds unacceptable in our project (which only uses native SQL and EntityManager.find for selects) I finally got it running and came to discover you don't support named parameters in native SQL. That was really disappointing, because a few months ago we migrated all our queries to named parameters, because positioning ones were too difficult to track and caused more bugs when we had to add more criterias.
My questions are these:
Are named parameters for native SQL not supported by JPA specifications or because they are considered low priority?
Would you accept a patch that supports them?
Can we really use arrays and/or lists as parameters in queries like this "SELECT * FROM some_table WHERE my_column_a IN ? AND my_column_b NOT IN ?"
If yes to above, would it still work if the first one is an array of integers and the second is an array of strings?
Would it work if it's in native SQL and the column types cannot be resolved due to query complexity?A little background first:
Our website uses Hibernate as it's JPA provider, but we've run into several issues with it, one of which they actively refuse to fix out of pure arrogance, even when we gave them a good patch for it. The other one is a performance issue that can be greatly improved by passing arrays as parameters, which I've read rumours is supported in EclipseLink. I first tried implementing a Hibernate UserType as they've specified and it turns out they never read them into the Map that looks-up parameter types during binding, even though it's loaded from their hibernate.cfg.xml. In other words, they're only pretending to support custom user types, but unless you're writing-out the full manual loading of their configuration, there's no way to do it.
After a day of trying to fix all the relation annotations that EclipseLink finds unacceptable in our project (which only uses native SQL and EntityManager.find for selects) I finally got it running and came to discover you don't support named parameters in native SQL. That was really disappointing, because a few months ago we migrated all our queries to named parameters, because positioning ones were too difficult to track and caused more bugs when we had to add more criterias.
My questions are these:
Are named parameters for native SQL not supported by JPA specifications or because they are considered low priority?
Would you accept a patch that supports them?
Can we really use arrays and/or lists as parameters in queries like this "SELECT * FROM some_table WHERE my_column_a IN ? AND my_column_b NOT IN ?"
If yes to above, would it still work if the first one is an array of integers and the second is an array of strings?
Would it work if it's in native SQL and the column types cannot be resolved due to query complexity? -
Passing user parameter into your sql query
I've created two user parameters...'Order_date_from' and 'Order_date_to'
I've written a simple query to list the total order amount, order number, party name and ordered date
Select sum ((unit_selling_price)*(ordered_quantity)), count(line_number), oe_order_headers_all.order_number, hz_parties.party_name, oe_order_headers_all.ordered_date
from oe_order_lines_all,
oe_order_headers_all,
hz_parties,
hz_cust_accounts
where oe_order_lines_all.header_id=oe_order_headers_all.header_id
and oe_order_headers_all.sold_to_org_id = hz_cust_accounts.cust_account_id
and hz_cust_accounts.party_id = hz_parties.party_id
group by order_number, party_name, ordered_date;
I want to know how I can pass the value for the above mentioned parameters into my sql query so that it reflects as the 'ordered_date' in the report and only shows the data for the dates that the user inputs.
Any feedback would be appreciated. Thanks.I want to know how I can pass the value for the above
mentioned parameters into my sql query so that it
reflects as the 'ordered_date' in the report and only
shows the data for the dates that the user inputs.
Any feedback would be appreciated. Thanks.And how does the "user" input these dates? -
AppIntegrator - Issue with Passing Application parameters
Hi,
I've created a WebApplication system using 'HowTos' (com.sap.portal.howtos.webapp.par) file and set the system parameters.
I've created a generic iView with AppIntegrator par file (com.sap.portal.appintegrator.sap.par). Where I've passing the parameters as 'ApplicationParameter'. Following are the parameters that I'm passing in the AplicationParameter..
redirectTo=/test/ourenv/myfile.ext/($Limited)&Login
but when I see the result through HTTP WATCH, iView passing them as redirectTo=%2Ftest%2Fourenv%2Fmyfile.ext%2F%28%24Limited%29
so the other application is not taking this redirectTo parameter.
Is there any way to stop Decode/Encode the application parameters?
Thanks in Advance,
SatyahI,
Yeah it would not.
The url specification is very clear there are certain symbols which should not be passed in any url. The reason you see encoded url is to ensure that the symbols are preserved in your request.
Your external program can easily decode %2f already in your url , to '/' and get the correct parameters or choose another symbol instead of '/'
There is no other solution. As I just checked up, url specification which applies to any url across the world is very clear on this count.
So encoding has been done to ensure your parameters are coded correctly. The client program should be able o decode it.
The '/' is a reserved character with a specific meaning and cannot be used for anything apart from its specified purpose. You have to encode it if you need to pass it for other purpose.
Refer to this link.
http://www.w3.org/Addressing/URL/uri-spec.html
This is clear on this count.
Regards,
Harish -
Pass date range parameter to SQL stored procedure.
Hi,
I'd like to pass a date range parameter from Crystal Reports to a sql stored procedure. Does anyone know if this is possible?
I've had no problem passing standard datetime (single value) paramaters to and from but am struggling with getting a range value parameter to work.
Environment: Crystal Reports 10/XI and SQL 2000 MSDE version or SQL 2005 Express Edition.
Any help would be appreciated.C5112736 wrote:>
> And then these 2 formulas 'Formula # 1' and 'Formula # 2' can be used to pass on to the stored procedure.
Can someone please demonstrate exactly how to use formula results as date parameters to a SQL stored procedure? Keep in mind, there are two parameters to the stored procedure.
I have gleaned this much: Use Add Command and insert the procedure with
EXEC ServerName.dbo.usp_sprocName;1 '{?StringParameter}'
but if I try to do
{CALL ServerName.dbo.usp_SprocName({@Formula1},{@Formula2})}
then it gives the error "No value given for one or more required parameters".
Both of the parameters are VARCHAR(50).
I have finally found this link: [http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx|http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx]
This Microsoft site defines the format of the ODBC escape sequences, but I still do not know how to convince Crystal to insert it's parameter results or formula results.
Pulling what's left of my hair out . . .
~ Shaun
Maybe you are looking for
-
please help me to create a function module as follows- i) Have the following import parameters empnm TYPE zb19rv2_table-empnm , empdj TYPE zb19rv2_table-empdj , empad TYPE zb19rv2_table-empad , empph TYPE zb19rv2_t
-
Hi, I write this ctl: LOAD DATA APPEND INTO TABLE ETF_LYXOR_LINE1 WHEN (STRUCTURE_LINE_COUNTING_UNIT = '1') FIELDS TERMINATED BY ' ' TRAILING NULLCOLS STRUCTURE_LINE_COUNTING_UNIT, TRACKER_LOCAL_TRADING_CODE, TRACKER_ISIN, TRACKER_MNEMO_C
-
Hi , How can we set the sorting order of static nodes in a tree element ? Thanks.
-
The following program is, to send a details in sap to email, can any body explain the marked lines call function 'SO_NEW_DOCUMENT_SEND_API1' exporting document_data = maildata <b><--</b> document_type = 'RAW' <b><--</b> put_in_outbox = 'X' <b><--<
-
Attached is a visio of main DC WAN edge. Right now our WAE (7341) is placed directly off of ncmc-dc-rt01. Now we need to start to optimize traffice comming from all three top routers (ncmc-dc-rt01, ncmc-dc-rt05, and ncmc-dc-rt04). Were would be the b