ClobDomain from Database object type
I am trying to implement a viewobject using this method http://radio.weblogs.com/0118231/stories/2003/02/06/usingViewObjectsToSelectStoredFunctionResults.html
My Oracle type:
CREATE OR REPLACE TYPE search_result AS OBJECT
(SEARCH_RESULTS_XML CLOB,
RETURN_CODE VARCHAR2(10),
RETURN_MESSAGE VARCHAR2(160));
My Stored function api:
FUNCTION LienCheckSearch
(JURISDICTION_IN IN VARCHAR2,
SERIAL_NUMBER_IN IN VARCHAR2)
RETURN SEARCH_RESULT;
I created a default Domain from my Oracle Object and I can get the return_code and return_message back in my test client, but the search_results_xml is empty with a length of zero each time I test. The same tests worked using PL/SQL Developer and SQLPlus. Any ideas what I am doing wrong?
Nat
Update: The view object works fine if the function returns a CLOB only. ie
My Stored function api:
FUNCTION LienCheckSearch
(JURISDICTION_IN IN VARCHAR2,
SERIAL_NUMBER_IN IN VARCHAR2)
RETURN CLOB;
It would be better if I could return a type containing a CLOB though. Anyone know a work around to get ClobDomain in a Domain working?
Thanks
Natalie
Similar Messages
-
How to return Values from Oracle Object Type to Java Class Object
Hello,
i have created an Oracle Object Types in the Database. Then i created Java classes with "jpub" of these types. Here is an example of the type.
CREATE OR REPLACE TYPE person_type AS OBJECT
ID NUMBER,
vorname VARCHAR2(30),
nachname VARCHAR2(30),
geburtstag DATE,
CONSTRUCTOR FUNCTION person_type RETURN SELF AS RESULT,
CONSTRUCTOR FUNCTION person_type(p_id NUMBER) RETURN SELF AS RESULT,
CONSTRUCTOR FUNCTION person_type(p_vorname VARCHAR2,
p_nachname VARCHAR2,
p_geburtstag DATE) RETURN SELF AS RESULT,
MEMBER FUNCTION object_exists(p_id NUMBER) RETURN BOOLEAN,
MEMBER PROCEDURE load_object(p_id NUMBER),
MEMBER PROCEDURE save_object,
MEMBER PROCEDURE insert_object,
MEMBER PROCEDURE update_object,
MEMBER PROCEDURE delete_object
MEMBER PROCEDURE load_object(p_id NUMBER) IS
BEGIN
SELECT p.id, p.vorname, p.nachname, p.geburtstag
INTO SELF.ID, SELF.vorname, self.nachname, SELF.geburtstag
FROM person p
WHERE p.id = p_id;
END;
My problem is, that if i use the member function "load_object" from my java app it doesnt return the selected values to the java class and i dont know why. I use the java class like this:
PersonObjectType p = new PersonObjectType();
p.load_object(4);
There is a reocrd in the database with id = 4 and the function will execute successful. But if i try to use "p.getVorname()" i always get "NULL". Can someone tell me how to do that?
Thanks a lot.
Edited by: NTbc on 13.07.2010 15:36
Edited by: NTbc on 13.07.2010 15:36CallableStatement =
"DECLARE
a person_type;
BEGIN
a.load_object(4);
? := a;
END;"
And register as an out parameter.
Edited by: michael76 on 14.07.2010 05:01 -
Combining attributes from two object types
Experts,
I have two files coming from FIM. Employee and department data. Employee file is expected to synch data for 'person' object and department file to synch data for 'organization' object.
Common attribute in these two files is department_id.
I want information in department file like department_name and department_city to also get populated in 'person' object attribute.
How to combine data for two different objects and source.
Hope i made sense. Kindly suggest.
Thanks,
MannThanks Tomasz!
It answers my question. I was pondering over it for quite sometime.
Let me ask one more scenario.
Say I don't need/want 'department' object in metaverse.
In this case can I map the data coming in 'department' file to 'person' object type in FIM. I will use the department_id as the anchor.
For this MA, I will just use 'join'(and no projection). In this way I will be able to update the attributes coming from department file(like department name) directly in 'person' object.
So basically flow will be:-
MA1(Employee file)>> update/project 'person' object.(updating department_id along with other attributes).
MA2(Department data)>> only update(only joining & no projection) person object with department name and other information using department_id as anchor.
Kindly let me know your views. Will this create any issue in future?
Thanks,
Mann -
Can not load xmd from databased store type MDS
Hi:
I have met a problem when i tried to deploy a soa project on local server.First ,i can browse the .xsd files on Application Resources. and can open some of them ,but only the /apps/EnterpriseObjects/EBO/ServiceOrder/V1/ServiceOrderEBM.xsd can not open.everytime when i tried to open it ,the Jdeveloper just stop to response.Below is the error information while deploying:
[2011-08-22T10:31:33.435+08:00] [soa_server1] [ERROR] [SOA-20003] [oracle.integration.platform] [tid: [ACTIVE].ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: b2af712674493e54:256d3242:131e060aeb8:-8000-000000000004d039,0] [APP: soa-infra] Unable to register service.[[
oracle.webservices.provider.ProviderException: oracle.webservices.mdds.MddsException: java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/EnterpriseObjects/EBO/ServiceOrder/V1/ServiceOrderEBM.xsd does not exist.
at oracle.j2ee.ws.server.provider.ProviderConfigImpl.addService(ProviderConfigImpl.java:455)
at oracle.j2ee.ws.server.provider.ProviderConfigImpl.addService(ProviderConfigImpl.java:285)
at oracle.integration.platform.blocks.soap.FabricProviderConfig.addService(FabricProviderConfig.java:115)
at oracle.integration.platform.blocks.soap.FabricProviderConfig.addService(FabricProviderConfig.java:204)
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.load(WebServiceEntryBindingComponent.java:171)
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.load(WebServiceEntryBindingComponent.java:98)
at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployServices(CompositeDeploymentConnection.java:160)
at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deploy(CompositeDeploymentConnection.java:91)
at oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.initDeployment
BTW,do i need to copy all the files in MDS to the local machine or to the local server?if so ,how can i do it ,can i do it by any tools?
Thank you!
Tyleranyone willing to help me?
-
Fetching values from database into a drop down box
in my JSP page there are 3 drop down boxes for date of birth......
what i need is i want to get the values from database into that drop down box when i access the JSP page.......
session is there....'m getting all other values.......
I will attach the JSP page.....
Please help me...........
Thanks in Advance......
<%@ taglib uri='/WEB-INF/taglib/struts-bean.tld' prefix='bean'%>
<%@ taglib uri='/WEB-INF/taglib/struts-logic.tld' prefix='logic'%>
<%@ taglib uri='/WEB-INF/taglib/dyna.tld' prefix='dyna'%>
<%@ taglib uri='/WEB-INF/taglib/struts-html.tld' prefix='html'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><bean:message key="page_title"/></title>
<link href="<bean:message key="context"/>/CSS/default.css" rel="stylesheet" type="text/css" />
<script src="<bean:message key="context"/>/js/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="<bean:message key="context"/>/CSS/screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%!
Membership mShip = null;
%>
<script language="javascript" >
function checkDate(Form){
var d;
d = Form.year.value+"-"+Form.month.value+"-"+Form.day.value;
alert("Date is:"+d);
Form.dob.value = d;
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<jsp:include flush="true" page="../templates/header.jsp"/> </td>
</tr>
<tr>
<td class="menuTD">
<jsp:include flush="true" page="../templates/menu.jsp"/> </td>
</tr>
<tr>
<td class="sub_menuTR"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="column" valign="top" width="170"><jsp:include flush="true" page="../templates/left_panel.jsp"/></td>
<td valign="top" align="left">
<dyna:message error="error" warning="warning" message="message"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" valign="top" align="left">
<%
if(session != null){
mShip = (Membership)session.getAttribute("member");
%>
<form action="updateContactDetails.dy" method="post" name="form1">
<input type="hidden" name="m" value="<%=request.getParameter("m")%>" />
<table width="100%" border="0">
<tr>
<td>First Name</td>
<td><input name="first_name" type="text" id= "first_name" value = "<bean:write name = "member" property = "first_name" />" /></td>
</tr>
<tr>
<td>Last Name </td>
<td><input name="last_name" type="text" id="last_name" value = "<bean:write name = "member" property = "last_name" />" > </td>
</tr>
<tr>
<td>Address</td>
<td><input name="address1" type="text" id="address1" value = "<bean:write name = "member" property = "address1" />" ></td>
</tr>
<tr>
<td> </td>
<td><input name="address2" type="text" id="address2" value = "<bean:write name = "member" property = "address2" />" ></td>
</tr>
<tr>
<td>Suburb/City </td>
<td><input name="city" type="text" id="city" value= "<bean:write name = "member" property = "city" />" ></td>
</tr>
<tr>
<td>State/Territory</td>
<td><input type="text" name="state" value = "<bean:write name = "member" property = "state" />" ></td>
</tr>
<tr>
<td>Postcode</td>
<td><input type="text" name="postcode" value = "<bean:write name = "member" property = "postcode" />" ></td>
</tr>
<tr>
<td>Contact Phone</td>
<td><input type="text" name="home_phone" value = "<bean:write name = "member" property = "home_phone" />" ></td>
</tr>
<tr>
<td>Mobile</td>
<td><input type="text" name="mobile" value = "<bean:write name = "member" property = "mobile" />" ></td>
</tr>
<tr>
<td>Date of birth</td>
<td nowrap="nowrap"><select name="day">
<option>Day</option>
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="month">
<option>Month</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">Decembber</option>
</select>
<select name="year" onChange = "checkDate(this.form);" >
<option>Year</option>
<option value="1957">1957</option>
<option value="1956">1956</option>
<option value="1955">1955</option>
<option value="1954">1954</option>
<option value="1955">1955</option>
<option value="1956">1956</option>
<option value="1957">1957</option>
<option value="1958">1958</option>
<option value="1959">1959</option>
<option value="1960">1960</option>
<option value="1961">1961</option>
<option value="1962">1962</option>
<option value="1963">1963</option>
<option value="1964">1964</option>
<option value="1965">1965</option>
<option value="1966">1966</option>
<option value="1967">1967</option>
<option value="1968">1968</option>
<option value="1969">1969</option>
<option value="1970">1970</option>
<option value="1971">1971</option>
<option value="1972">1972</option>
<option value="1973">1973</option>
<option value="1974">1974</option>
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
</select ></td></tr>
<tr>
<td><input type="hidden" name = "dob" /> </td>
<td nowrap="nowrap"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
</td>
<td width="40"></td>
<td width="200" valign="top">
<div id="headlines">
<jsp:include flush="true" page="../templates/profile.jsp"/>
</div>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td><jsp:include flush="true" page="../templates/footer.jsp"/></td>
</tr>
</table>
</body>
</html>i think normally u will get data from databsae as objects.they are like java beans having getter and setter methods.so you create a collection of those objects like collect all the objects coming from database into an arraylist or....
suppose you want to populate the dropdown box with say "username" from database object s, your code will look like that
<html:select property="name">
<html:options collection="databaseList" property="username" />
</html:select>
"databaseList" is collection(say.. ArrayList) of objects you are getting from database.this dropdown will contain all the "usernames" you are getting from database. -
Creating OO database objects by using class diagrams in JDeveloper
I am new to use JDeveloper. I create UML class diagrams (using Entity Object) in JDeveloper, which has inheritances and associations, and then choose Create Database Objects... try to create oo database, but it only create some tables in the database, not any object types ... .
What do I missed? Or I have to create those oo database objects manually?
Thanks.Tony,
You can use database object types with BC4J, but only to implement BC4J domains (these can map to object types).
For performance reasons, it is less practical to generate a table of object types for a complete EO. Most users view the BC4J layer as the 'pure' OO model, and map to a relational datamodel for optimal performance.
Below some steps to create a DB object type for a domain:
You can create Oracle Object Types in the database by creating a business component domain and then forward generating the database object. Forward generation of object tables from entity objects is not supported. To forward generate an Oracle Object Type from a new domain: In the System Navigator, right click on your business component package and choose Create Domain. When the Domain Wizard opens, review the information on the Welcome page and click Next. Enter a Name and Package for the domain or accept the defaults. Select the checkbox for Domain for an Oracle Object Type. Do not select any items on the Available Types list, as you are creating a new one. Enter the name of your new type in the Selected Type field. Click Next. On the Settings page, click New. Provide a name in the New Domain Attribute box. Select the appropriate Java type a[i]Long postings are being truncated to ~1 kB at this time. -
Create Synonym for Object Type not supported; Why?
Does anybody know the reason why Oracle does not support the creation of synonyms for object types?
In our application we use many schemas to separate subsystems. The schema name has a version identifier included to allow multiple product versions loaded in the database at the same time.
We reference objects between schemas by using synonyms, to avoid hardcoding the schema names.
Therefore I must refrain from using object types, currently.
Does anybody have such a multi-schema architecture, also?
What is your experience?
Thanks,
RobertRobert,
Type synonym is now supported in Oracle9i Release 2. The practice of using multi-schema architecture is an excellent practice for large applications. This provides a level of abstraction to simplify application maintenance, whihc you must have experienced. In conjuction with Object types, you can further simplify your application through reuse of user-defined types.
Do you have an email address that I can contact you for further discussion off-line.
Regards,
Geoff
Does anybody know the reason why Oracle does not support the creation of synonyms for object types?
In our application we use many schemas to separate subsystems. The schema name has a version identifier included to allow multiple product versions loaded in the database at the same time.
We reference objects between schemas by using synonyms, to avoid hardcoding the schema names.
Therefore I must refrain from using object types, currently.
Does anybody have such a multi-schema architecture, also?
What is your experience?
Thanks,
Robert -
Hello,
designer is allways changing the order of attributes during capture of existing object types from DB.
Do you know how to keep existing order
of attributes for database object types
in designer?
Regards, AZ.i use designer 9.0.2 to create a server model.
i'd like to store images in the DB. i read about intermedia which looks very nice i think.
any experience with designer and ORDImage? or do i have to use BLOB for storing the images?
thanks. -
Expression or Function as field in Object Type
I am trying to use an expression or call a function as a return value for a field in an OBJECT TYPE.
Here's the obj def:
CREATE OR REPLACE TYPE OUTAGE_REPEAT_CALL_T2 AS OBJECT (
INITCALL_TS DATE,
LASTCALL_TS DATE,
CALL_SRC CHAR(8),
ELAPSED_TIME NUMBER,
REP_ID CHAR(8),
CALL_CNT NUMBER(3)
The ELAPSED_TIME field should be the differnece in minutes from the LASTCALL_TS and SYSDATE...
I'm not sure how to select into this OBJECT to get my result...
Sample table and data:
SQL> desc oms.outage_repeat_call
Name Null? Type
ACCT NOT NULL NUMBER(10)
INITCALL_TS NOT NULL DATE
LASTCALL_TS NOT NULL DATE
CALL_CNT NOT NULL NUMBER(3)
CALL_SRC NOT NULL CHAR(8)
REP_ID NOT NULL CHAR(8)
The ELAPSED_TIME is not part of the underlying table..
sample data from tbl:
ACCT INITCALL_ LASTCALL_ CALL_CNT CALL_SRC REP_ID
123456 02-JAN-02 02-JAN-02 1 CBIS MJB2302
I want to have this as a result:
INITCALL_ LASTCALL_ CALL_SRC ELAPSED_TIME REP_ID CALL_CNT
02-JAN-02 02-JAN-02 CBIS 9997 MJB2302 1
But by doing a select from the OBJECT TYPE:
i.e.
SELECT OUTAGE_REPEAT_CALL_T2( ORPC.INITCALL_TS,
ORPC.LASTCALL_TS,
ORPC.CALL_SRC,
'expression or func' AS ELAPSED_TIME,
ORPC.REP_ID,
ORPC.CALL_CNT)
FROM
OMS.OUTAGE_REPEAT_CALL ORPC
WHERE
ORPC.ACCT=123456;
I am using DBMS_XMLQUERY to eventually get this:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<INITCALL_TS>1/2/2002 12:45:0</INITCALL_TS>
<LASTCALL_TS>1/2/2002 12:45:0</LASTCALL_TS>
<CALL_SRC>CBIS </CALL_SRC>
<ELAPSED_TIME>10009</ELAPSED_TIME>
<REP_ID>MJB2302 </REP_ID>
<CALL_CNT>1</CALL_CNT>
</ROW>
</ROWSET>
Here's the real query... this OBJECT TYPE is embedded as an attribute of another OBJECT TYPE def.
sQuery := 'SELECT '
|| iNumAcct || ' AS NUMACCT,
SITE_T(S.ACCT,
S.SITE,
S.PHONE,
S.CUST_NM,
S.MED_IND,
S.MAC_IND,
S.HPP_IND,
S.STREET,
S.CITY,
S.STATE,
S.ZIP,
S.EUC,
S.STATUS,
S.AGR_TYP,
S.PRICE_SCHED,
S.OL_IND,
S.TRANS_IND,
S.CIRCUIT,
S.SUBSTATION,
S.OP_CENTER,
OUTAGE_STATUS_T(O.OUT_ID,
O.OUT_STATUS,
O.PO_DEV,
O.DEV_TYP,
O.CREW,
O.ETOR_TS,
O.TRBL_CD,
O.FIRST_RPT_TS,
O.END_TS,
O.CUST_CNT,
O.O_CALL_CNT,
OUTAGE_REPEAT_CALL_T(ORC.INITCALL_TS,
ORC.LASTCALL_TS,
ORC.CALL_SRC,
ORC.REP_ID,
ORC.CALL_CNT),
LIGHT_REPEAT_CALL_T(LRC.INITCALL_TS,
LRC.LASTCALL_TS,
LRC.CALL_SRC,
LRC.REP_ID,
LRC.CALL_CNT)
) AS OUTCUST
FROM
OMS.SITE S,
OMS.OUTAGE O,
OMS.OUTAGE_REPEAT_CALL ORC,
OMS.LIGHT_REPEAT_CALL LRC,
OMS.OUTAGE_TRANSFORMER OT
WHERE
S.ACCT = ' || pi_acctNum || ' AND
S.TRNFRMR_ID = OT.TRNFRMR_ID(+) AND
OT.OUT_ID = O.OUT_ID(+) AND
S.ACCT = ORC.ACCT(+) AND
S.ACCT = LRC.ACCT(+)';
I know this may sound confusing...but I apprecitate anyone's/everyone's suggestions!
MJB
DUKEPOWER CO.yes... here's the function that I also used as the expression...
FUNCTION uf_minutesDiff(pi_beginDte IN VARCHAR2, pi_endDte IN VARCHAR2) RETURN NUMBER
|| FUNC name: uf_minutesDiff
|| purpose: this function accepts A BEGINNING DATE AND ENDING DATE AND
|| RETURNS THE DIFFERENCE IN MINUTES
||
|| date: 12/19/2001
|| author: Mark J Brooks
||
|| history:
||
||
IS
iMinutes NUMBER;
/* LINE 280 */
BEGIN
select (to_date(pi_endDte,'DD-MON-YYYY:HH24:MI') -
to_date(pi_beginDte,'DD-MON-YYYY:HH24:MI'))*24*60
INTO iMinutes from dual;
IF iMinutes = 0
THEN
iMinutes := 1;
END IF;
RETURN iMinutes;
END uf_minutesDiff;
I also just used:
SQL> SELECT OUTAGE_REPEAT_CALL_T2( ORPC.INITCALL_TS,
2 ORPC.LASTCALL_TS,
3 ORPC.CALL_SRC,
4 (ORPC.LASTCALL_TS - SYSDATE) AS ELAPSED_TIME,
5 ORPC.REP_ID,
6 ORPC.CALL_CNT)
7 FROM
8 OMS.OUTAGE_REPEAT_CALL ORPC
9 WHERE
10 ORPC.ACCT=123456;
(ORPC.LASTCALL_TS - SYSDATE) AS ELAPSED_TIME,
ERROR at line 4:
ORA-00907: missing right parenthesis
with and without the parens
tx -
Class diagram for database objects.
Hi,
I am creating a diagram from the tables in the database in Oracle Jdeveloper 10g. This will basically give me a ER diagram. When I drag and drop a table - say EMP - i get a window - "Create from database object" - which gives me a few options. I selected the "Offline database objects" option. The table appears in the class diagram sheet with the table name, it's columns and the constraints.
Now when I remove this object (table EMP) and then again try to drag and drop the same object as above, I get the object on the sheet as EMP1 and not EMP and also the constraints are renamed. It does not allow me to change the name to EMP. It gives a message that -"TABLE names must be unique" and the table name is renamed to EMP1.
I want the name as EMP only. How do i do it?
Thanks,
VinayVinay,
It's because in the first step, you deleted the table from the diagram, but not from the offline database. Now, when you drag a table from the database connection, it will need to create a new offline table. Instead of dragging from the DB connection, drag it from the offline database (it should already be there from the first step). Alternatively, delete the offline table as well as part of your first step (deleting the object from the diagram).
John -
Hi,
I create a project on OWB from Oracle Database 11g(11.2.0.2) and load two external tables. I have to import this tables
from Database Objects. But, when I choose the option tables from Impor Wizard the tables dont are available.
Can anyone help me?
Thanks,
Marcos SantosHi Marcos,
have you checked the check box "external tables" (not "tables") in the import dialog?
Regards,
Carsten. -
EA3, Unhooking a table from a structured type
When I reset the drop down 'Based on Structured Type:' on the 'Table Properties' window for a relational model, the attributes that were inherited from the underlying structure which are displayed as columns in the table are not removed. I'm not sure if that is by design or by accident. I would prefer that if the table is unhooked from the object type that the object attributes would be removed from the table.
This is in Data Modeler EA3 3.1.0.691
Thanks,
ScottK
Edited by: ScottK on Jan 17, 2012 1:10 PMIn SDDM 3.3 EA2 if I unhook an object table from the structured type the columns remain. I can then replace one of those columns as the primary column, replacing the object table generated column value Oid. If I rehook (based on structured type) that table back to an object type, I am not able to use any of those inherited attributes as a column value within the primary key structure.
In a normal object table definition or an object relation table the structured type's attributes can be used as a primary key column. The problem only surfaces if I accidentally un-define the setting on (based on structured type) and then try to reset it. -
How to use an Object Type from Another Database
Hi,
I have this requirement that I need to call a stored procedure from another DB (db1) but I am having a problem with this because one of the input parameters uses an object type defined in that DB (db1). Is it possible to use an object type from another database? TIA!Sven W. wrote:
At least for queries, but I think also for procedure arguments..You (both) probably missed my post?
We can't use a remote type as procedure argument, even with the same OID.
It's OK for query on a remote object column though :
SQL> conn remote_user@remote_db
Entrez le mot de passe :
Connecté.
SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
2 as object (att1 number);
3 /
Type créé.
SQL> create table mytable (col1 mytype);
Table créée.
SQL> insert into mytable values (mytype(777));
1 ligne créée.
SQL> create or replace function myfunc (p_in in mytype) return number
2 is
3 begin
4 return p_in.att1;
5 end;
6 /
Fonction créée.
SQL> disconn
Déconnecté de Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>
SQL>
SQL>
SQL>
SQL> conn my_user@local_db
Entrez le mot de passe :
Connecté.
SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
2 as object (att1 number);
3 /
Type créé.
SQL> select * from mytable@test_dbl;
COL1(ATT1)
MYTYPE(777)
SQL> declare
2 res number;
3 begin
4 res := myfunc@test_dbl(mytype@test_dbl(777));
5 end;
6 /
res := myfunc@test_dbl(mytype@test_dbl(777));
ERREUR à la ligne 4 :
ORA-06550: Ligne 4, colonne 26 :
PLS-00331: référence non valide à REMOTE_USER.MYTYPE@TEST_DBL.WORLD
ORA-06550: Ligne 4, colonne 2 :
PL/SQL: Statement ignored
SQL> declare
2 res number;
3 begin
4 res := myfunc@test_dbl(mytype(777));
5 end;
6 /
res := myfunc@test_dbl(mytype(777));
ERREUR à la ligne 4 :
ORA-06550: Ligne 4, colonne 9 :
PLS-00306: numéro ou types d'arguments erronés dans appel à 'MYFUNC'
ORA-06550: Ligne 4, colonne 2 :
PL/SQL: Statement ignored -
Creating PL/SQL web services from object types
Hello
Jdeveloper, pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
Creating the client process:
we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
Thanking you
MalathiHello
Accessing the pl/sql webservices from the application server:
I have created pl/sql webservice using the nested tables. This will insert the object data into database tables.after deplying the webservice into external oc4j, when I test the webservice locally with url: http://localmachine:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
The above web-services working and I am able to insert into the database tables.
Same when I want to access through the application server, I have changed the wsdl file soap address as
<soap:address location="http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort"/>
When I access this url, I am able to give the input data
http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
but the out from the web-service is:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>env:Server</faultcode>
<faultstring>Error creating target: DBConnImpMftest.ObjWebserviceUser</faultstring>
<faultactor/>
</env:Fault>
</env:Body>
</env:Envelope>
Err from the OC4j log:<PAYLOAD>
<MSG_TEXT>An error occurred for port: {http://dbconnimpmftest/Nested_Webserv.wsdl}Nested_WebservSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creating target: dbconnimpmftest.Nested_WebservUser.</MSG_TEXT>
</PAYLOAD>
Could any one help me to solve the above issue?
Kind regards
Malathi -
Calling a PL/SQL from VB with IN argument of object type
I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
Thank youYou have some flaws in your code.
First - don't use same identifier for pl sql variables ( including parameters) and column names. In your case oracle will evaluate the where clause as where column_name=column_name which is probably not what you want. The next one - you should ensure that select into yields one row , not more, not less, otherwise you 'll run into exception.
To actually print the desired values, you have to use dbms_output aware client ( sqlplus is such one) and for sqlplus in particular you have to issue set serveroutput on
Here is a very basic example how can you get it to work:
SQL> SELECT * FROM V$VERSION;
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> CREATE OR REPLACE PROCEDURE FIND_EMPLOYEES
2 (p_first_name IN VARCHAR2)
3 IS
4 LAST varchar2(10);
5 BEGIN
6 SELECT LAST_NAME INTO LAST FROM EMPLOYEES WHERE FIRST_NAME = p_first_name;
7 dbms_output.put_line(LAST);
8 EXCEPTION
9 WHEN no_data_found THEN
10 dbms_output.put_line('There is no one employee with such first name!');
11 WHEN too_many_rows THEN
12 dbms_output.put_line('There are many employees with such first name, try with another one!');
13 END FIND_EMPLOYEES;
14 /
Procedure created.
SQL> SET SERVEROUTPUT ON
SQL> EXEC FIND_EMPLOYEES('Julia')
There are many employees with such first name, try with another one!
PL/SQL procedure successfully completed.
SQL> EXEC FIND_EMPLOYEES('Eugenia')
There is no one employee with such first name!
PL/SQL procedure successfully completed.
SQL> EXEC FIND_EMPLOYEES('Adam')
Fripp
PL/SQL procedure successfully completed.Best regards
Maxim
Maybe you are looking for
-
How to temporally link layers in prem cs5?
Hi I have a complicated project and for various reasons the producer has asked me to drop in a extra gfx making my framing all off.. so I need to simple move a section of the project to the left, but I need to move near 20 layers and have them all mo
-
Hi, Hopefully someone might recognise this error... Sadly it brings up only one result on google and that's a bit vague as to how that person got out of thier hole... :( I'm trying some very simple Flex Messaging with Flex Builder 2.0.1 and CF8 Stand
-
System becomes unresponsive, hard reboot required (multiple Macs)
For the last couple of weeks I have been encountering unresponsive systems on several Macs, each time with the same symptoms: Spinning beachball in all running apps Spinning beachball for all menu items Unable to launch, quit or force quit apps Mousi
-
How to move CS5 workspace to CS6
Is there a way to get my CS5 workspaces and preferences into CS6? I moved the files and it doesn't seem to work. Thanks.
-
How to add an icon to the dock in the macbookpro
i am using macbook pro, i accidentl removed the launchpad ison from the dock, how to add it back to the dock