10g, DBMS_ADVANCED_REWRITE question

Hi,
I'm on an Oracle 10g database. I have been reading about the DBMS_ADVANCED_REWRITE package. It sounds really cool. I do have one question about how it works ...
If I have a query ...
select mycol1
from mytable
where mycol2 = 123
order by mycol1;
Is there any way to use this package with out knowing what '123' would be? ie it is possible it can change?
Is it possible to do something like the following?
select mycol1
from mytable
where mycol2 = VARIABLE
order by mycol1;
Thanks for helping this novice.

The DBMS_ADVANCED_REWRITE package allows you to intercept specific SQL statements and replace them with alternative statements. This is done by defining functional equivalence definitions, which are used by the rewrite engine in addition to regular query rewrites. This can be useful when you need to make minor alterations to the way applications work when you don't have access to the code. This article presents a simple example of how this can be achieved
see this link
http://www.oracle-base.com/articles/10g/dbms_advanced_rewrite.php

Similar Messages

  • Discoverer 10G Plus Questions

    Hi
    We're in the process of upgrading from Discoverer 4 (APPS EUL) to 10G. We're doing away with the Desktop client. Most users will be given access to Discoverer Viewer and other users will be given access to Plus. We have recently upgraded or DEV instance and there are a few "questions" (i.e. gripes) that users have come back to me with:
    1) Do all reports have to be stored on the database to allow them to be accessed by Plus or Viewer? Can only the 10G client version open files from a local hardrive or shared network drive?
    2) Can only one report be open at any given time with Plus or Viewer? In client it is possible to have 2 reports open at the same time to facilitate easier comparisons.
    3) NULL values are still showing the word "NULL" even though in Tools Options we have set it to show blank, existing reports are still using the NULL value.
    I'd very much appreciate feedback on any of the 3 points above.
    Thanks.
    Paul.

    Hi paul,
    Its a good idea to upgrade from 4i to 10g 4i is no more used by many and their are some issues or bugs with it.The latest version is 11g which has been released 1 week back.If not go with 10g version available.
    1) Do all reports have to be stored on the database to allow them to be accessed by Plus or Viewer? Can only the 10G client version open files from a local hardrive or shared network drive?Yes they have to stored in the database so any ened user can access them from plus or viewer.
    Can only one report be open at any given time with Plus or Viewer? In client it is possible to have 2 reports open at the same time to facilitate easier comparisons.Yes,if the reports are registered as different reports and if the end user has access to both the reports thn he can open and compare it OR if both reports are in same workbook as different sheets than its easy to view or compare.
    NULL values are still showing the word "NULL" even though in Tools Options we have set it to show blank, existing reports are still using the NULL value.It should show blank,might be some problem.In discoverer 10g i think you will not find this issues.
    Hope this helps you.
    Best Wishes,
    kranthi.

  • 10g memory question on windows 2003 64-bit

    oracle 10.2.0.4
    windows server 2003 sp2 64-bit
    We have a 10g database running on a windows 2003 64-bit with 32GB memory. We set the sga max and target to 10GB and cache to 5GB.
    When I look at the task manager, I see there is only 1GB of free memory left. We only have the database running on this server. I would expect a lot more free memory on this server. What would account for the difference? thx
    32GB - 10GB (db) - 5GB (cache) - 6.5GB (20% OS) = 10G

    Handle:      user13153528
    Status Level:      Newbie
    Registered:      May 24, 2010
    Total Posts:      38
    Total Questions:      15 (15 unresolved)
    so many questions without ANY answers.
    so, what is windows doing with the other memory, how do I see it?OS file system cache

  • Oracle 10g installation questions

    Hi,
    I tried to install Oracle 10g (Enterprise Edition) on Windows 2000 server, and encountered the following error when I used the Database Upgrade Assistance to ugrade one of my existing Oracle 8 database TEST.
    ORA-01658: Unable to create INITIAL extent for segment in tablespace USERS.
    I searched the forum, and seems that there is not enough space for my USERS tablespace. Is it the right solution?
    If I clicked Ignore for the above erro, another error appeared:
    ORA-00942: table or view does not exist.
    I don't have table or view in TEST database, it is just a database instance created by Oracle 8. Do I have to create tables or views in order to upgrade it to Oracle 10g database?
    I tried to upgrade an existing Oracle 8 database TEST1 which has data in it, and got the following error:
    ORA-01119: error in creating database file D:\oracle\oradata\test1\sysaux01.dbf.
    ORA-27044: unable to write the header block of file.
    One last question is that after the failing of the DBUCA, I was told that the 10g was successfully installed on my server while no orcl database was created even if I chose
    to create a database orcl during my installation.
    The following are services running for 10g after the installation.
    OracleCSService Started
    OracleOraDb10g_home1iSQL*Plus Started
    OracleOraDb10g_home1SNMPPeerEncapsulator
    OracleOraDb10g_home1SNMPPeerMasterAgent
    OracleOraDb10g_home1TNSListenerLISTENER10 Started
    Anybody has any idea what went wrong?
    Your early reply is greatly appreciated.
    Jane

    I believe the answers are:
    1. the Oracle client needs to be the same bits as the TimesTen server. i.e. if you have 64b TimesTen, then you will need 64b Oracle client. If you have 32b TimesTen then you will need 32b Oracle client.
    2. Yes. I believe you can install 64b TimesTen with 64b Oracle client and connect this to a 32b Oracle server. I dont have any idea about performance overhead of this configuration.

  • Oracle 10g Install Question

    Hi All,
    I have to install oracle 10g onto a server where there is existing oracle 9i software.
    Is it safe to go ahead with the install, while the 9i databases are up?? what are the consequences of doing this?
    OS patches and kernel parameters as required for oracle 10g have already been changed.
    10g is being installed into a different oracle home and i would choose not to overwrite any of the files as asked by root.sh script.
    OS is hp-ux 11i (11.11).
    Thanks & Regards
    Chandar
    Edited by: chandark on Dec 9, 2008 9:50 PM

    Hi,
    Thanks for your reply.
    Sorry for not being clear in my question earlier.
    I am planning to install Oracle 10g on a server with existing 9i software. My question is whether we should shutdown all 9i databases for the duration of the install or we can leave them running as long as we do not overwrite any 9i files including files in /usr/local/bin directory that contains oranev etc...
    To be on the safer side it is always recomended to shutdown any oracle instances running before we start the install. Wanted to know the consequences if we have them up and running for the duration of the install.
    Thanks & Regards
    Chandar

  • Forms 6i to 10g Migration Questions

    Hi,
    My company is thinking about migrating Forms 6i to 10g. I wonder if you can share some of your experience with us (and with thousands of others who will also face the same daunting task)
    1. How do you like/dislike Forms 10g after the migration?
    2. What are the pitfalls of Forms 10g? What are the strengths?
    3. Other than Oracle Migration tools, is there any other tools that can help us?
    4. How long is the migration process typically taken?
    5. What problems have been encountered in the upgrade process?
    Thank you very much!
    Sincerely,
    John Sun

    May I answer your question with some questions of my own? :)
    1. Are you migrating from Forms6i client-server or web?
    2. If Web, to a non-Windows middle tier (hopefully)?
    3. Do you plan to incorporate OID/SSO and/or Portal in the new environment?
    I just reached the end of a 6-month long prototyping project to migrate our Forms/Reports 6i application (80% client-server, 20% web) to 10g, using SSO and Portal for report destination. We migrated about a dozen forms of varying complexity and rewrote our main application/menu form. We originally thought the prototype would take 3-4 months. The purpose was to learn what we needed to develop the best migration approach and have an idea of what it would cost. The application has about 650 forms/reports modules. Costs and the learning curve prohibited a move to J2EE/ADF; oh I wished... Management is hoping we can complete the full migration in about a year, but I think... well, this is a public forum and I am using my real name. ;)
    We've only been using 10g release 2 since the end of January. Stay away from release 1 at all costs. Even release 2 is not what I would call entirely stable. I just opened a SR on MetaLink a few days ago for a problem I was able to recreate where the use of a button on a form-level toolbar that directly or indirectly call_forms a new form, and then navigation occurs back to the original form (say, when trying to minimize or rearrange widows) causes the session to crash with the infamous ORA-92101. We rely heavily on a hierarchical tree for our application menu, and keyboard navigation on the tree is somewhat broken (tree triggers not firing).
    However, many long-standing 6i bugs have been fixed, and I really, REALLY do appreciate being at PL/SQL version 10 in Forms.
    But we have some real challenges too, some self-inflicted. Some 400 of our application forms were converted from SQL*Forms 3.0 via Kumaran a while back. This is admittedly our greatest challenge. The V3 forms, being they were character-based with no mouse support, had lots of code in Key-navigation triggers that was never meant to be in navigation triggers (validation, etc) and would get bypassed if the user skipped the field using a mouse. Kumaran solved this problem using mouse triggers which are no longer supported on the web. We also are attempting to introduce some enhancements during the migration like become Section 508 compliant.
    I did not opt to use the migration tool; it doesn't really do that much for you anyway.
    One headache for us was Reports. We eliminated many temporary tables (permanent tables created temporarily) in user schemas for the use of global temporary tables. Granted, this feature showed up in Oracle9i. But in 10g, we found inadvertently that database sessions for reports are initiated by a java process and reused for performance, meaning different reports sometimes (and unpredictably) are sharing database sessions instead of getting their own. It would've been nice to know this beforehand because it was a challenge to find out the hard way.
    My biggest complaint is that Forms still lags behind in features that are part of the application server. For example, I would've loved to implement Enterprise Users and rid our database of the many thousands of user accounts. But Forms doesn't support it. And Oracle really should have provided a migration tool to create the OID resource that links the OID user account via SSO to the database account. Especially since Forms only works with database accounts. All we got was a 9i-based White Paper on the APIs to write our own. This is Oracle data, not application data for heavens sake!
    I've opened easily over a hundred SRs during this time, and am quite sure that my name is mud by now and that I have lost any chance of ever getting hired by Oracle. ;)
    If your DBAs are database-centric and not used to administering a middle tier-- or administer an old middle-tier like 9iAS 1.0.2.2.2, get them into instructor-led training on 10g administration BEFORE they have to install the 10g infrastructure and middle tiers. The architecture is radically changed and infinitely more complex. As far as the workload the developers will face; Forms is still pretty much Forms, but the state of your existing code will play into it.
    I was so tired of spending years on older versions of Oracle software. And I am proud to announce that I am now intimately familiar with what is known as The Bleeding Edge.

  • 10g listener question

    Hi
    All,
    First question
    When I do some minor modification in tnsnames.ora. Do I Need to stop and start listener again.
    Second question
    And If I want to stop and start listener Do I need to stop all the databases before I can stop and start listener ? (9i and 10g)
    Thanks,
    Vishal

    When I do some minor modification in tnsnames.ora. Do I Need to stop and start listener again.No, tnsnames.ora is totally independant to the listener.
    And If I want to stop and start listener Do I need to stop all the databases before I can stop and start listener ? (9i and 10g)No, the listener is used only to connect new client to the server, once the connection is done, listener is not used anymore for that connection.
    Note you can reload instead of stop and start the listener.
    Micolas.

  • 10G installation questions

    HI
    At the time I was installing my Oracle10G in my WinXP, the ip address of my host ( PC) was "192.168.1.105". Now it is changed to "192.168.1.100", my EM is not working ( em_start_out,txt - see below )
    Questions:
    ========
    1. How do I handle and address this issue ?
    2. Can I force installer to use host name instead of IP sddress ?
    3. Can I install just the enterprise Manager along. ?
    C:\oracle\product\10.2.0\db_2\oc4j\j2ee>dir
    Volume in drive C is HP_PAVILION
    Volume Serial Number is 3436-15C3
    Directory of C:\oracle\product\10.2.0\db_2\oc4j\j2ee
    08/21/2006 06:10 AM <DIR> .
    08/21/2006 06:10 AM <DIR> ..
    08/10/2006 02:32 PM 264 deploy_db.ini
    08/10/2006 02:29 PM <DIR> home
    08/10/2006 02:27 PM <DIR> isqlplus
    08/10/2006 02:27 PM <DIR> oc4j_applications
    08/10/2006 02:27 PM <DIR> OC4J_DBConsole
    08/10/2006 02:37 PM <DIR> OC4J_DBConsole_192.168.1.100_orcl
    1 File(s) 264 bytes
    7 Dir(s) 136,122,929,152 bytes free
    C:\oracle\product\10.2.0\db_2\oc4j\j2ee>cd
    em_start_out.txt
    ======================================
    C:\oracle\product\10.2.0\db_2\oc4j\j2ee>emctl start dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    http://192.168.1.100:1158/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control ...The OracleDBConsoleor
    cl service is starting.
    The OracleDBConsoleorcl service could not be started.
    A system error has occurred.
    System error 3 has occurred.
    The system cannot find the path specified.
    C:\oracle\product\10.2.0\db_2\oc4j\j2ee>

    Atual,
    Thanks.
    I tried. did not help.
    I have two questions.
    1. At this point, I am unable to start the window service " OracleDBConsoleorcl".
    How do I check the logfile to address this issue.
    2. How do I see the logfile created by the "emctl startup dbconle" command.
    3. What is the config file used by the "emctl startup dbconle" command to derive the following URL http://192.168.1.100:1158
    Here is my terminal output
    ========================
    C:\Documents and Settings\HP_Administrator>emctl start dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Hi Atual,
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    http://192.168.1.100:1158/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control ...The OracleDBConsoleor
    cl service is starting.
    The OracleDBConsoleorcl service could not be started.
    A system error has occurred.
    System error 3 has occurred.
    The system cannot find the path specified.
    C:\Documents and Settings\HP_Administrator>

  • 10G event question

    Hello all
    I am coding Forms in 10G and i have an architectural question. If i am coding a form event with plsql that is not hitting the database how do i know that it is not making a call to the app server. I am worried about coding events that make too many calls back to the server which limits performance. I have coded in .NET and the ability to have events on everything is great for features but really bad for performance. I don't want to create features that are hindering performance due to round trips.
    thanx in advance

    Hi,
    good, question, that I don't have an answer for. I would assume it to be three round trips because the trigger fire in different times and as far as I remember Forms only bundles triggers that are on a specific item.
    Forms does not know whether or not PLSQL code is associated with a trigger and this currently is discussed internally at Oracle as well as here on the forum (some month ago).
    The outcome so far is that it is difficult to not ping the server about actions taking place on thw Forms client because it could be a navigation involved. This, if not reported back to the server, leads e.g. to the :system.cursor_item giving the wrong return value. As said, this is something we are discussing but haven't come to a conclusion.
    For you this means that no matter if there is a PLSQL code associated with a trigger, a network round trip is made. However, keep in mind that we are not issuing a round trip for all triggers on an item but bundle all triggers that fire to the same time (e.g. all POST triggers on an item will cause one roundtrip)
    Frank

  • 10G UTL_MAIL question

    I've followed this:
    http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php#UTL_MAIL
    Question is:
    Is it possible that I can use 'to_recipient_variable' instead of hard coded values ([email protected], [email protected], etc.) in Recipient because I want to use this feature in my search form that I've created using 10G-forms builder.
    fyi:
    I've 'email_field' in the 10G DB which I will search through 10G-based form and after getting the result I want to send emails to everybody who got the hit.
    Thanks.
    Gaurav

    This is a database question better suited for the database forum. But having said that...
    You can create a stored prcedure in the database, and pass the values to it that you want the procedure to use. You don't need to hardcode the values.

  • 10g Flashback questions

    I was wondering if someone could answer these questions about "Flashback" in Oracle 10g?
    Is "Flashback On" required if we are going to have a standby database?
    If "Flashback Off" is set for a database what effect does "Flashback On" have when you create a tablespace?

    We changed the way you work with Struts a little in this version - making it simpler through the Visual Struts Page Flow Modeler.
    You create actions directly on the editor (drag and drop from the componenet palette).
    And you create FormBeans in the structure window.
    (there is a simple tutorial as part of the JDeveloper Reviewer Guide).
    Have a look at the Struts demos on this page:
    http://otn.oracle.com/products/jdev/viewlets/viewlet.html

  • 10G EXPRESS QUESTIONS

    I want to download and start using the free express edition of the db. Before doing so, I have several questions before getting started:
    1) I plan on downloading to, and using the db on, only one system. Which version do I need??? Do I need the server version, client version, or do I need both???
    2) I would prefer to download and use the db from a laptop versus a desktop. Any issues with that??? Of course, the laptop would be sized correctly.
    3) I would prefer to use the db on a Mac but see there is not a version for the Mac OS. Which is the better OS for this db, Windows or Linux???
    Thanks in advance for the help.
    JG

    I want to download and start using the free express
    edition of the db. Before doing so, I have several
    questions before getting started:
    1) I plan on downloading to, and using the db on,
    only one system. Which version do I need??? Do I
    need the server version, client version, or do I need
    both???The 'server' is the database. The 'client' is the software needed to get to the server (get to the database) across the network.
    You need the server at the least.
    If you want to access the database from other computers using something other than a browser, you need the 'client'.
    2) I would prefer to download and use the db from a
    laptop versus a desktop. Any issues with that??? Of
    course, the laptop would be sized correctly.I run Oracle XE on a laptop. 1GB RAM, 40GB disk, P4-2.2GHz laptop. I'm pretty happy.
    3) I would prefer to use the db on a Mac but see
    there is not a version for the Mac OS. Which is the
    better OS for this db, Windows or Linux???
    Which car is better - a Ford or a Chrysler?
    It really comes down to personal preference. The differences between Windows and Linux are not really all that great any more.
    And just like cars - just don't forget that eith has to be maintained. Regularly.
    Message was edited by:
    Hans Forbrich
    PS: I use Linux. But mainly because I've been using computers since the late 1960s and hate the hype around GUI.

  • Oracle 10g Licensing question for Dataguard

    Could some one please let me know if a 10g database with a 10g logical standby database and a 10g Physical standby database requires a dataguard license.
    thanks heaps

    Hello
    if you have Oracle enterprise editon you can use dataguard free
    but dont mind if you have 1 Prod 1 phy standby you must have 2 Oracle license
    Regards
    Zekeriya Besiroglu

  • Multiple oracle client configuration 9i / 10g - variables question

    Our ETL tool sits on a Windows application server.
    The ETL tool communicates with Oracle databases using SQLNet Client.
    The database we need to output to is 10g. The target for this database is defined in the tnsnames.ora file.
    We need to read from 8i, 9i, and 10g databases. The details of these are also in the tnsnames.ora file.
    We would like the default client on the application server running the ETL tool to be the 10g client.
    We would like the 9i client to be installed alongside the 10g client, with the 10g client being the default. We can then create an ODBC connection using the Oracle SQORA32.DLL driver that is packaged as part of the 9i client installation.
    Our ETL tool will then read from the 8i database using the 9i ODBC connection, outputting to a 10g database via the 10g SQLNet client. (We encountered ORA-03134: Connections to this server version are no longer supported when connecting to our 8i database because the version was so old, and we cannot patch it due to business requirements).
    Problem:
    How do we configure the clients to allow this? What is the best way? What should the PATH be set to / should ORACLE_HOME / TNS_ADMIN be defined etc? Are there any other variables that we need to set?
    Edited by: user2392414 on 17-Nov-2008 09:23

    Hi
    Please read that manual
    http://download.oracle.com/docs/html/B10131_02/install.htm#BABGCFCH
    this should help you.
    thanks
    regards,
    Hub

  • Oracle 10g import question

    Hi,
    Is it possible to import oracle 7.3.3.5 export file into oracle 10g? I created user tablespaces manually, and then tried to import but I see strange errors.

    Did you read the metalink note specified above?.
    Please read the same and it has the information.
    Example: export from 7.3.4 and import into 11.1.0
    use the 7.3.4 Export client to export the data from the 7.3.4 source database,
    use the 11.1.0 Import client to import the data into the 11.1.0 target database,
    Note that a migration with export FULL=Y & import FULL=Y is not supported.
    that's what mentioned above. Try show=y option and use fromuser/touser
    HTH
    Anantha

Maybe you are looking for

  • Photo Stream not Working w/ipad2 and iphone4S

    Photostream has been working fine and now I am not getting photos taken with my iphone to transfer to my ipad photstream.

  • IPhone 6 plus apps

    Does anyone know or did they say in the keynote, having a larger can the plus run apps made for iPads and iPhone like iPads can run both iPhone and iPad apps?

  • Logical calculator

    how can i parse and calcualte an expression like " !((a | b) | b & c & !(d) & ((a | !(a) & b)|b) & e) ". a,b,c,d...... is boolean. Sorry for my English. i need your help! Thank you..

  • Lg G2 naivation problem after 5.0.2 update

    I am currently on the road and cannot get any of my navigation programs to work - Maps, Waze both use an approximate location.  In the upper status bar, the location icon bonks and in the notifications it says FInding Location - but never does!  I ne

  • Max 9.2.2 doesn't recongize com ports

    Max 9.2.2 doesn't recongize com ports. Dell Precision 360 Windows XP Two different computes, multiple attempts, downloads of software - same result: com ports don't show up.