XPATH using XDK Samples provided by oracle.
Hi,
I have compiled the demo/cpp/new program samples of Oracle 10.2.0.3 and executing XvmXPathSample which makes use of 'processWithBinXPath' however I am getting correct results only for NODES ... and not text.
Example .
In pantry.xml -
"/pantry/shelf/supplies/*" - works fine and provides me with a list of all the nodes
however
"/pantry/shelf/supplies/paper_good[1]/text()" - does not provide me a string output ... it still detects a node output on the XPATHNodeObject.
Could someone help me out on this ?
hi Guys please help, I am still stuck I have to learn Rule Author in order to work on Business Rules, I am not able to locate car-objs.jar file no where in SOA suite or Oracle 10 g. I am not able to follow the sample provided by Oracle "http://download.oracle.com/docs/cd/B25221_04/web.1013/b15986/guistart.htm".
If I wont get help form forum then where to get help from??
Please tell me where to find car-objs.jar file or email me [email protected]
thanks
Yatan
Similar Messages
-
How to registor database provider in oracleAS portal
hi,
problem occur when i register a database provider into oracleAS portal.i create database provider by using locally built provider in oracleAS portal.
i Register the name of the schema containing the provider implementation and don't no package that implements its functionality.
so i want to create a package please write a code if possible or any documentation related to my problem.Thanks bgrinvalds.
I really start off with an empty BPEL process and check the box says "Create Instance" in the receive activity.
But after I deploy the polling service, it didn't take effect (Once you deploy these processes they will begin polling the table you defined.).
Now, I can insert data into the table through Database Adapter.
But still can't select data from the table through Database Adapter (Above error still happen when invoke the read database table with Database Adapter project).
And I find some examples in this directory: %SOA_HOME%\bpel\samples\tutorials\122.DBAdapter. But after I import these project into JDeveloper, I still can't see the configuration of the Database Adapter in Adapter Configuration Wizard. It's a pity! -
Rule author-any one followed getting started document provided by Oracle
hi Friends I am following getting started with Rule Author Document provided by Oracle her they are following one car rental sample which is using car-objs.jar file, I am not able to locate that JAR file any where, If some one has used this Rule author and followed the document please help me in this, how he learned using rule author, or send me this JAR file.
thanks
Yatanhi Guys please help, I am still stuck I have to learn Rule Author in order to work on Business Rules, I am not able to locate car-objs.jar file no where in SOA suite or Oracle 10 g. I am not able to follow the sample provided by Oracle "http://download.oracle.com/docs/cd/B25221_04/web.1013/b15986/guistart.htm".
If I wont get help form forum then where to get help from??
Please tell me where to find car-objs.jar file or email me [email protected]
thanks
Yatan -
How to insert a number using ADO or OLEDB by oracle provider
I create a talbe .
Create Table A
(id number(7));
I use ADO to access the table a;
_ConnectionPtr pConn=NULL;
pConn.CreateInstance(__uuidof(Connection));
_RecordsetPtr pRst=NULL;
pRst.CreateInstance(__uuidof(Recordset));
pConn->Provider="OraOLEDB.Oracle.1";
try
pConn->Open("","ISVISION","ISVISION",NULL);
pRst->CursorLocation=adUseClient;
pRst->Open("A",pConn.GetInterfacePtr(),adOpenStatic,adLockOptimistic,adCmdTable);
pRst->AddNew();
pRst->Fields->Item[0L]->Value=100L;
//It raise a exception,why?
//If I convert the datetype of "ID" to CHAR(7)
//and pRst->Fields->Item[0L]->Value=L"100",it is ok.
pRst->Update();
pRst->Close();
pConn->Close();
catch (_com_error& e)
MessageBox(e.Description(),"error",MB_OK|MB_ICONWARNING);
return ;
if (pConn)
pConn.Release();
if (pRst)
pRst.Release();
I create a table Aã
create table A
ID number(7)
Now ,I use OLE DB to access the table A;
struct CIsA
CIsA()
memset(this, 0, sizeof(*this));
public:
DB_NUMERIC m_ID;
BEGIN_COLUMN_MAP(CIsA)
COLUMN_ENTRY_PS(1, 7, 0, m_ID)
END_COLUMN_MAP()
DEFINE_COMMAND(CIsA, _T("SELECT ID FROM A"))
CDataSource DataSource;
HRESULT hrt=DataSource.Open(_T("OraOLEDB.Oracle.1"),NULL,_T("ISVISION"),_T("ISVISION"));
CSession Session;
hrt=Session.Open(DataSource);
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_UPDATABILITY,
DBPROPVAL_UP_INSERT | DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_DELETE);
CCommand<CAccessor<CIsA> > Command;
Command.Open(Session,NULL,&propset);
tcscpy((TCHAR*)Command.mID.val,_T("1245"));
Command.m_ID.sign=1;
hrt=Command.Insert();//It is wrong,why?
Command.Close();
Session.Close();
DataSource.Close();
In Fact,the two problems is the same. The key of problem is how to insert a number into oracle.
help me! thank you.hi
create a table something like this.
create table image(
Image_Id number(5),
Image blob);create a form with the same table and use the following code.
when-button-pressed trigger.
read_image_file('c:\image_name.jpg' , 'jpg' , 'image.image');if its correct/helpful please mark it thanks.
sarah -
HOW TO: Use the XML parser in Oracle 8.1.7
I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.
You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
Both of these are included in XDK for Java at:
http://otn.oracle.com/tech/xml/xdk_java
The following document could also help:
Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html -
Connection to database using OLE DB provider??
can anyone tell me how do we connect to a remote ms access database kept in a lan using OLE DB Provider.Please, show me the sample code also.
This is what happened to me. I was getting the error: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
Specified driver could not be loaded due to system error 5. I then gave IUSR_machine name account and the IWAM_machine name accounts full access to the Bin folder.
I then got the error: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified driver could not be loaded due to system error 998. I then gave IUSR_machine name account and the IWAM_machine name accounts full access to the whole Oracle home folder C:\Oracle\OraHome92, and it is working!!!!!
Hope this helps.
Thx,
Scott Buerkley -
URISyntaxException while using GlassFish JPA provider in WebLogic
I am trying to plug in GlassFish JPA provider https://glassfish.dev.java.net/javaee5/persistence/#Java_Persistence_API in WebLogic Application Server version "EJB 3.0 Tech Preview". EJB 3 tech preview version is only available on Windows OS, so I am using Windows OS.
1. I have made GlassFish provider jar file (toplink-essentials.jar) available to WebLogic server class loader.
2. I modified the EJB 3.0 sample (reviewService.ear) to use GlassFish provider <i>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</i> in persistence.xml file.
3. I changed the build.xml so that I don't package Kodo enhanced classes in the ear file.
Now when I deploy the application, I am getting URISyntaxException thrown by GlassFish provider. The URL printed in the exception message <i>jar:file:D:\sahoo\software\bea\weblogic_ejb30_preview\samples\domains\wl_server\.\servers\examplesServer\tmp\_WL_user\reviewService\prxy3a\domain.jar!/</i> is containing <b>'\'</b> instead of <b>'/'</b>. This looks like a bug in the WebLogic server. Can anyone confirm this?
Exception Stack:
Target state: deploy failed on Server examplesServer
java.net.URISyntaxException: Illegal character in opaque part at index 11: jar:file:D:\sahoo\software\bea\weblogic_ejb30_preview\samples\domains\wl_server\.\servers\examplesServer\tmp\_WL_user\reviewService\prxy3a\domain.jar!/
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parse(URI.java:3019)
at java.net.URI.<init>(URI.java:578)
at java.net.URL.toURI(URL.java:916)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.convertURLToURI(PersistenceUnitProcessor.java:625)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(PersistenceUnitProcessor.java:200)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.populateORMXMLStreamList(EntityManagerSetupImpl.java:664)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.buildPersistentClassSetFromXMLDocuments(EntityManagerSetupImpl.java:124)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.buildEntityList(EntityManagerSetupImpl.java:162)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:492)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:154)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:140)
at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:84)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:43)
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:67)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:320)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
Thanks,
SahooThe processing steps
<OL>
<LI>1. URL passed by the container is converted by the provider to an URI.
<LI>2. The provider is passing this URI to a java.io.File(URI uri) constructor.
</OL>
<OL>
<LI>Problem 1: The container is not replacing the backslash to forward slash.
<LI>Problem 2: Even when the container replaces the backslashes, the provider fails at the File(URI uri) constructor. Because it needs to construct the file with
not the actual URI, but URI.getSchemeSpecificPart().
</OL>
<BR>
One possible solution lies for the provider (without modifying the container) is to start with the URL, convert it to URL after replacing the backslashes and then passing only the scheme specific part to construct a file.
Please see the attached simple Java code
<pre>package test;
import java.io.File;
import java.net.URI;
import java.net.URL;
* @author <A HREF="mailto:[email protected]>Pinaki Poddar</A>
public class TestPath
* @param args
public static void main (String[ args) throws Exception
// String url = "jar:file://D:/TP5/weblogic_ejb30_preview/samples/domains/wl_server/./servers/examplesServer/tmp/_WL_user/ejax/ie9te7/ejax.jar!/";
// String url = "jar:file:D:\\TP5\\weblogic_ejb30_preview\\samples\\domains\\wl_server\\.\\servers\\examplesServer\\tmp\\_WL_user\\ejax\\ie9te7\\ejax.jar!/";
String url = "jar:file:D:\\TP5\\weblogic_ejb30_preview\\samples\\domains\\wl_server\\.\\servers\\examplesServer\\tmp\\_WL_user\\ejax\\ie9te7\\ejax.jar!/";
URL URL = validateURL(url);
System.out.println("URL = " + URL);
System.out.println("URL.protocol = " + URL.getProtocol());
System.out.println("URL.file = " + URL.getFile());
URI URI = URL.toURI();
System.out.println("URI = " + URI);
System.out.println("Scheme =" + URI.getScheme());
System.out.println("Authority =" + URI.getAuthority());
System.out.println("Host =" + URI.getHost());
System.out.println("Port =" + URI.getPort());
System.out.println("SchemePart: " + URI.getRawSchemeSpecificPart());
System.out.println("Path: " + URI.getPath());
System.out.println("Fragment: " + URI.getFragment());
System.out.println("Absolute = " + URI.isAbsolute());
System.out.println("Opaque = " + URI.isOpaque());
File file = new File(URI.getSchemeSpecificPart());
System.out.println("File [" + URI + "] exists = " + file.exists());
static URL validateURL(String url) throws Exception {
url = url.replace('\\','/');
URL URL = new URL(url);
String fileName = URL.getFile();
if (fileName.startsWith("file:") && !fileName.startsWith("file://"))
URL = new URL(URL.getProtocol(),URL.getHost(),URL.getPort(),
"file://"+fileName.substring(5));
return URL;
</pre> -
I was going through Performance Tuning webinar at http://www.oracle.com/technology/products/ias/bpel/pdf/bpel-performance-webinar.pdf
One of the tip is to use xdk instead of ora for transformation. I have downloaded xdk but i am not quite sure how to use it with bpel. What are the variables/parameters we need to set before we can use it with Developer version as well as production version.
I believe xdk is bundled with oracle AS so does that mean we dont have to configure anything to use it on oracle AS?Ravi,
The namespace you require for xdk is:
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
The namespaces can be found in Part V Reference Information Section D XPath Extension Functions in the Oracle BPEL Process Manager Developer's Guide
10g (10.1.3.1.0)
Regard Dave -
Our setup is that we have two databases; a SQL Server 2008 database and an Oracle database (11g). I've got the oracle MTS stuff installed and the Oracle MTS Recovery Service is running. I have DTC configured to allow distributed transactions. All access to the Oracle tables takes place via views in the SQL Server database that go against Oracle tables in the linked server.
(With regard to DTC config: Checked-> Network DTC Access, Allow Remote Clients, Allow Inbound, Allow Outbound, Mutual Authentication (tried all 3 options), Enable XA Transactions and Enable SNA LU 6.2 Transactions. DTC logs in as NT AUTHORITY\NetworkService)
Our app is an ASP.NET MVC 4.0 app that calls into a number of WCF services to perform database work. Currently the web app and the WCF service share the same app pool (not sure if it's relevant, but just in case...)
Some of our services are transactional, others are not.
Each WCF service that is transactional has the following attribute on its interface:
[ServiceContract(SessionMode=SessionMode.Required)]
and the following attribute on the method signatures in the interface:
[TransactionFlow(TransactionFlowOption.Allowed)]
and the following attribute on every method implementations:
[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
In my data access layer, all the transactional methods are set up as follows:
using (IDbConnection conn = DbTools.GetConnection(_configStr, _connStr))
using (IDbCommand cmd = DbTools.GetCommand(conn, "SET XACT_ABORT ON"))
cmd.ExecuteNonQuery();
using (IDbCommand cmd = DbTools.GetCommand(conn, sql))
... Perform actual database work ...
Services that are transactional call transactional DAL code. The idea was to keep the stuff that needs to be transactional (a few cases) separate from the stuff that doesn't need to be transactional (~95% of the cases).
There ought not be cases where transactional and non-transactional WCF methods are called from within a transaction (though I haven't verified this and this may be the cause of my problems. I'm not sure, which is part of why I'm asking here.)
As I mentioned before, in most cases, this all works fine.
Periodically, and I cannot identify what initiates it, I start getting errors. And once they start, pretty much everything starts failing for a while. Eventually things start working again. Not sure why... This is all in a test environment with a single user.
Sometimes the error is:
Unable to start a nested transaction for OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME". A nested transaction was required because the XACT_ABORT option was set to OFF.
This message, I'm guessing is happening when I have non-transactional stuff within transactions, as I'm not setting XACT_ABORT in the non-transactional code (that's totally doable, if that will fix my issue).
Most often, however, the error is this:
System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME" was unable to begin a distributed transaction.
Now, originally we only had transactions on SQL Server tables and that all worked fine. It wasn't until we added transaction support for some of the Oracle tables that things started failing. I know the Oracle transactions work. And as I said, most of the time, everything is just hunky dorey and then sometimes it starts failing and keeps failing for a while until it decides to stop failing and then it all works again.
I noticed that our transactions didn't seem to have a DistributedIdentifier set, so I added the EnsureDistributed() method from this blog post: http://www.make-awesome.com/2010/04/forcibly-creating-a-distributed-net-transaction/
Instead of a hardcoded Guid (which seemed to cause a lot of problems), I have it generating a new Guid for each transaction and that seems to work, but it has not fixed my problem. I'm wondering if the lack of a DistribuedIdentifier is indicative of some other underlying problem. I've never dealt with an environment quite like this before, so I'm not sure what is "normal".
I've also noticed that the DistributedIdentifier doesn't get passed to WCF. From the client, I have a DistributedIdentifier and a LocalIdentifier in Transaction.Current.TransactionInformation. In the WCF server, however there is only a LocalIdentifier set and it is a different Guid from the client side (which makes sense, but I would have expected the DistributedIdentifier to go across).
So I changed the wait the code above works and instead, on the WCF side, I call a method that calls Transaction.Current.EnlistDurable() with the DummyEnlistmentNotification class from the link above (though with a unique Guid for each transaction instead of the hardcoded guid in the link). I now havea DistributedIdentifier on the server-side, but it still doesn't fix the problem.
It appears that when I'm in the midst of transactions failing, even after I shut down IIS, I'm unable to get the DTC service to shutdown and restart. If I go into Component Services and change the security settings, for example, and hit Apply or OK, after a bit of a wait I get a dialgo that says, "Failed ot restart the MS DTC serivce. Please examine the eventlog for further details."
In the eventlog I get a series of events:
1 (from MSDTC): "The MS DTC service is stopping"
2 (From MSSQL$SQLEXPRESS): "The connection has been lost with Microsoft Distributed Transaction Coordinator (MS DTC). Recovery of any in-doubt distributed transactions
involving Microsoft Distributed Transaction Coordinator (MS DTC) will begin once the connection is re-established. This is an informational
message only. No user action is required."
-- Folowed by these 3 identical messages
3 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
4 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
5 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
6 (From MSDTC 2): MSDTC started with the following settings: Security Configuration (OFF = 0 and ON = 1):
Allow Remote Administrator = 0,
Network Clients = 1,
Trasaction Manager Communication:
Allow Inbound Transactions = 1,
Allow Outbound Transactions = 1,
Transaction Internet Protocol (TIP) = 0,
Enable XA Transactions = 1,
Enable SNA LU 6.2 Transactions = 1,
MSDTC Communications Security = Mutual Authentication Required, Account = NT AUTHORITY\NetworkService,
Firewall Exclusion Detected = 0
Transaction Bridge Installed = 0
Filtering Duplicate Events = 1
This makes me wonder if there's something maybe holding a transaction open somewhere?The statement executed from the sql server. (Installed version sql server 2008 64 bit standard edition SP1 and oracle 11g 64 bit client), DTS enabled
Below is the actual sql statement issued
SET XACT_ABORT ON
BEGIN TRAN
insert into XXX..EUINTGR.UPLOAD_LWP ([ALTID]
,[GRANT_FROM],[GRANT_TO],[NO_OF_DAYS],[LEAVENAME],[LEAVEREASON],[FROMHALFTAG]
,[TOHALFTAG] ,[UNIT_USER],[UPLOAD_REF_NO],[STATUS],[LOGINID],[AVAILTYPE],[LV_REV_ENTRY])
values('IS2755','2010-06-01',
'2010-06-01','.5', 'LWOP' ,'PERSONAL' ,'F', 'F', 'EUINTGR',
'20101',1,1,0,'ENTRY')
rollback TRAN
OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" was unable to begin a distributed transaction.
Able to execute the above statement successfully without using transaction.We need to run the statement with transaction. -
Parse error when using ojspc SAMPLE.WAR
Hi,
I am facing oracle.jsp.parse.JspParseException while using ojspc SAMPLE.WAR
Parse error in index.jsp:
oracle.jsp.parse.JspParseException: /index.jsp: Line # 20, <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
Error: org.apache.struts.taglib.logic.IterateTei while reading TLD /WEB-INF/struts-logic.tld
index.jsp contains
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
and web.xml
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
--Kailasone solution: assume the toplink library to be so full of bugs as to be unusable and switch to the hibernate persistance manager where it works fine.
Edited by: pointer2null on Feb 17, 2009 11:02 AM -
How to use PDF417 Bar Code in Oracle Reports 6i
How to Use PDF417 Bar Code in Oracle 6i. One of my clients has a requirement that Customer Name and Address to be converted into PDF417.
Any help greatly appreciated.
Thanks,
PNYou will need to add this font to the system and Reports configuration files.
For adding font to the system, refer to your system specific guidelines for installing new fonts.
After you have installed this font on the system, you should be able to see the font in Reports builder font picker dropdown box. or with unix 'xlsfonts' command
For adding this font to the Reports application.
1. Modify the printer definition file ( you can get this info from uiprint.txt file for the .ppd or .hpd file used )
if the printer defination file is .ppd then look for "*Font Information" section and add the new font name there
like *Font <new_font_name> Standard '(00.1001)" Standard ROM
If hpd add the new font tfm file as
FONT= new_font_name
/tfm=new_font_tfm file.tfm
2. Copy the AFM or TFM ( these are fonts metrics files, which font vendor will provide ) into the relevant directory so the the Reports application should pick them up.
3. If necessary, make changes in the alias file (uifont.ali ) for mapping to this font. If the layout objects in your report are associated with the same font name as the new font then mapping is not required. But if the fonts for the layout objects are different then you need to map the original fonts to the new ones. Make sure that the mapping rules should be defined in the right section depending on the printer type being used. -
Query using link server to an Oracle database failswhile similar query works
I have two queries almost the same that use a link to an Oracle database. One works ok, the other is a copy of the first with a few fields selects removed. The first one works fine, the copy fails with: Cannot get the data of the row from the OLE DB
provider "OraOLEDB.Oracle" for linked server "linkname".
They are so similar, why would one work but not the other?
First query, this one works:
SET
ANSI_NULLS ON
GO
SET
QUOTED_IDENTIFIER ON
GO
CREATE
PROCEDURE [dbo].[procedure_name]
-- Add the parameters for the stored procedure here
@Begindate Datetime,
@Enddate Datetime
AS
BEGIN
--SET NOCOUNT ON added to prevent extra result sets from
--interfering with SELECT statements.
SET NOCOUNT
ON;
-- Insert statements for procedure here
select p.patientid, p.testid,
mdx."Dx_4", td.acquisitiondatetime_dt, td.democompletedatetime_dt,
td.editdatetime_dt,
CAST(STUFF(STUFF(mn."Arrival_Time_9",
9, 0,
' '), 12, 0,
AS datetime)
as Arrival_date,
CAST(STUFF(STUFF(mt."Comp_D_T_22",
9, 0,
' '), 12, 0,
AS datetime)
as Order_date, td.confirmdatetime_dt
(CAST(DATEDIFF
(MINUTE,
CAST (STUFF
(STUFF
(MN."ARRIVAL_TIME_9", 9,0,
' '), 12, 0,
AS DATETIME), TD.DEMOCOMPLETEDATETIME_DT)
as char(10))
+ 'min')
AS "ARRIVAL TO COMPLETE",
(CAST(DATEDIFF
(MINUTE,
CAST (STUFF
(STUFF
(MT."COMP_D_T_22", 9,0,
' '), 12, 0,
AS DATETIME), TD.DEMOCOMPLETEDATETIME_DT)
as char(10))
+ 'min')
AS "ORDER TO COMPLETE"
from linknametosqldb.sqldbname.dbo.tstpatientdemographics
as p inner
join linknametosqldb.sqldbname dbo.tsttestdemographics
as td on p.testid
= td.testid
left
outer join linknametooracledb."M01Tab01_Main" mn
on td.visitnumber
= mn."Pt_Acct_5"
inner
JOIN linknametooracledb."M01Tab06_Ord" mt
ON mn."Master_Recid_1"
= mt."Master_Recid_1"
inner
join linknametooracledb."M01Tab09_Dx" mdx
on mn."Master_Recid_1"
= mdx."Master_Recid_1"
where td.location
in (2, 4)
and mt.order_4
like 'EKG%'
and mdx."Dx_4"
like '%Chest Pain%'
and
(td.acquisitiondatetime_dt
>= @Begindate and td.acquisitiondatetime_dt
< @Enddate)
order
by p.patientfullname_last, p.patientfullname_first
END
GO
Second query, copied from first with some fields selects removed, this does not work:
SET
ANSI_NULLS ON
GO
SET
QUOTED_IDENTIFIER ON
GO
CREATE
PROCEDURE [dbo].[procedure_name_2]
-- Add the parameters for the stored procedure here
@Begindate Datetime,
@Enddate Datetime
AS
BEGIN
--SET NOCOUNT ON added to prevent extra result sets from
--interfering with SELECT statements.
SET NOCOUNT
ON;
-- Insert statements for procedure here
select p.patientid, mdx."Dx_4",
td.democompletedatetime_dt,
CAST(STUFF(STUFF(mn."Arrival_Time_9",
9, 0,
' '), 12, 0,
AS datetime)
as EDIS_Arrival_date,
(CAST(DATEDIFF
(MINUTE,
CAST (STUFF
(STUFF
(MN."Arrival_Time_9", 9,0,
' '), 12, 0,
AS DATETIME), TD.DEMOCOMPLETEDATETIME_DT)
as char(10))
+ 'min')
AS "ARRIVAL TO COMPLETE"
from linknametosqldb.dbo.tstpatientdemographics
as p inner
join linknametosqldb.dbo.tsttestdemographics
as td on p.testid
= td.testid
left outer
join linknametooracledb."M01Tab01_Main" mn
on td.visitnumber
= mn."Pt_Acct_5"
inner
JOIN linknametooracledb."M01Tab06_Ord" mt
ON mn."Master_Recid_1"
= mt."Master_Recid_1"
inner
join linknametooracledb M01Tab09_Dx" mdx
on mn."Master_Recid_1"
= mdx."Master_Recid_1"
where td.location
in (2, 4)
and mt.order_4
like 'EKG%'
and mdx."Dx_4"
like '%Chest Pain%'
and
(td.acquisitiondatetime_dt
>= @Begindate and td.acquisitiondatetime_dt
< @Enddate)
order
by p.patientid
END
GO
Thanks very much for any help with this.* Consider putting parentheses around the 3 oracle tables so the 3 of them can possibly be treated as a unit. Assuming there's some performance impact due to the linked server, this MIGHT help, may do a little joining over on the Oracle side of
the world. In either case, it's a little cleaner. They syntax below, including a few extra line breaks for clarity, should be correct. (try the change to the ON clause suggested above too, though).
The parentheses will not help much. SQL Server will remote (as the term is) the query to the Oracle instance if this appears to have a lower cost and there is nothing the blocks remoting.
On the other hand, OPENQUERY can be an alternative to ensure that this happens:
left outer join
OPENQUERY (linknametooracledb,
'SELECT ...
FROM "M01Tab01_Main" mn
JOIN "M01Tab06_Ord" mt ON mn."Master_Recid_1" = mt."Master_Recid_1"
JOIN "M01Tab09_Dx" mdx on mn."Master_Recid_1" = mdx."Master_Recid_1"') mn on td.visitnumber = mn."Pt_Acct_5"
But this presumes that you there are no columns from the SQL Server side that are used to select data from the Oracle side. That is, the above could lead to far much data being brought across the wire.
Then again, this does not really seem to relate to the original problem where a stored procedure was not working at all. That problem is not very easy to assist with since code post is the not the authentic code as pointed out in the thread. For instance
inner JOIN linknametooracledb."M01Tab06_Ord"
Has nothing to do with Oracle, but accesses a table in the schema linknametooracledb.
I think to help dmcm, you need a really good crystal ball - at least as long he/she does not share the actual code.
Erland Sommarskog, SQL Server MVP, [email protected] -
Microsoft OLE DB Provider for Oracle: Data type is not supported.
I got the error:
Microsoft OLE DB Provider for Oracle: Data type is not supported.
Shortly after upgrading from Oracle 8 to Oracle 9. I was advised to download more up to date oracle drivers, but I was wondering if there was a way to tell what version of the 'OLE DB Provider for Oracle' is already at. Is there a command I can use via SQL Plus or something?I have found Microsoft ODBC for Oracle to be more stable than the Microsoft OLEDB for Oracle driver. I have also found both Microsoft ODBC and OLEDB drivers to be more stable than the drivers from Oracle.
You could always get the latest MDAC (Microsoft Data Access Components) from Microsoft's MSDN Download site and then get the ODAC (Oracle Data Access Components) from Oracle's OTN Download site. ODAC requires MDAC. And ODAC has the latest drivers.
I suppose it would help to have the latest patches for your Oracle client software too. Maybe Oracle MetaLink would have these?
It may even help to have the latest service pack for Visual Studio 6 (Visual C++ 6 and Visual Basic 6) too. -
Hi,
I have a field in my table that stores an ID which is encoded using a C function. (third party database)
I have also been provided the C function that decodes that field to display the actual value. I have compiled this code using Visual Studio .Net 2003 to a dll file, but do not know how to use it in Oracle. Or are there other ways to use this decode function in Oracle?
I am on 9i database, Windows 2003 server.
Any help is appreciated.
Thank you.Hi, see:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9087161189226 -
What is the use of SYSAUX Tablespace in Oracle 10G
Dear Experts,
Please Tell me What is the use of SYSAUX Tablespace in Oracle 10G Because
during Web Load Testing It is going to increase countinuosly.Although i am not using this with any tables.
How Can I find out the what is gong on in this.
Can I Remove this tablesspace and other non using Schemas like FLOWS_020100,MDSYS,OUTLN,DIP and TSMSYS etc.What is SYSAUX?
The SYSAUX tablespace provides storage of non-sys-related tables and indexes that traditionally were placed in the SYSTEM tablespace. For example, the tables and indexes that were previously owned by the system user can now be specified for a SYSAUX tablespace. Unfortunately, Oracle still places the SCOTT schema and the other demonstration schemas in the SYSTEM tablespace. Go figure.
The SYSAUX tablespace is specified with the CREATE DATABASE command. This is demonstrated in the example database creation script in Figure 1.1.
CREATE DATABASE test
MAXINSTANCES 1
MAXLOGHISTORY 1
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
UNDO TABLESPACE "UNDOTBS1" DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo01.log') SIZE 10240K,
GROUP 2 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo02.log') SIZE 10240K,
GROUP 3 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo03.log') SIZE 10240K
USER SYS IDENTIFIED BY "password" USER SYSTEM IDENTIFIED BY "password";
Oracle10g sysaux
With the new SYSAUX tablespace, Oracle comes closer to providing all the needed tablespaces for a truly OFA-compliant database right out of the box. With just one CREATE DATABASE command we can specify the SYSTEM tablespace, the TEMPORARY tablespace, the AUXSYS tablespace, the default UNDO tablespace, and the redo logs.
Of course, with the Oracle Managed Files option you can create an entire database with a single command, but the database created is not suitable for production use and is not OFA-compliant.
The SYSAUX tablespace is required in all new 10g databases. Only the SYSAUX tablespace datafile location is specified. Oracle specifies the remainder of the tablespace properties including:
online
permanent
read write
extent managment local
segment space management auto
If a datafile is specified for the SYSTEM tablespace, then one must be specified for the SYSAUX tablespace as well. If one is not specified, then the CREATE DATABASE command will fail. The only exception is for an Oracle Managed File system.
During any update of a database to Oracle Database 10g, a SYSAUX tablespace must be created or the upgrade will fail. The SYSAUX tablespace has the same security profile as the SYSTEM tablespace. However, loss of the SYSAUX tablespace will not result in a database crash, only the functional loss of the schemas it contains.
Can I drop SysAux?
DROP DATAFILE
Read this...
Maybe you are looking for
-
The question pretty much sums up what I want to ask. Thank you very much for any and all help. I know this is not the place to rant but I think this needs to be said - Why do you(firefox devs) guys keep on changing things that were perfectly fine in
-
PRS-T1 stuck in infinite reboot loop after failed firmware update
Hi, I tried to update the firmware, but failed when updating to version 1.0.07.05070. Tried to 2 times. The first time it failed I simply tried again. The second time, it took a lot longer to reach the failed to update message, but it did cause the e
-
Hyperlink on image within webi report
Hello, is there a way to add a hyperlink on an image within a webi report? I tried placing an image in a separate column and checked Read content as hyperlink and placed the link . but unable to click on the image.Placed jpg image. I am using BO 4.0
-
Network issue between Macbook Pro and Windows
I have a Macbook Pro 2012 model running 10.8.5. Also have a Win7 PC. When both are connected to the home router via wire (or the Windows on wireless), everything is fine from network connectivity point of view. However if I move the Mac to Wireless (
-
More Image Time/Date Questions
I hate to keep bringing up Time/Date/Time Zone related issues, but it seems I have another... I have certain images for which I have changed the date and time and time zone. The metadata reflects the proper time, date and time zone, but oddly, when I