Output an Oracle view through PHP

Hi All
I have a view in Oracle that i have created previously that has data in the following format:
| Column1 | Column 2 | Column 3 | Column 4 |
I am trying to select this view within a PHP script and echo out the output to a web page. I am having difficulties coming up with a script though that will allow me to accomplish this task. Is there any method of making this work?
The other question i have is somewhat related.... i have an excel file that has a data connection configured. when the excel file opens it queries the views and fills in the tables with the results. Is it possible to write a php script to automatically take an existing excel file, physically open it on the server so that it gets all of the data? once it does this i can create a macro within excel to save and close the file. I just cant get the excel file to physically open in order for the data connection to occur.
I am looking at the first method rather than the 2nd as it will allow me to display the results of my view in a web page. Otherwise if i use the 2nd method, i will have to email out a pdf version of the report once it is inhabited with the correct data.
Thanks!!!!!!!

A standard SELECT query from the view will give you data you can print out. Check the PHP Manual for the OCI8 extension, or look at Underground PHP and Oracle Manual
-- cj

Similar Messages

  • Oracle Views through Cognos

    Hi,
    I am having difficulty in accessing oracle EBS-R12 views through cognos. One of EBS view is based on multiple tables, when I try to create and execute cognos report based on that view, cognos does not show any record even though records are there. But if the same report is created based on tables which are used in the same view, report is working fine. I prefer to use views for my reports.
    Please help ASAP.
    Many thanks in advance.
    Regard.

    'Business Partner' doesn't tell anything, as that is a label you pay for as a customer, and doesn't include any knowledge of products of the partner.
    So you shouldn't 'think' you can post this on either forum: Cognos is not owned by Oracle,and even it was owned by Oracle, there would have been a seperate forum on OTN.
    But then it isyour appalling incivility and rudeness which precludes any answer!
    Apart from that, directing you to a different forum is a legitimate answer, as you are posting to an incorrect forum, so please don't say I shouldn't have responded, and apologize for your behavior!
    No regards at all
    Sybrand Bakker
    Senior Oracle DBA

  • How to insert data into Oracle db from MySQL db through PHP?

    Hi,
    I want to insert my MySQL data into Oracle database through PHP.
    I can access Mysql database using mysql_conect() & Oracle database using oci_connect() through PHP.
    Now How can I insert my data which is in MySQL into Oracle table. Both table structure are exactly same.
    So I can use
    insert into Oracle_Table(Oracle_columns....) values(Select * from MySQL_Table);
    But again problem is I can't open both connections at the same time.
    So has anyone done this before or anyone having any other idea..
    Plz guide me...

    You can do it if you setup a ODBC Gateway between MYSQL and Oracle DB. Then you can directly read from MySQL table using DB links and insert into Oracle table in one single SQL Statement.
    Otherwise you need to fetch the data from MySQL Into variables in your PHP Program and then insert into Oracle after binding the variables to the insert statement for Oracle. Hope that is clear enough.
    Regards
    Prakash

  • Not able to connect Oracle through PHP

    Hello All ,
    I am trying to connect Oracle DB through PHP script . But I am not able to do so .
    My code is :
    <?php
    echo "PRASHANT" ;
    include 'include/odb.php';
    include 'include/ReadConfig.php';
    $conn=OrclConnect('orcl');
    $conn->SetFetchMode(ADODB_FETCH_BOTH);
    echo "DWIVEDI" ;
    ?>
    But when I ran this script throgh command prpmpt , I am getting the first echo message .. But not the last one ( echo "Dwivedi") .
    I am not able to connect Oracle DB through this script .
    Please some one help me out where I am wrong with script .
    Thanks
    Prashant Dwivedi

    Below is my source code
    <?php
    $ORACLE_HOME = 'D:\\oracle\\product\\10.2.0\\parag';
    $ORACLE_SID = 'parag';
    $LD_PRELOAD ='';
    $LD_LIBRARY_PATH ='';
    $TNS_ADMIN = 'D:\\oracle\\product\\10.2.0\\parag\\NETWORK\\ADMIN';
    $NLS_LANG = 'AMERICAN_AMERICA.WE8MSWIN1252';
    $username='spd';
    $password='spd';
    $db='(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = parag)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = parag)))';
    echo "here1";
    echo "$TNS_ADMIN";
    $conn = oci_connect($username,$password,$db);
    echo "$ORACLE_HOME";
    if (!$conn) {
    $e = oci_error();
    print htmlentities($e[' message']);
    exit;
    ?>
    But still i am getting the same error message

  • Printing from Crystal Viewer through IE 7

    I have a user that's printing some forms from a database that outputs to crystal viewer through IE 7.  This error window comes up when the user tries to print the report from IE 7:
    1.      Your current security settings prohibit running ActiveX controls on this page, or
    2.      You have blocked a publisher of one of the controls
    As a result, the page may not display correctly.
    I've searched the issue and set the correct activex settings for this type of error for IE and still no dice.  I've been searching tirelessly through different forums and tried various options from trying different activex controls and trying to set the virtual directory where activex needs to be activated.  The environment is vista business and the browser is IE 7.  I hear there compatibility issue's with vista and there's updated activex controls.  I just wanted to know if there's an updated package so I can try this solution out as this is affecting a whole dept.  Any info would be much appreciated!  Thanks.

    Ok, if you are using 11.0 and not 11.5 then check out this [platforms |http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/e09198a1-911e-2b10-179f-ce8eed51aed0]pdf file. We do support Vista with the latest Service Pack but we do not support IE 7. So no work around for you. All I can suggest is either ask them to upgrade there program/runtime to CR XI R2 ( 11.5 ) or you will have to roll back to IE 6.
    CR XI ( 11.0 ) is past its end of life so no new platform support will be added. Let your software owners know they can upgrade to CR XI R2 for free.
    Here's the info:
    Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
    Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    Do not do this yourself, they must update their runtime and application. You doing so will not work.
    Thanks agian
    Don

  • Discover Report  in Viewer through Oracle Apps

    hi,
    I want to launch the Discoverer Report in Viewer through Oracle Apps.
    Through Concurrent Program, by passing some parameters...?
    Do any one havei idea how to do it?
    Thanks in Advance
    regards
    -Seetha

    Hi,
    You can launch Disco Viewer or Plus from the Apps menu by creating an OracleOASIS Application Function.
    If you want to run Discoverer from a Concurrent Program then I assume you want the output of the Discoverer report as an HTML ( or some other format) available as output from the concurrent job. If that is the case then Discoverer Desktop Edition must be used to export the workbook into a file and this can be done from the current manager with a bit of development.
    On our system we have developed a concurrent request to schedule Discoverer workbooks. The main parameters for the concurrent request are the workbook you want to run, the parameters for the workbook, the responsibility you want to use to run the workbook in Discoverer and the type of export you want (ie. HTML, PDF, Excel etc). The concurrent request then sends the request to a Discoverer workstation. A simple VBSript on the workstation runs Discoverer from the command line and exports the workbook to a file to the request output directory back on the database server (using a SAMBA drive). The Discoverer report then can then viewed as output from the concurrent request. However, we mainly use a web page integrated to Apps to view and download output from our concurrent requests. This all works smoothly and provides a better alternative for Applications than using Discoverer scheduling.
    Hope that helps,
    Rod West

  • How do I migrate views from MS SQL 2008 to Oracle 11g through SQL Developer

    Is there any way to migrate the views from MS SQL 2008 to Oracle 11g through SQL Developer? Please give me some detail steps. Thanks for your help.
    Kevin

    Hi Kevin,
    user13531850 wrote:
    Hi Turloch,
    When I use migrate to oracle, I got a problem, the migrate tool create a new schema for me in my case (AZTECA_KSMMS), it migrates all the stuffs under that schema (AZTECA_KSMMS). However my application need the all the Oracle data under schema AZTECA instead of AZTECA_KSMMS. Is there any way to specify specific schema (AZTECA) for target oracle database? Schema remapping is available:
    First Capture (separately) then during right click convert on the captured model there is a Specify the conversion options with a Object Naming tab where the schema (and other) name changes are editable.
    I have not used this recently.
    Also during the migration process, when I choose repository, there is a check box for truncate to reset repository to empty state, Do I need to check that truncate Check Box so the repository will be cleared from last migration?The repository can hold multple migration attempts. Check truncate to get rid of previous attempts information. This cleans up the repository - not the destination database.
    There are also online database and offline database options during the migration process, what are the difference between these two choices? After I migrated to Oracle, all my views has a red cross icon next to it. Does that mean the view migration is failed or not? Please give me your comments. Thanks for your help.offline: for big (amount of data) databases with simple data types,
    uses bcp + files + scripts + sqlldr.
    online: for small (amount of data) databases (easier),
    uses (Java) jdbc.
    The view is likely to be broken - recompiling it may help.
    The Oracle schema is created using a .sql file - see under generated in the directory you gave originally in the wizard. There is a .out file that contains the result of running this script including any errors. During conversion there are also likely to be warnings displayed on the UI.
    There may be a single issue that is causing multiple issues - if viewa depends on functionb, and functionb is broken, viewa will also fail.
    >
    Kevin-Turloch
    SQLDeveloper Team

  • Replicate an oracle view with SLT

    Hi -
    Using Oracle 11g and SLT 2011_1_731 Patch 7 with Hana rev 82
    I am trying to replicate oracle views in hana through SLT
    Scenario 1:
    tables T2 and T3 with View T2_T3_view
    If I follow this thread  SLT view replication
    It creates the view as a table in hana  but does not populate it with any data.
    Scenario 2 -
    I have 2 oracle tables - T4 and T5.  I have a view T4_T5_VIEW that joins the 2 tables.
    I followed steps in a document I received to replicate the view syntax as well as the tables.
    1) replicated both tables T4 and T5 - success
    2) stopped replication on T4
        table exists in hana with data but no replication
    3) using LTRS, assigned the view T4_T5_VIEW to table T4
    4) changed the performance option
    5) restarted replication on T4
    The view gets created as a table, but table T4 gets and error and does not replicate.
    The view gets no data
    What is the proper process for an oracle table?
    I have a very complex view with 5 source tables I want to replicate.
    Thanks
    Diane

    sorry,
    with the query
    SELECT TAB2.COD_M ,
    COUNT(TAB1.COD_MAT) count_mat
    FROM TAB2,
    TAB1
    WHERE TAB2.COD_R (+) = TAB1.COD_MAT
    AND TAB1.COD_R IN ('1','3')
    GROUP BY TAB2.COD_M
    I get:
    COD_M..........COUNT_MAT
    00114940...........1
    00116220...........1
    00116300...........2
    00119320...........1
    00119450...........1
    ...................0
    but I'd like to get this output:
    COD_M..................count_mat
    00114940...................1
    00114949...................0
    00116220...................1
    00116300...................2
    00119324...................0
    00119450...................1

  • Want to see on screen data from oracle database using php

    I am struggling on the problem of echoing data from Oracle database (9i) to the screen for viewing. For ex. the data has records from various cities. when a particular city is inputted as prompt, all the records for the that city from the table should appear through PHP. Can someone help me?

    Thank you very much for giving the link. I tried and it is working. Only, I am still struggling with trying to get many fields from the database on the screen for viewing. Ex. a prompt to ask which country and which month. If I give India and December it must give all the data pertaining to India for December. This AJAX was very useful, as it gave lot of tips, but my basic query to see the data thru PHP from my database is still unsolved. Any help??
    Jacob
    Thanks once again for the help.

  • XML output from oracle equivalent to sql server

    Hi,
    I need an equivalent sql server 2005 equivalent output from oracle.
    Tried with DBMS_XMLGEN.getxml, xforest etc. But I am not able to get desired output.
    Could anyone help me in giving a hint to do so.
    Here below i am pasting sql server 2005 query and output, oracle query and output.
    SELECT top 5
    P.process_id AS Ppid,
    P.name AS Pn,
    P.group_id AS Pg,
    P.locked AS Pl,
    P.build AS Pb,
    100 AS qcount,
    200 AS ocount,
    PI.question_id AS PIqid,
    PI.process_id AS PIpid,
    PI.posx AS PIpx,
    PI.posy AS PIpy,
    PI.innertext AS PItext,
    PI.itemtype AS PItype,
    PI.linkfrom AS PIfrom,
    PI.linkto AS PIto,
    PI.associated AS PIas,
    PI.content_id AS PIc,
    PI.exitpoint1_id AS PIe1,
    PI.exitpoint2_id AS PIe2,
    PI.exitpoint3_id AS PIe3,
    PI.resolveidentifier AS PIri,
    PI.libquestion_idfk AS PIlqid,
    PI.followoncall AS PIfoc,
    PI.userinput AS PIui,
    PI.isLocked AS PIstls,
    PI.PreviousAnswer as PIPAns,
    PI.VisibleToAgent as PIVAgent,
    PI.RetryAttempt as PIRetry,
    PI.Tags as PITag,
    PO.option_id AS POoid,
    PO.question_id AS POqid,
    PO.process_id AS popid,
    PO.posx AS POpx,
    PO.posy AS POpy,
    PO.opt_innertext AS POtext,
    PO.opt_linkfrom AS POfrom,
    PO.opt_linkto AS POto,
    PO.libquestion_idfk AS POlqid,
    PO.liboption_idfk AS POloid
    FROM
    dbo.processes_ec AS P WITH (nolock) INNER JOIN
    dbo.vw_ProcessesQuestions_Simulator_v6 AS PI WITH (nolock)
    ON P.process_id = PI.process_id LEFT OUTER JOIN
    dbo.vw_ProcessesOptions_Simulator_v6 AS PO WITH (nolock)
    ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
    ORDER BY Ppid, PIqid, POoid ASC
    FOR XML AUTO, ELEMENTS
    O/P
    <P>
    <Ppid>450</Ppid>
    <Pn>CBB1015 - Router Firewall Settinngs Process</Pn>
    <Pg>9</Pg>
    <Pl>0</Pl>
    <Pb>5</Pb>
    <qcount>100</qcount>
    <ocount>200</ocount>
    <PI>
    <PIqid>1</PIqid>
    <PIpid>450</PIpid>
    <PIpx>366</PIpx>
    <PIpy>-516</PIpy>
    <PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
    <PItype>Title</PItype>
    <PIto>2</PIto>
    <PO />
    </PI>
    <PI>
    <PIqid>2</PIqid>
    <PIpid>450</PIpid>
    <PIpx>366</PIpx>
    <PIpy>-437</PIpy>
    <PItext>Is the customers PC Firewall turned off?</PItext>
    <PItype>Question</PItype>
    <PIfrom>1</PIfrom>
    <PIto>2.2,2.1</PIto>
    <PO>
    <POoid>1</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POpx>-50</POpx>
    <POpy>70</POpy>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POpx>50</POpx>
    <POpy>70</POpy>
    <POtext>No</POtext>
    <POto>3</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>3</PIqid>
    <PIpid>450</PIpid>
    <PIpx>468</PIpx>
    <PIpy>-344</PIpy>
    <PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
    <PItype>Question</PItype>
    <PIfrom>2.2</PIfrom>
    <PIto>3.2,3.1</PIto>
    <PIc>278</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POpx>-50</POpx>
    <POpy>70</POpy>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POpx>50</POpx>
    <POpy>70</POpy>
    <POtext>No</POtext>
    <POto>4</POto>
    </PO>
    </PI>
    </P>
    Oracle query and output
    select DBMS_XMLGEN.getxml('select * from (SELECT
    P.process_id AS Ppid,
    P.name AS Pn,
    P.group_id AS Pg,
    P.locked AS Pl,
    P.build AS Pb,
    100 AS qcount,
    200 AS ocount,
    PI.question_id AS PIqid,
    PI.process_id AS PIpid,
    PI.posx AS PIpx,
    PI.posy AS PIpy,
    PI.innertext AS PItext,
    PI.itemtype AS PItype,
    PI.linkfrom AS PIfrom,
    PI.linkto AS PIto,
    PI.associated AS PIas,
    PI.content_id AS PIc,
    PI.exitpoint1_id AS PIe1,
    PI.exitpoint2_id AS PIe2,
    PI.exitpoint3_id AS PIe3,
    PI.resolveidentifier AS PIri,
    PI.libquestion_idfk AS PIlqid,
    PI.followoncall AS PIfoc,
    PI.userinput AS PIui,
    PI.isLocked AS PIstls,
    PI.PreviousAnswer as PIPAns,
    PI.VisibleToAgent as PIVAgent,
    PI.RetryAttempt as PIRetry,
    PI.Tags as PITag,
    PO.option_id AS POoid,
    PO.question_id AS POqid,
    PO.process_id AS popid,
    PO.posx AS POpx,
    PO.posy AS POpy,
    PO.opt_innertext AS POtext,
    PO.opt_linkfrom AS POfrom,
    PO.opt_linkto AS POto,
    PO.libquestion_idfk AS POlqid,
    PO.liboption_idfk AS POloid
    FROM
    processes_ec P INNER JOIN
    vw_ProcessesQuestions_Sim_v6 PI
    ON P.process_id = PI.process_id LEFT OUTER JOIN
    vw_ProcessesOptions_Sim_v6 PO
    ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
    ORDER BY Ppid, PIqid, POoid ASC) where rownum<=5') from dual
    O/P
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>1</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-516</PIPY>
    <PITEXT>CBB1015 - Router Firewall Settinngs Process</PITEXT>
    <PITYPE>Title</PITYPE>
    <PITO>2</PITO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>2</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-437</PIPY>
    <PITEXT>Is the customers PC Firewall turned off?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>1</PIFROM>
    <PITO>2.2,2.1</PITO>
    <POOID>1</POOID>
    <POQID>2</POQID>
    <POPID>450</POPID>
    <POPX>-50</POPX>
    <POPY>70</POPY>
    <POTEXT>Yes</POTEXT>
    <POTO>5</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>2</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-437</PIPY>
    <PITEXT>Is the customers PC Firewall turned off?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>1</PIFROM>
    <PITO>2.2,2.1</PITO>
    <POOID>2</POOID>
    <POQID>2</POQID>
    <POPID>450</POPID>
    <POPX>50</POPX>
    <POPY>70</POPY>
    <POTEXT>No</POTEXT>
    <POTO>3</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>3</PIQID>
    <PIPID>450</PIPID>
    <PIPX>468</PIPX>
    <PIPY>-344</PIPY>
    <PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>2.2</PIFROM>
    <PITO>3.2,3.1</PITO>
    <PIC>278</PIC>
    <POOID>1</POOID>
    <POQID>3</POQID>
    <POPID>450</POPID>
    <POPX>-50</POPX>
    <POPY>70</POPY>
    <POTEXT>Yes</POTEXT>
    <POTO>5</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>3</PIQID>
    <PIPID>450</PIPID>
    <PIPX>468</PIPX>
    <PIPY>-344</PIPY>
    <PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>2.2</PIFROM>
    <PITO>3.2,3.1</PITO>
    <PIC>278</PIC>
    <POOID>2</POOID>
    <POQID>3</POQID>
    <POPID>450</POPID>
    <POPX>50</POPX>
    <POPY>70</POPY>
    <POTEXT>No</POTEXT>
    <POTO>4</POTO>
    </ROW>
    </ROWSET>
    Any help really appreciated.
    Thanks in advance

    Here are the links ->
    http://www.psoug.org/reference/xml_functions.html
    http://www.psoug.org/reference/dbms_xmlgen.html
    http://www.adp-gmbh.ch/ora/sql/xmlelement.html
    http://www.oracle-base.com/articles/9i/SQLXML9i.php
    http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96620/toc.htm
    Regards.
    Satyaki De

  • How to create an Oracle DATABASE through Java Programming Language.. ?

    How to create an Oracle DATABASE through Java Programming Language.. ?

    Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
    In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
    So a certain amount of manual installation will always be required.
    Typically you would supply the SQL scripts, and a detailled installation document too.
    regards,
    Owen

  • ORA-12514 Connecting through php

    So I want to connect to my database through php. I'm using XAMPP 3.1, Oracle 11g, PHP 5 and Windows XP Pro (VM), and I get this error
    Error: 12514 - ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Here I do "lsnrctl services":
    C:\Documents and Settings\Administrator>lsnrctl services
    LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 04-JAN-2013 01:03
    :56
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    A ligar a (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=daniel-2f3bc07e)(PORT=1521))
    Resumo dos Serviτos...
    O serviτo "BD1213XDB" tem 1 instΓncia(s).
    A instΓncia "bd1213", estado READY, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "D000" estabelecido:0 recusado:0 actual:0 mßx.:1022 estado:ready
    DISPATCHER <machine: DANIEL-2F3BC07E, pid: 2744>
    (ADDRESS=(PROTOCOL=tcp)(HOST=daniel-2f3bc07e)(PORT=1028))
    O serviτo "CLRExtProc" tem 1 instΓncia(s).
    A instΓncia "CLRExtProc", estado UNKNOWN, tem 1 rotina(s) de tratamento deste
    serviτo...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:3 recusado:0
    LOCAL SERVER
    O serviτo "Oracle8" tem 1 instΓncia(s).
    A instΓncia "ORCL", estado UNKNOWN, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:0 recusado:0
    LOCAL SERVER
    O serviτo "bd1213" tem 1 instΓncia(s).
    A instΓncia "bd1213", estado READY, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:52 recusado:0 estado:ready
    LOCAL SERVER
    Comando concluφdo com Ωxito
    C:\Documents and Settings\Administrator>
    I'm sorry for this being in portuguese, I don't know how to get in english. I want to connect to bd1213. And the php I'm running:
    <?php
    $cfg = array();
    $cfg['username'] = "trabalho";
    $cfg['password'] = "cp7";
    $cfg['c_string'] = "daniel-2f3bc07e:1521/trabalho";
    $cbd = oci_connect($cfg['username'], $cfg['password'], $cfg['c_string']);
    if(!$cbd){
    $err = oci_error();
    echo "Erro: ".$err['code']." - ".$err['message'];
    die();
    ?>
    Any thougts on how to fix this?
    Thanks in advance!
    Regards,
    Daniel

    979823 wrote:
    So I want to connect to my database through php. I'm using XAMPP 3.1, Oracle 11g, PHP 5 and Windows XP Pro (VM), and I get this error
    Error: 12514 - ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Here I do "lsnrctl services":
    C:\Documents and Settings\Administrator>lsnrctl services
    LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 04-JAN-2013 01:03
    :56
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    A ligar a (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=daniel-2f3bc07e)(PORT=1521))
    Resumo dos Serviτos...
    O serviτo "BD1213XDB" tem 1 instΓncia(s).
    A instΓncia "bd1213", estado READY, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "D000" estabelecido:0 recusado:0 actual:0 mßx.:1022 estado:ready
    DISPATCHER <machine: DANIEL-2F3BC07E, pid: 2744>
    (ADDRESS=(PROTOCOL=tcp)(HOST=daniel-2f3bc07e)(PORT=1028))
    O serviτo "CLRExtProc" tem 1 instΓncia(s).
    A instΓncia "CLRExtProc", estado UNKNOWN, tem 1 rotina(s) de tratamento deste
    serviτo...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:3 recusado:0
    LOCAL SERVER
    O serviτo "Oracle8" tem 1 instΓncia(s).
    A instΓncia "ORCL", estado UNKNOWN, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:0 recusado:0
    LOCAL SERVER
    O serviτo "bd1213" tem 1 instΓncia(s).
    A instΓncia "bd1213", estado READY, tem 1 rotina(s) de tratamento deste serviτ
    o...
    Rotina(s) de tratamento:
    "DEDICATED" estabelecido:52 recusado:0 estado:ready
    LOCAL SERVER
    Comando concluφdo com Ωxito
    C:\Documents and Settings\Administrator>
    I'm sorry for this being in portuguese, I don't know how to get in english. I want to connect to bd1213. And the php I'm running:
    <?php
    $cfg = array();
    $cfg['username'] = "trabalho";
    $cfg['password'] = "cp7";
    $cfg['c_string'] = "daniel-2f3bc07e:1521/trabalho";
    $cbd = oci_connect($cfg['username'], $cfg['password'], $cfg['c_string']);
    if(!$cbd){
    $err = oci_error();
    echo "Erro: ".$err['code']." - ".$err['message'];
    die();
    ?>
    Any thougts on how to fix this?
    Thanks in advance!
    Regards,
    DanielORA-12514 ALWAYS only occurs due to a problem on DB Server system.
    One cause of this problem is when the Oracle database is down & needs to be started.
    A remote client send a request to the Listener asking to be connected to a specific service.
    If/when the listener does not know anything about that service, the listener responds with ORA-12514
    Since every connection request to the listener gets logged, listener.log file will contain a line with 12514 as status code.
    This line contains valuable debugging details. So post this line & surrounding lines.
    for additional debugging suggestions read the URL below:
    http://edstevensdba.wordpress.com/2011/03/19/ora-12514/

  • Accessing XML View through DBUri

    I am having problem in accessing XML View through HttpURI.
    Also i need some advise in following such architecture between my app server and DB server.
    The problem i am facing is that
    1. The query passed through URI does a full table scan, hence poor performance.
    2. Not able to query on date/timestamp.
    Any help would be appreciated.
    Thanks

    Here is how my output would be..
    <log systemID="00XXXABC01" MLN="9999" USN="00XXXPET01" timeStamp="Sun Jun 1 22:00:11 2003" timeZone="BST - Europe/London">
    <message type="XXXHealthPage" time="Sun Jun 1 22:00:11 2003" source="XXX">
    <text>This is manxx1 machine's HealthPage report</text>
    <detail>
    <generic_report title="XXX System Health Report">
         <emailaddr>[email protected]</emailaddr>
         <heading title="System Identification">
         <linevalue name="Report_date">Sun Jun 1 22:00:11 2003</linevalue>
         <linevalue name="Last_update_time">May 02 2003 22:00:14</linevalue>
         </heading>
    </generic_report>
    </detail>
    </message>
    </log>
    I have underlined the variables that i have to query on.. basically i have to select messages between certain times for a particular system.
    am trying a query..
    1. http://localhost:8080/oradb/MACLOG/TEST_MACHINE_XML1/ROW/log[@systemid="415444KCT"]
    This doesnt work for some reason.. i had to make systemid as a separate element.(@attribute doesnt work)2. i dono how to query for message[@time between to_char(...)]
    Any Help..

  • Built in audio output (speakers) are playing through different channels.

    My built in audio output (speakers) are playing through different channels. How do I make them both play through the same channel? It has something to do with the audio midi setup. When i click "Configure Speakers" on th Built-In Output I don't get the option of "-" for which channel the audio should go out of, I just get "1" or "2" as an option. This happens when i select them to be both stero and multichannel speakers. Any ideas on how to fix it?

    Is there a red light glowing inside the jack? It sounds like a faulty jack. Read this:
    http://forums.macrumors.com/archive/index.php/t-232084.html
    -Bmer
    Mac Owners Support Group
    Join Us @ MacOSG.com
    iTunes: MacOSG Podcast
     An Apple User Group 

  • How create just one Oracle view

    Hi,
    I've table TAB_ID
    COD_ID
    G0DE-0-10047514
    M0DF-1-10000281
    T0DH-3-20500819
    R0DJ-2-10603746
    G0DY-0-20006783
    G0DZ-0-20049734
    G0E0-0-10004325
    G0E1-0-10049593
    A20T-0-EMS00038
    D20T-0-EMS00039
    S20T-0-EMS00041
    M20T-0-EMS00234
    I'd like to creare just one view with this output:
    COD_ID
    10-47514
    10-281
    20-500819
    10-603746
    20-6783
    20-49734
    10-4325
    10-49593
    EMS00038
    EMS00039
    EMS00041
    EMS00234
    If SUBSTR(COD_ID,8) is number THEN substr(COD_ID,1,2)||'-'||
    REPLACE(LTRIM(REPLACE(SUBSTR(COD_ID,3),'0',' ')),' ','0')
    If SUBSTR(COD_ID,8) is alphanumeric THEN SUBSTR(COD_ID,8)
    If I create 2 oracle view seems that I get correct output:
    create or replace view v_cod (cod_id)
    as
    select substr(cod_id,8) cod_id
    from tab_id
    create or replace view v_cod_id (cod_id)
    as
    select substr(COD_ID,1,2)||'-'||
    REPLACE(LTRIM(REPLACE(SUBSTR(COD_ID,3),'0',' ')),' ','0') cod_id
    from v_cod
    where cod_id > '00000000'
    AND cod_id < '99999999'
    union all
    select substr(COD_ID,1,2)||'-'||
    REPLACE(LTRIM(REPLACE(SUBSTR(COD_ID,3),'0',' ')),' ','0') cod_id
    from v_cod
    where COD_ID not between '00000000' and '99999999'
    But I must create Just one view
    Can I create only one Oracle View (from TAB_ID) to get this output?
    Thanks in advance!

    If all your data conforms to the pattern given above then this (warning! untested code ahead) will work:
    CREATE OR REPLACE VIEW just1view AS
    SELECT CASE WHEN SUBSTR(cod_id,8,1) BETWEEN '0' AND '9'
                THEN SUBSTR(cod_id,8,2)||'-'||REPLACE(SUBSTR(cod_id,10),'0',NULL);
                ELSE SUBSTR(cod_id,8) AS cod_id
    FROM   tab_id
    /Otherwise, you'll need to use a slightly more sophisticated format checker. I suggest you look at Re: How to test a variable to determine whether it is a CHARACTER on use of TRANSLATE().
    Cheers, APC

Maybe you are looking for