Database control escaping /* and */

Hi,
I have a requirement where I need to speicfy sql optimizers in my query like example:
select /*+ INDEX(TABLE1 INDEX1) */ COLUMN1, COLUMN2
FROM TABLE1 where someconditions
But I am not able to specify the /*+ and */ in the database control query annotation
How can I escape that sequence in the database control.
I can construct the sql dynamically and pass the entire sql to the database control. But that would be considered as a Statement instead of PreparedStatement which will affect performance.
Can anyone help here how to escape "/*" in database control query annotation.
Thanks

I'm not sure it would work, and can't test here, but you could try to escape the sequence */ with unicode escapes (\uxxxx). See http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.3 .

Similar Messages

  • OEM Database Control and 10g Grid Control

    Can any one tell the difference between OEM Database Control and OEM 10g Grid Control.

    Database Control is the HTTP Management environment and comes installed with the 10g Database. It can be used to manage one database (one target) at a time (standalone). To monitor more than one database, you must create a new console on a different port for each database.
    10g Grid Control is the Enterprise version in that you can monitor different Target from different operationg systems at the same time. These include Application Servers, Listeners, Operation Systems, Non Oracle Database Systems using plugins (from 10gR2).
    So, for someone who was using OEM 9i, there was connection in to Standalone Console (Java) and Oracle Management Server (Java and HTML). In 10g, they are replaced with Database Control (Java and HTML versions) and Grid Control respectively.

  • Question about Note 870814.1 - Backing up EM Database Control Data

    Quick question -- why would you want to downgrade OEMDC after upgrading to 11gR2?
    "After upgrading to Oracle Database 11g release 2(11.2), if you want to downgrade Oracle Enterprise Manager Database Control you must save your Database Control files and data before upgrading your database."

    If you want to keep your current database control configuration after a downgrade you have to save this configuration before downgrading. Otherwise - after the downgrade - you would have a clean configuration. Database control continue to work, but it starts a new incarnation.
    Werner

  • Database Control Install

    I'm running a 10.2 instance on Solaris, and need to install DB Control on a Windows box for management. What install disk/download does it come from? It's been about a year since I setup DB Control. I thought it was on the companion CD, no?

    Here is a good article on the emca command:
    The emca tool that is available in 10.2 Database install uses different options than the emca shipped for 10.1. Below is the output from the help file for the 10.2 emca utility:
    1. Set the $ORACLE_HOME to the 10.2 Database home.
    2. To get a list of options, issue the command: emca -h
    <$ORACLE_HOME>/emca [operation] [mode] [dbType] [flags] [parameters]
    -h | h | -help | help: prints this help message
    -version: prints the version
    -config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [parameters]: configure Database Control for a database
    -config centralAgent (db | asm) [-cluster] [-silent] [parameters]: configure central agent management
    -config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [parameters]: configure both Database Control and central agent management
    -deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [parameters]: de-configure Database Control
    -deconfig centralAgent (db | asm) [-cluster] [ -silent] [parameters]: de-configure central agent management
    -deconfig all db [-repos drop] [-cluster] [-silent] [parameters]: de-configure both Database Control and central agent management
    -addInst (db | asm) [-silent] [parameters]: configure EM for a new RAC instance
    -deleteInst (db | asm) [-silent] [parameters]: de-configure EM for a specified RAC instance
    -reconfig ports [-cluster] [parameters]: explicitly reassign Database Control ports
    -reconfig dbcontrol -cluster [-silent] [parameters]: reconfigures RAC Database Control deployment
    -displayConfig dbcontrol -cluster [-silent] [parameters]: displays information about the RAC Database Control configuration
    -upgrade (db | asm | db_asm) [-cluster] [-silent] [parameters]: upgrades an earlier version of the EM configuration to the current version
    -restore (db | asm | db_asm) [-cluster] [-silent] [parameters]: restores the current version of the EM configuration to an earlier version
    Parameters and Options:
    [parameters]: [ -respFile fileName ] [ -paramName paramValue ]*
    db: perform configuration operation for a database (including databases that use ASM)
    asm: perform configuration operation for an ASM-only instance
    db_asm: perform upgrade/restore operation for a database and an ASM instance
    -repos create: create a new Database Control repository
    -repos drop: drop the current Database Control repository
    -repos recreate: drop the current Database Control repository and recreate a new one
    -cluster: perform configuration operation for a RAC database
    -silent: perform configuration operation without prompting for parameters
    -backup: configure automatic backup for a database
    Parameters for single instance databases
    HOST: Database hostname
    SID: Database SID
    PORT: Listener port number
    ORACLE_HOME: Database ORACLE_HOME
    HOST_USER: Host username for automatic backup
    HOST_USER_PWD: Host user password for automatic backup
    BACKUP_SCHEDULE: Automatic backup schedule (HH:MM)
    EMAIL_ADDRESS: Email address for notifications
    MAIL_SERVER_NAME: Outgoing Mail (SMTP) server for notifications
    ASM_OH: ASM ORACLE_HOME
    ASM_SID: ASM SID
    ASM_PORT: ASM port
    ASM_USER_ROLE: ASM user role
    ASM_USER_NAME: ASM username
    ASM_USER_PWD: ASM user password
    SRC_OH: ORACLE_HOME for the database to be upgraded
    DBSNMP_PWD: Password for DBSNMP user
    SYSMAN_PWD: Password for SYSMAN user
    SYS_PWD: Password for SYS user
    DBCONTROL_HTTP_PORT: Database Control HTTP port
    AGENT_PORT: EM agent port
    RMI_PORT: RMI port for Database Control
    JMS_PORT: JMS port for Database Control
    Additional Parameters for cluster databases
    CLUSTER_NAME: Cluster name
    DB_UNIQUE_NAME: Database unique name
    SERVICE_NAME: Service name
    EM_NODE: Database Control node name
    EM_SID_LIST: Agent SID list [comma separated]

  • How to (what to) download and install OEM database control

    Hello
    Can you please tell me the name of the file I should download (Is it still accessible?). I have download many of the oracle product files but don't have the OEM one burned to a CD.
    I want to reinstall my database as I have changed my domain name and the OracleConsole(orcl)
    I.E.
    L:\app\owner\product\11.2.0\db_1\bin\nmesrvc.exe fails to start.
    My situation is that I am using a single instance of Oracle 11G R2 for self educational training and development.
    I am running on Windows XP SP3.

    Hi,
    To create or recreate a database control you need to execute the following commands:
    Create the DB Control Repository Objects and Configuration Files
    $ <ORACLE_HOME>bin/emca -config dbcontrol db -repos create
    ReCreate the DB Control Repository Objects and Configuration Files
    $ <ORACLE_HOME>bin/emca -config dbcontrol db -repos recreate
    Best Regards,
    Venkat

  • Queries on DATABASE OPEN RESETLOGS and lost Control Files

    Hi I have some queries on RESETLOGS I would be keen to hear some answers on
    Q1. If I am doing a PITR and I end in ALTER DATABASE OPEN RESETLOGS, what happens about any Archived Redo Log files ( still in situ ) that were from the original source database but were at a future point in time ? Are they just ignored by any future restore ( since their log sequence number will be different ? ) and eventually over written or purged out ?
    Q2. When you create a new incarnation using RESETLOGS can you Flashback Database to before this ?
    Q3. If I have lost all my Control Files and have not created a backup control file or done a backup to trace of the control file, can I simply restore one of the actual control files from my last backup and use RECOVER DATABASE USING BACKUP CONTROLFILE AUTO; or will this only work with a bonafide backup control file ( i.e. one created via ALTER DATABASE BACKUP CONTROLFILE TO ‘<file spec>’; )
    Q4. When I issue RECOVER DATABASE USING BACKUP CONTROLFILE AUTO;
    Do I have to ALTER DATABASE OPEN RESETLOGS at the end of the recovery ? I have seen this documented but I am not sure why I would need to reset the redo logs and instead simply open the database ?
    Q5. If I am running the CREATE CONTROL FILE command from an ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
    Do I need to use the NORESETLOGS or RESETLOGS ? How do I know which to use ?
    thanks,
    Jim

    Jimbo wrote:
    Hi I have some queries on RESETLOGS I would be keen to hear some answers on
    Q1. If I am doing a PITR and I end in ALTER DATABASE OPEN RESETLOGS, what happens about any Archived Redo Log files ( still in situ ) that were from the original source database but were at a future point in time ? Are they just ignored by any future restore ( since their log sequence number will be different ? ) and eventually over written or purged out ?
    what happens when you try it?
    Q2. When you create a new incarnation using RESETLOGS can you Flashback Database to before this ?
    what happens when you try it?
    Q3. If I have lost all my Control Files and have not created a backup control file or done a backup to trace of the control file, can I simply restore one of the actual control files from my last backup and use RECOVER DATABASE USING BACKUP CONTROLFILE AUTO; or will this only work with a bonafide backup control file ( i.e. one created via ALTER DATABASE BACKUP CONTROLFILE TO ‘<file spec>’; )
    what happens when you try it?
    Q4. When I issue RECOVER DATABASE USING BACKUP CONTROLFILE AUTO;
    Do I have to ALTER DATABASE OPEN RESETLOGS at the end of the recovery ? I have seen this documented but I am not sure why I would need to reset the redo logs and instead simply open the database ?
    what happens when you try it?
    Q5. If I am running the CREATE CONTROL FILE command from an ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
    Do I need to use the NORESETLOGS or RESETLOGS ? How do I know which to use ?
    what happens when you try it?

  • Can i use "begin" and "end" in a database control

    hi there
    i just want to know if i can use begin and end with several sql update statments in between in a database control. u see, i need to run few update statements together. i don't want to put them in seperate method. i was wondering if i could put them together in on method and run it. is there any other way to do it if begin and end are not allowed. thanks

    I have a J2EE application, for which I have a module which is used by system administrators. this module is completly written in Java swing.
    and it does talk to my EJBs.
    If you don't have a firewall in your application, then you can directly make your applications in awt, swing and applets talk to EJBs. if you do have a firewall, then just write a web-service wrapper over your EJBs and other J2EE components and use them from desktop applications.
    It seems that you want to implement a kind of a applet based monitor application for your J2EE EJBs on the server. Applets cannot directly monitor your EJBs.
    Create a new module which has a service which acts as an event listener on the server. each j2ee component on the server notify it if there is a change to them. this service, can then write the data realted to the modification on a socket which is continiously being read by the applet. So you can implement a kind of a monitor for J2ee apps with applets.
    hope this helps.
    regards,
    Abhishek.
    PS:How did you manage to adore the AWT ;-) ? I found that it sucks (good performance.. very poor lnf) ... java swing sucks too (very poor performance ... avaerage lnf).

  • How to configure Enterprise Manager Database Control (EMDC) to make it work on 2 servers working (primary and standby) under DG rules

    Hello everybody i use Oracle Database EE 11.2.0.4 with DG.
    In those cases i need to get Enterprise Manager Database Control running against DB with no RAC and no DG i perform the following steps:
    I Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
    DECLARE
    CURSOR c1 IS
    SELECT owner, synonym_name name
    FROM dba_synonyms
    WHERE table_owner = 'SYSMAN';
    BEGIN
    FOR r1 IN c1 LOOP
    IF r1.owner = 'PUBLIC' THEN
    EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
    ELSE
    EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
    END IF;
    END LOOP;
    END;
    DROP USER mgmt_view CASCADE;
    DROP ROLE mgmt_user;
    DROP USER sysman CASCADE;
    After that i run
    emca -config dbcontrol db -repos recreate
    But what should i do in cases i have 2 servers working (primary and standby) under DG rules?

    Hi ,
    It is not possible to monitor/administer a Logical or Physical Standby database, i.e Data Guard, using Enterprise Manager Database Control.  This is primarily due to the fact that Database Control is designed to monitor 1 database and a Data Guard environment, by definition, includes more than 1 database.
    If you attempt to run emca against a standby Database, you will get an error like (i.e. ORA-01219: database not open).
    Database Control, can, of course, be used to monitor the current Primary database (with no ability to administer or monitor Data Guard related functionality).  In such a case, when failover occurs Database Control must be reconfigured to run on the new Primary database using the commands detailed in Note 278100.1 How To Drop, Create And Recreate DB Control In A 10g Database, section C. Recreate/ReConfig DB Control, Option 2. Recreate the DB Control Configuration Files and Repository.
    Enterprise Manager Grid Control or Cloud Control provides the functionality for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration.
    Reference: Is it Possible to Configure Database Control for a Logical or Physical Standby Database? (Doc ID 315116.1)
    You can use EM 12c cloud control to monitor and manager Standby DB effectively
    Ref to below link for details
    Set Up and Manage Oracle Data Guard using Oracle Enterprise Manager Cloud Control 12c
    Regards,
    Rahul

  • Image of the Escape and Control key.

    Hey,
    I couldnt find anywhere better to put this :P.
    I recorded a video on 10.5.7 and it shows the ^ key for control, and the escape icon for when I pushed the ESC key.
    Does anyone know where I can find images like this.
    But with Control key and Esc?

    http://www.mrmont.com/teachers/Stencils/MacModifierKeys.png
    or maybe this is good enough

  • Oracle 10G Database Control and Scheduling OWB Process Flow

    Does anyone know how to go about scheduling an OWB Process Flow from
    Oracle 10G Data Base Control. I knew how to do this with Oracle Enterprise Manager 9.2 but we recently upgraded to Oracle Db 10G and the interface has changed significantly.
    Now the interface seems to require a PL/SQL stored procedure to be executed.
    Is there a template procedure that is installed with 10G Data Base Control as there was for 9.2 i.e. oem_exec_template.sql?
    Thanks! Deadline approaching fast...
    Marion

    I've used the oem_exec_template.sql successfully with OWB 10.1 and Oracle 10G Database Control, with a little trial and error at first.
    I'm assuming that your job execution environment is set up correctly, ie. that you can properly execute jobs via the host agent.
    1. Log on to Database Control as SYSTEM, select Jobs from the links at the bottom of the page
    2. In the Results section, Create Job, select "SQL Script" and press Go
    3. In the General section, enter Job Name, and as SQL Script enter e.g.:
    @/u01/app/oracle/owb_oracle_home/owb/rtp/sql/oem_exec_template.sql owb_runtime WF_LOC PROCESS MY_PROCESS , ,
    4. In the Databases section, add your target database
    5. In the Credentials section, I select "Override Preferred Credentials" and use the agent account (oracle on my Linux system) and db user owb_access (OWB Runtime Access user)
    6. Review Schedule tab and submit
    Comments on step 3:
    - the oem_exec_template.sql script must be installed according to the path specified in step 3, on the database host where the OWB Runtime Repository is located
    - owb_runtime is the owner of my OWB Runtime Repository
    - WF_LOC is the name of my Workflow Location as seen in OWB Deployment Manager
    - MY_PROCESS is the name of a deployed Workflow Process
    - the commas indicate that I don't supply any system or custom parameters.
    - step 3 is actually a shell command line that is interpreted by eg. /bin/sh on Unix or cmd on Windows, and must obey proper quoting rules. On windows, I had to specify the empty commas as "\," (including dblquotes)
    Regards, Hans Henrik

  • Database controls and logging

    I'm try to use the @jc:log annotation with my database controls, but I'm not having any luck.
    Has anyone had success using this annotation? If so, can you tell me what I'm doing wrong?
    When I included the @jc:log annotation, Workshop complained that the attribute category was not allowed. Here is what I tried:
    * @jc:connection data-source-jndi-name="cgDataSource"
    * @jc:log category="mycategory"
    public interface MyDbControl
    extends DatabaseControl, ControlExtension
    thanks in advance,
    Erik

    Ron--
    There are some examples of how to do stored procedures with the DatabaseControl here:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    One issue with SPs and ResultSets is that the ResultSets can't be returned to JPFs because of
    limiations in the DatabaseControl lifecycle in 8.1. So, you can process the ResultSets in a web
    service or custom control if you need to return the data to a page flow.
    Hope that helps...
    Eddie
    Ron wrote:
    Hi,
    I am developing database controls that use Sybase stored procedures.
    My stored procedures mostly return result sets.
    How would I specify the use of both a stored procedure and the processing
    of the result sets returned?

  • Need Help with logins for SQLPLUS and Database Control

    Hi,
    I am new to Oracle. I installed "Oracle 10g Standard Version" on Win XP Pro. I have two questions regarding logins:
    (1)     After installing the software I used “dbca” to create a General Purpose database. At the end of the database creation I clicked on the Password Management button and I entered the password for SYS, SYSTEM and SCOTT. Then at the DOS command prompt I typed “SQLPLUS” and I can login as SCOTT and system, but I cannot as login as sysdba or sysoper. I get invalid username/password; logon denied message.
    But I can type “SQLPLUS /NOLOG” and then issue command “connect /as sysdba” and connect successfully as sysdba. Any idea why I cannot login sysdba or sysoper?
    (2)     When I go to windows Start->All Programs->Oracle - OraDb10g_home1 and select “Database Control”. A browser windows open up Database Control page. I cannot start Listener nor Start up a Database Instance. No matter whether I try SYS, SYSDBA, SYSOPER or SCOTT I cannot login. Any idea what is going on here?
    At the SQLPLUS command prompt if I enter “select status from v$instance;” I get status as “OPEN”.
    I am lost in Oracle world as a typical newbie. Many thanks in advance for any advice or pointers.
    Thanks
    Joe

    (1) Yes I can login if I type "sqlplus / as sysdba". Does that mean "sysdba" doesn't have a password?
    (2) when I run "emctl status dbconsole", I get a message saying "Environment variable ORACLE_SID not defined. Please define it." Can someone tell me what should I do?
    Thanks
    Joe

  • Kerberos and Database control don't want to play

    I've got a problem - it's been with Oracle support for over 2 weeks now and have had no reply.
    Our infrastructure is 10.2.0.4 on Solaris. The requirement is having Kerberos enabled authentication for the database and management is via EM Database Control not Grid Control so each Database is managed individually and is self-contained.
    Kerberos was installed and is working fine. You can get a ticket and login OK. What became obvious, however, that by enabling Kerberos, Database Control partially breaks. I know you can't have Kerberos EM accounts setup but that's not what we need to do.The agent just can not connect to the local database. I've done a bit of trouble-shooting and it's pretty obvious what the issue is but sorting it out is a bit of a problem.
    Right, when you enable Kerberos, most of the settings are done in the sqlnet.ora file on the database server. The interesting setting here is the line :-
    SQLNET.AUTHENTICATION_SERVICES= (BEQ,KERBEROS5)
    Correct me if I'm right, but what this basically does is to say that any 'local' connections (eg sqlplus / as sysdba) just go in through the usual database/host group accounts (BEQ) whilst any other connections (sqlnet) go through Kerberos. This is where the problem looks as though it is. The EMAgent insists on using a full descriptor (host, port, sid etc..) and thus loops back through sqlnet and hits the Kerberos authentication brick wall and produces the standard Kerberos error :-
    Thread-8 ERROR vpxoci: ORA-12638: Credential retrieval failed
    vpxoci: Login 0xfdf08 failed, error=ORA-12638: Credential retrieval failed
    TargetManager: Exception in computing dynamic properties of {db1.server1.acme.co.uk, oracle_database },SystemTablespaceNumber::ORA-12638: Credential retrieval failed
    Thread-8 WARN vpxoci: OCI Error -- ErrorCode(12638): ORA-12638: Credential retrieval failed
    The connect descriptor being used by the agent is :-
    LOGIN = dbsnmp/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server1.acme.co.uk)(PORT=1521))(CONNECT_DATA=(SID=DB1)))
    I've briefly edited the emoms.properties file to change the descriptor to IPC based and it still errors just the same. To duplicate this error we just created a normal database account "account1" identified internally and used these descriptors outside EM with sqlplus and it's just the same, so running :-
    sqlplus account1/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server1.acme.co.uk)(PORT=1521))(CONNECT_DATA=(SID=DB1)))
    gives exactly the same credentials error and :-
    # sqlplus account1/password
    connects just fine. BTW, if you edit the original sqlnet.ora file and change (BEQ,KERBEROS5) to (BEQ) or even just remove the line, it all works fine but obviously disables Kerberos which isn't an option.
    If someone has experienced this and knows a patch/fix or which configuration files to hand-edit I'd appreciate it.
    Thks

    user2664528 wrote:
    Our infrastructure is 10.2.0.4 on Solaris. The requirement is having Kerberos enabled authentication for the database and management is via EM Database Control not Grid Control so each Database is managed individually and is self-contained.Sorry that I have no resolution to the larger problem. (I wonder whether a discussion in the Grid Control forum might be useful as the GC folk hide out there ... http://forums.oracle.com/forums/category.jspa?categoryID=70)
    I am curious about the above statement since Grid Control does allow individual 'administrators' to be isolated to specific systems/configurations. That functionality is implemented using EE's Virtual Private Database capability and seems pretty solid to me.
    What goes wrong when you use the isolation capability in Grid Control?

  • 11GR2 : installation without database control and grid

    Hi men,
    i would like to know if it is possible to install 11GR2 database without install Database Control and Grid. It is important because my customer doesn't need to use these products.
    Thx.

    BlueR wrote:
    Hi men,
    i would like to know if it is possible to install 11GR2 database without install Database Control and Grid. It is important because my customer doesn't need to use these products.
    Thx.Your customer thinks he doesn't need a management tool? He may very well not need Grid. Technically, you don't need dbcontrol either. But as much of a command-line bigot as I am, I'd hate to have to go back to scripting everything, and I see no sense in paying good money for a third-party tool to do the same thing I can do with dbcontrol for free. I'd say that as a professional, you owe it to your customer to question him and explain why this might not be "A Good Thing".

  • Corrupt 11g em database control - can I uninstall and then reinstall ?

    Somehow I've got a corrupt 11g enterprise manager database control, on RHEL. At several attempts to fix the problem, thought I would just uninstall and then re-install this component . You could do this in 10g. But I don't see the individual component in the OUI for 11g to uninstall and then re-install. Is this not possible in 11g ?
    Thanks.

    So the question remains :-) In your original post, are you referring to uninstalling and re-installing database control ? or grid control ?
    If database control, pl see MOS Doc 278100.1 (How To Drop, Create And Recreate DB Control In A 10g Database)
    HTH
    Srini

Maybe you are looking for

  • How to prevent an error of [WIP work order ... is locked-]

    Hello experts Can someone tell me how to prevent an error which [The WIP work order associated with this transaction is currently locked and being updated by another user.  Please wait for a few seconds and try again.Transaction processor error]. How

  • Mail server reports invalid login. Retype login and server accepts it. Password Manager selected.

    TBird v 24.5 running on W7 and Avast Free AV (up to date) running. For years TB has been successfully accessing the pop mail account on this PC with Avast, etc... Recently the provider (Centurylink/Embarqmail) made some changes. I double-checked the

  • Is the cover artwork saved by iTunes redundantly?

    Hi, I have tried to search for this particular issue within these forums and on the internet, but I have had difficulty with the phrasing. My question, in a nutshell is this: Does iTunes save cover artwork redundantly within the iTunes folder, separa

  • Headphones keep connecting and disconnecting.

    Hi there. I've got the Sony Xperia Z3 Compact phone, and I have had no problems with it up until this week. My headphones have started disconnecting and connecting themselves. The slightest tap or even moment makes my music stop will listening to it,

  • XY graph probem. Please help!

    I am attaching two vi's and an .mdb access file. The viewhistory.vi fetches data from the .mdb file and plots the graph.(supporting vi -->authentication table read.vi) The problem which i want to correct in the graph plot is that, the points are very