Database control using emails

dear DBAs,
do you have an idea if it's possible to control the database by emails.
let's say i want to send an email to start and export or to query a table ... etc.
thx all
Elie

Elie wrote:
do you have an idea if it's possible to control the database by emails.Not that difficult. POP3 (Post Office Protocol) is very easy to implement in PL/SQL using UTL_TCP. That allows PL/SQL code to read an e-mail box. I've posted a very basic example [in this thread|http://forums.oracle.com/forums/thread.jspa?messageID=2018101#2018101] that turns a POP3 account into a SQL "table" that can be SELECT'ed from.
Then you have to add some basic command/instruction language for you to communicate with the database via e-mail.
There are however other issues to consider. Security being a prime issue. How do you safeguard this e-mail feature against abuse? To what extend do you allow e-mails to control the database? Remember, that is it trivial to fake an e-mail to the database that seems to have come from you/the DBA.. Which means having to sign e-mails using a digital certificate - which in turns means a lot more complex PL/SQL code to write... etc.
I would not consider such a feature myself for database management. Effective dba'ing only needs 2 tools - ssh and sqplus. Which means being able to sit in a coffee shop with a netbook, connect to a customer's network (VPN typically) and then using ssh to access the relevant servers to administrate. (Windows? what's that?)

Similar Messages

  • Does a Database Control use Prepared Statements?

    When I add a method to a database control I have to supply the SQL for that method. Under the covers does the database control convert that SQL into a prepared statement? Is this documented anywhere?
    Thanks for the help!
    Rob

    Rob,
    it seems not be documented, but the Database Control always uses a PreparedStatement internally.
    -Kai

  • Unable to setup Database control using emca on linux Please help!

    I have read about a dozen post on this issue and no one gives exactly what they did to solve the problem. Seems like i have an incomplete installation that is screwing me up. I've read of some people removing the SYSMAN schema, people removing certain roles, etc.
    The only thing ive tried:
    emca -deconfig dbcontrol db -repos drop
    emca -config dbcontrol db -repos create
    Can someone please give me the exact steps I must follow in order to have a COMPLETE fresh clean dbconsole?
    [oracle@oracle ~]$ env |grep ORACLE
    ORACLE_UNQNAME=DB11G
    ORACLE_SID=DB11G
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOSTNAME=oracle.localdomain
    ORACLE_TERM=xterm
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
    [oracle@oracle ~]$ emca -config dbcontrol db -repos create
    STARTED EMCA at Jan 5, 2011 12:24:55 AM
    EM Configuration Assistant, Version 11.2.0.0.2 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Enter the following information:
    Database SID: DB11G
    Listener port number: 1521
    Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db_1 ]:
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    You have specified the following settings
    Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
    Local hostname ................ oracle.localdomain
    Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
    Listener port number ................ 1521
    Database SID ................ DB11G
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............
    Do you wish to continue? [yes(Y)/no(N)]: y
    Jan 5, 2011 12:25:26 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_00_24_54.log.
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error creating the repository
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_repos_create_<date>.log for more details.
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error creating the repository
    Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_00_24_54.log for more details.
    Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_00_24_54.log for more details.
    #LOG FOR WHEN I TRY TO CREATE IT
    INFO: Creating the EM repository (this may take a while) ...
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig createRepository
    CONFIG: ORA-20001: SYSMAN already exists..
    ORA-06512: at line 17
    oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already exists..
    ORA-06512: at line 17
    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)
    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:1000)
    at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:339)
    at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:380)
    at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:510)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:228)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error creating the repository
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_repos_create_<date>.log for more details.
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error creating the repository
    Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_00_24_54.log for more details.
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error creating the repository
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:240)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
    Jan 5, 2011 12:25:28 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/db_1/oui
    # LOG FOR WHEN I TRY TO DROP THE REPO
    CONFIG: Enter SYS user's password :
    Getting temporary tablespace from database...
    Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DB11G.WORLD))): ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: stty: standard input: Invalid argument
    stty: standard input: Invalid argument
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
    WARNING: Error executing /u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DB11G.WORLD))) -repos_user SYSMAN -action drop -verbose -output_file /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_repos_drop_2011_01_05_00_38_08.log
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error dropping the repository
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_repos_drop_<date>.log for more details.
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error dropping the repository
    Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_00_37_37.log for more details.
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error dropping the repository
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:218)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
    Jan 5, 2011 12:38:09 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/db_1/oui

    hahaha, i counted my chickens before they hatched..
    Creating the web bit is failing
    [oracle@oracle bin]$ emca -config dbcontrol db
    #LOG
    Connecting to database using connect string (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DB11G.WORLD))) in home /u01/app/oracle/product/11.2.0/db_1 with user "SYS" role "SYSDBA".
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Couldn't connect to the db - ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin) at /u01/app/oracle/product/11.2.0/db_1/sysman/admin/scripts/emca/emcaDbUtil.pl line 106, <STDIN> line 2.
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Error executing /u01/app/oracle/product/11.2.0/db_1/sysman/admin/scripts/emca/emcaDbUtil /u01/app/oracle/product/11.2.0/db_1/perl/lib:/u01/app/oracle/product/11.2.0/db_1/perl/lib/site_perl:/u01/app/oracle/product/11.2.0/db_1/sysman/admin/scripts:/u01/app/oracle/product/11.2.0/db_1/bin: /u01/app/oracle/product/11.2.0/db_1/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/sysman/admin/scripts/emca/emcaDbUtil.pl /u01/app/oracle/product/11.2.0/db_1 (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DB11G.WORLD))) SYS SYSDBA declare repos_pwd varchar2(30); view_user varchar2(30); view_user_pwd varchar2(30); view_user_acc_status varchar2(30); begin repos_pwd := ?; sysman.mgmt_view_priv.get_view_user(view_user); select account_status into view_user_acc_status from sys.dba_users where upper(username) = upper ( view_user ); IF view_user_acc_status like '%LOCKED%' THEN execute immediate 'alter user ' || view_user || ' account unlock'; END IF; IF view_user_acc_status like '%EXPIRED%' THEN sysman.mgmt_view_priv.set_view_user_creds ( repos_pwd ); sysman.mgmt_view_priv.GET_VIEW_USER_CREDS ( view_user, view_user_pwd ); execute immediate 'alter user ' || view_user || ' identified by ' || view_user_pwd || ''; END IF; end; DB11G 1 SYSMAN_PWD
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.EMReposConfig unlockMGMTAccount
    CONFIG: Failed to unlock mgmt_view account
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Failed to unlock all EM-related accounts
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Failed to unlock all EM-related accounts
    Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2011_01_05_03_42_35.log for more details.
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Failed to unlock all EM-related accounts
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:348)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
    Jan 5, 2011 3:43:23 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/db_1/oui
    I honestly have no bloody clue why its saying invalid user/pass.. all sys accounts are working fine..what am I missing here.
    [oracle@oracle ~]$ sqlplus sysman
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 5 03:52:40 2011
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>

  • Database control hangs in Workshop Tutorial !!!

    Hi,
    I am using WLS 7.0.1.0/SP1 ( latest version ) with Workshop included, on Windows
    XP Prof. In Workshop Tutorial, Step 3, the test hangs at the execution of
    Applicant dbApplicant = bankruptciesDB.checkForBankruptcies(taxID);
    I am asking if it is a known problem? There may be several reasons for this and
    it is too expensive to investigate all of them:
    1. Tutorial text misses a fragment describing special configuration for the Database
    control
    2. Tutorial is correct but default ( installation ) configuration of Database
    control has bug(s)
    3. A helper class, implementing BankruptciesDatabaseControl interface, is missed.
    4. Implementation of Database control is buggy. What the magic happens when I
    “SELECT TAXID, FIRSTNAME, LASTNAME, CURRENTLYBANKRUPT FROM BANKRUPTCIES WHERE
    TAXID={taxID}”, i.e. only a sub-set of “Applicant” attributes in the query, and
    how Database control ( using my interface method public Investigate.Applicant
    checkForBankruptcies(String taxID) ) knows which database table field to map to
    which Applicant” attribute ? [I suppose, creation of “Applicant” class is independent
    from the database schema, isn’t it ?]
    Thank you,
    - Michael

    Sure, I will send you the dump. Please, provide me with your e-mail.
    As of column names, don’t you find it error-prone approach where a developer has
    to “find” the names and type them into the code ? Since you are already deal with
    a db adapter/controller, I suggest, the adapter has to read a db schema, gets
    the column names and data types. In other words, I would expect in this case the
    same functionality as provided by, e.g., TogetherSoft’s Control Center. It creates
    Entity Beans out of the db schema and only then allows you to manipulate them.
    Thank you and wait for your e-mail.
    - Michael
    "Anurag Pareek" <[email protected]> wrote:
    Michael,
    The names of the elements in the 'Applicant' class should match one-on-one
    with the database column names in the corresponding table.
    I guess you are using the default Pointbase database. Can you check whether
    you were able to create successful connections to the Pointbase database
    during server startup?
    If the server is hanging at the statement you have mentioned, can you
    take a
    thread dump by using Ctrl->Break and email it to me.
    Thanks,
    Anurag
    "Michael Poulin" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I am using WLS 7.0.1.0/SP1 ( latest version ) with Workshop included,on
    Windows
    XP Prof. In Workshop Tutorial, Step 3, the test hangs at the executionof
    Applicant dbApplicant = bankruptciesDB.checkForBankruptcies(taxID);
    I am asking if it is a known problem? There may be several reasonsfor
    this and
    it is too expensive to investigate all of them:
    1. Tutorial text misses a fragment describing special configurationfor
    the Database
    control
    2. Tutorial is correct but default ( installation ) configuration ofDatabase
    control has bug(s)
    3. A helper class, implementing BankruptciesDatabaseControl interface,is
    missed.
    4. Implementation of Database control is buggy. What the magic happenswhen I
    "SELECT TAXID, FIRSTNAME, LASTNAME, CURRENTLYBANKRUPT FROM BANKRUPTCIESWHERE
    TAXID={taxID}", i.e. only a sub-set of "Applicant" attributes in thequery, and
    how Database control ( using my interface method publicInvestigate.Applicant
    checkForBankruptcies(String taxID) ) knows which database table fieldto
    map to
    which Applicant" attribute ? [I suppose, creation of "Applicant" class
    is>independent>> from the database schema, isn't it ?
    Thank you,
    - Michael

  • Add second instance to Enterprise Manager 10g database control

    Hi,
    I have a server with one Oracle 10g database instance, and I
    configured the local Enterprise Manager database control for it.
    Now I added a second instance on the server, using the same Oracle
    home. Can I manage this new instance using the existing database
    control or do I have to configure a second database control using
    another port? The documentation isn't too clear on this.
    Thanks,
    Matthias

    You can't manage the two database using database control. you have to go for Grid control only if you need to configure two or more instance.

  • Oracle database control not working

    hi,
    I have configure database control using below command on oracle 11g database , but unable to start database control.
    emca -config dbcontrol db -repos create
    -bash-3.2$ emctl status dbconsole
    OC4J Configuration issue. /db0/app/oracle/product/11.2.0.3/db_1/oc4j/j2ee/OC4J_DBConsole_zainbi.zainiq.com_DB11G not found.
    tail -100 /db0/app/oracle/cfgtoollogs/emca/db11g/emca_2012_09_27_14_23_37.log
    Sep 27, 2012 2:41:32 PM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
    CONFIG: Value for env var 'LANG' is 'null', discarding the same
    Sep 27, 2012 2:41:32 PM oracle.sysman.emcp.util.PlatformInterface getEnvProps
    CONFIG: Returning env array from cache
    Sep 27, 2012 2:41:32 PM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray
    CONFIG: New Env List: [CLASSPATH=/db0/app/oracle/product/11.2.0.3/db_1/jlib/emca.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvm.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvmasm.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/cvu.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/emConfigInstall.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/ldapjclnt11.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/ldap.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/share.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvmhas.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/netcfg.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/http_client.jar:/db0/app/oracle/product/11.2.0.3/db_1/lib/http_client.jar:/db0/app/oracle/product/11.2.0.3/db_1/lib/xmlparserv2.jar:/db0/app/oracle/product/11.2.0.3/db_1/assistants/jlib/assistantsCommon.jar:/db0/app/oracle/product/11.2.0.3/db_1/sysman/jlib/emCORE.jar:/db0/app/oracle/product/11.2.0.3/db_1/sysman/jlib/emagentSDK.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraInstaller.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraPrereq.jar:/db0/app/oracle/product/11.2.0.3/db_1/inventory/prereqs/oui/OraPrereqChecks.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraPrereqChecks.jar:, DYLD_LIBRARY_PATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, HOME=/export/home/oracle, LC_COLLATE=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1, LC_MESSAGES=C, LC_MONETARY=en_US.ISO8859-1, LC_NUMERIC=en_US.ISO8859-1, LC_TIME=en_US.ISO8859-1, LD_LIBRARY_PATH=/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/lib/sparcv9/server:/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/lib/sparcv9:/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/../lib/sparcv9:/db0/app/oracle/product/11.2.0.3/db_1/lib:/db0/app/oracle/product/11.2.0.3/db_1/perl/lib:/db0/app/oracle/product/11.2.0.3/db_1/network/lib:, LIBPATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, LOGNAME=oracle, MAIL=/usr/mail/oracle, NEED_EXIT_CODE=1, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, OLDPWD=/db0/app/oracle/product/11.2.0.3/db_1, ORACLE_BASE=/db0/app/oracle, ORACLE_HOME=/db0/app/oracle/product/11.2.0.3/db_1, ORACLE_HOSTNAME=zainbi.zainiq.com, ORACLE_SID=db11g, ORACLE_UNQNAME=db11g, PATH=/db0/app/oracle/product/11.2.0.3/db_1/bin:/usr/bin:/bin, PWD=/db0/app/oracle/product/11.2.0.3/db_1/oc4j/j2ee, SHELL=/bin/bash, SHLIB_PATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, SHLVL=1, SSH_CLIENT=10.50.32.99 53969 22, SSH_CONNECTION=10.50.32.99 53969 10.50.7.70 22, SSH_TTY=/dev/pts/22, TERM=xterm, TMP=/tmp, TMPDIR=/tmp, TZ=Asia/Baghdad, USER=oracle, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, _=/db0/app/oracle/product/11.2.0.3/db_1/bin/emca]
    Sep 27, 2012 2:41:32 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Starting execution: /db0/app/oracle/product/11.2.0.3/db_1/bin/emctl start dbconsole
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Exit value of 0
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Execution of /db0/app/oracle/product/11.2.0.3/db_1/bin/emctl start dbconsole  completed successfully
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
    Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
    https://zainbi.zainiq.com:1158/em/console/aboutApplication
    Starting Oracle Enterprise Manager 11g Database Control ....... started.
    Logs are generated in directory /db0/app/oracle/product/11.2.0.3/db_1/zainbi.zainiq.com_db11g/sysman/log
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: Database Control started successfully
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface isPre112Home
    CONFIG: oracleHome: /db0/app/oracle/product/11.2.0.3/db_1 isPre112Home: false
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig addUrl
    CONFIG: Updating file /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt ...
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.FileUtil _copyFile
    CONFIG: Copying file /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt to /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt.emca.util.tmp
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.FileUtil backupFile
    CONFIG: The original file /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt has been copied to /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt.emca.util.tmp
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig addUrl
    CONFIG: Writing the selected url to readme.txt
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig addUrl
    CONFIG: Removing existing entries from readme.txt Enterprise Manager Database Control URL - (db11g) :
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.FileUtil _copyFile
    CONFIG: Copying file /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt.emca.util.tmp to /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig addUrl
    CONFIG: File /db0/app/oracle/product/11.2.0.3/db_1/install/readme.txt is successfully updated
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface isPre112Home
    CONFIG: oracleHome: /db0/app/oracle/product/11.2.0.3/db_1 isPre112Home: false
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: >>>>>>>>>>> The Database Control URL is https://zainbi.zainiq.com:1158/em <<<<<<<<<<<
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.DBControlUtil prepareEmkeyCmdList
    CONFIG: Value of EMKEY_LOCATION : null/emkey.ora
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
    CONFIG: Value for env var 'DISPLAY' is 'null', discarding the same
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
    CONFIG: Value for env var 'NLS_LANG' is 'null', discarding the same
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
    CONFIG: Value for env var 'LANG' is 'null', discarding the same
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface getEnvProps
    CONFIG: Returning env array from cache
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray
    CONFIG: New Env List: [CLASSPATH=/db0/app/oracle/product/11.2.0.3/db_1/jlib/emca.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvm.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvmasm.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/cvu.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/emConfigInstall.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/ldapjclnt11.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/ldap.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/share.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/srvmhas.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/netcfg.jar:/db0/app/oracle/product/11.2.0.3/db_1/jlib/http_client.jar:/db0/app/oracle/product/11.2.0.3/db_1/lib/http_client.jar:/db0/app/oracle/product/11.2.0.3/db_1/lib/xmlparserv2.jar:/db0/app/oracle/product/11.2.0.3/db_1/assistants/jlib/assistantsCommon.jar:/db0/app/oracle/product/11.2.0.3/db_1/sysman/jlib/emCORE.jar:/db0/app/oracle/product/11.2.0.3/db_1/sysman/jlib/emagentSDK.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraInstaller.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraPrereq.jar:/db0/app/oracle/product/11.2.0.3/db_1/inventory/prereqs/oui/OraPrereqChecks.jar:/db0/app/oracle/product/11.2.0.3/db_1/oui/jlib/OraPrereqChecks.jar:, DYLD_LIBRARY_PATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, HOME=/export/home/oracle, LC_COLLATE=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1, LC_MESSAGES=C, LC_MONETARY=en_US.ISO8859-1, LC_NUMERIC=en_US.ISO8859-1, LC_TIME=en_US.ISO8859-1, LD_LIBRARY_PATH=/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/lib/sparcv9/server:/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/lib/sparcv9:/db0/app/oracle/product/11.2.0.3/db_1/jdk/jre/../lib/sparcv9:/db0/app/oracle/product/11.2.0.3/db_1/lib:/db0/app/oracle/product/11.2.0.3/db_1/perl/lib:/db0/app/oracle/product/11.2.0.3/db_1/network/lib:, LIBPATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, LOGNAME=oracle, MAIL=/usr/mail/oracle, NEED_EXIT_CODE=1, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, OLDPWD=/db0/app/oracle/product/11.2.0.3/db_1, ORACLE_BASE=/db0/app/oracle, ORACLE_HOME=/db0/app/oracle/product/11.2.0.3/db_1, ORACLE_HOSTNAME=zainbi.zainiq.com, ORACLE_SID=db11g, ORACLE_UNQNAME=db11g, PATH=/db0/app/oracle/product/11.2.0.3/db_1/bin:/usr/bin:/bin, PWD=/db0/app/oracle/product/11.2.0.3/db_1/oc4j/j2ee, SHELL=/bin/bash, SHLIB_PATH=/db0/app/oracle/product/11.2.0.3/db_1/lib:, SHLVL=1, SSH_CLIENT=10.50.32.99 53969 22, SSH_CONNECTION=10.50.32.99 53969 10.50.7.70 22, SSH_TTY=/dev/pts/22, TERM=xterm, TMP=/tmp, TMPDIR=/tmp, TZ=Asia/Baghdad, USER=oracle, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, _=/db0/app/oracle/product/11.2.0.3/db_1/bin/emca]
    Sep 27, 2012 2:42:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Starting execution: /db0/app/oracle/product/11.2.0.3/db_1/bin/emctl config emkey -remove_from_repos
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Exit value of 0
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Execution of /db0/app/oracle/product/11.2.0.3/db_1/bin/emctl config emkey -remove_from_repos  completed successfully
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
    Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
    Please enter repository password:
    The Em Key has been removed from the Management Repository.
    Make a backup copy of OH/sysman/config/emkey.ora file and store it on another machine.
    WARNING: Encrypted data in Enterprise Manager will become unusable if the emkey.ora file is lost or corrupted.
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: stty: : No such device or address
    stty: : No such device or address
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.DBControlUtil secureEmkey
    CONFIG: Succesfully removed Em Key from Management Repository.
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.EMDBPostConfig invoke
    WARNING:
    ************************  WARNING  ************************
    Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /db0/app/oracle/product/11.2.0.3/db_1/zainbi.zainiq.com_db11g/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
    Sep 27, 2012 2:42:13 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to /db0/app/oracle/product/11.2.0.3/db_1/oui
    Edited by: user12137804 on Sep 27, 2012 5:17 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    hi,
    Thanks for your reply, when i try to connect db control from my browser using link https://zainbi.zainiq.com:1158/em it will show me below message
    can't establish a connection to the server at zainbi.zainiq.com:1158.
    When i check the status: emctl status dbconsole
    EM Configuration issue. /db0/app/oracle/product/11.2.0.3/db_1/zainbi.zainiq.com_DB11G not found.
    when i check the path i found the last folder with sid name in lower case /db0/app/oracle/product/11.2.0.3/db_1/zainbi.zainiq.com_db11g.
    I have rename the directory with /db0/app/oracle/product/11.2.0.3/db_1/zainbi.zainiq.com_DB11G.
    Then i execute emctl status dbconsole command it show running state and i have successfully connected to my enterpirse manager.
    So moral of the story is : use the same case for database sid in tnsname and database installation other wise face problem in configuring oracle enterprise manager repository.
    Thanks
    Zeeshan
    Businness Analytics Islamabad
    Edited by: user12137804 on Sep 28, 2012 3:57 AM

  • Problem receiving email using database control

    Hi all,
    I'm new to using EM and trying to configure it so I can receive email notifications when tablespace is getting full. I'm only using "Database Control" not Grid control.
    Oracle Enterprise Manager Database Control     10.2.0.0     
    I was able to successfully receive email using "Test Mail Servers" in Notification Methods.
    I already defined my rule and was able to specify "Tablespace Used %" metrics.
    I already defined a schedule so that mails are sent to my email.
    To test, i created records on one table until it's 100%.
    I do get alerts with EM Database Control but no mail.
    I logged in as sysman into the database being monitored (there is no repository because this is database control), I don't see any rows in mgmg_notification_log.
    Does anybody know if email notification only works in "Grid Control" not "Database Control"?
    I'd appreciate any assistance.

    Grid Control has hundreds of email alerts already setup that you can use , but I pretty sure you need to buy
    that pack for email alerts to keep them in service after you evaluate.

  • Error using RMAN thru Database Control

    Hello guys..
    I installed Oracle 10gR2 on solaris 10, and created a sample DB called HEAT. This database is configured to run in Archivelog mode and also created Flash_recovery_area.
    Iam trying to take a simple backup thru RMAN using OEM ( Database Control). there is only 1 database on that server and i plan to use controlfile instead of recovery catalog.
    Now here are the steps when i execute, i get an ERROR.
    1. connected as 'sys' from Database Control.
    2. Went to Maintenence Tab, click in Backup settings.
    3. click on Device Tab, enter OS credentials and click on "Test disk backup"..
    4. I get an error that says "Disk Backup Test Failed!"
    When click on View Error Details :
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Recovery Manager: Release 10.2.0.1.0 - Production on Fri Feb 2 12:53:29 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN>
    connected to target database (not started)
    RMAN>
    echo set on
    RMAN> run {
    2> allocate channel oem_disk_backup device type disk;
    3> backup as BACKUPSET current controlfile tag '02022007125328';
    4> restore controlfile validate from tag '02022007125328';
    5> release channel oem_disk_backup;
    6> }
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of allocate command at 02/02/2007 12:53:30
    RMAN-06403: could not obtain a fully authorized session
    ORA-01034: ORACLE not available
    RMAN> allocate channel for maintenance type disk;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of allocate command at 02/02/2007 12:53:30
    RMAN-06403: could not obtain a fully authorized session
    ORA-01034: ORACLE not available
    RMAN> delete noprompt backuppiece tag '02022007125328';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 02/02/2007 12:53:30
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06403: could not obtain a fully authorized session
    ORA-01034: ORACLE not available
    RMAN> exit;
    Recovery Manager complete.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    I only have 1 database , and it is configured to backup using Control file and not Recovery catalog ( which is the default)...
    What additional steps do i have to do, to take a simple backup using database control ? I am not sure why it says Database not available...while DB is indeed available and open.
    any help is appreciated..
    thanks

    I, too, am receiving these same errors when I do my backups. The sysadmin took the systems down over the weekend and the backup has failed ever since. Database is up, ORACLE_SID looks fine, what could be wrong? This nightly backup worked before system went down. I can connect as sysdba using the ORACLE_SID as set.
    Thanks,
    Candy

  • How to Schedule Job using Database Control for SQLPLUS script?

    Hi All,
    I am using Database version 10.2. I would like to schedule a SQLPLUS script job using Database control (Not using Grid Control!). The following is the script.
    ========================================================
    define OEM_FRIENDLY=1
    define OWB_BACKGROUND=0
    set serveroutput on
    set verify off
    whenever sqlerror exit failure;
    define REPOS_OWNER='&1.'
    define LOCATION_NAME='&2.'
    define TASK_TYPE='&3.'
    define TASK_NAME='&4.'
    define SYSTEM_PARAMS='&5.'
    define CUSTOM_PARAMS='&6.'
    alter session set current_schema = &REPOS_OWNER.;
    set role owb_d_&REPOS_OWNER., owb_o_&REPOS_OWNER.;
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := wb_rt_api_exec.run_task('&LOCATION_NAME.',
    '&TASK_TYPE.',
    '&TASK_NAME.',
    '&CUSTOM_PARAMS.',
    '&SYSTEM_PARAMS.',
    &OEM_FRIENDLY.,
    &OWB_BACKGROUND.);
    end;
    exit :exec_return_code;
    ===========================================================
    Is it possible to schedule SQLPLUS script with 6 different parameters? If yes then how can I schedule for monday to friday or only for Saturday and sundays.
    Please provide brief steps.
    Thanks for your help in advance.
    - Mehul

    Let me explain to you about scheduler.
    You can schedule a pl/sql stored procedure TEST_S as follows...
    Begin
    dbms_scheduler.create_job(
    job_name=>'MY_JOB',
    Job_Type=>'STORED_PROCEDURE',
    job_action=>'TEST_S',
    start_date=>sysdate,
    repeat_interval=>'freq=monthly;BYDAY=MON,TUE,WED,THU,FRI',
    end_date=>null');
    END;
    You can also also execute o/s script like .bat or .sh. For this job type should be EXECUTABLE.
    Example of converting a .sql script in .bat script...
    insert.sql
    insert into dept values(50,'IT','LONDON');
    exit
    insert.bat
    sqlplus scott/tiger @insert.sql
    Executing now...
    C:\Documents and Settings>insert.bat
    C:\Documents and Settings>sqlplus scott/tiger @insert.sql
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 1 08:01:00 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    1 row created.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - P
    oduction
    With the Partitioning, OLAP and Data Mining options
    C:\Documents and Settings>
    So first read about DBMS_SCHEDULER and do the work in prompt. Then you can go and schedule it even by database control.
    Scheduling by database control...
    http://www.oracle.com/technology/oramag/oracle/04-jul/o44tech_dba.html
    Scheduler
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHEHDHA
    PS: By default each job you created is disable state. Please enable it by enable procedure of DBMS_SCHEDULER package.

  • Using "in" clause in the query in Database control

    Hi,
    I have a database control and need to fire an update query to update a set of rows based on a list of values as input
    Like below
    update tablename
    set column1="value1"
    where column2 in (.......)
    I need to pass a list of values for this query where column2 is a NUMBER field in Oracle DB.
    can anyone help me how to go about passing this list of values?
    Help is appreciated.
    Thanks

    You may build the comma-separated list in Java and use " {sql: ...} " in your query: http://e-docs.bea.com/workshop/docs81/doc/en/workshop/java-class/com/bea/control/DatabaseControl.html (sorry, I can't find the documentation for WLI 9.2).

  • Remote access database using EM Database Control Console

    When I install the Oracle database 10g, it gives me two choices:
    1)Using Grid Control for Database Management and
    2)Using Database Control for Database Management.
    When I select the #2, according to the Guide, I'll be able to manage my database locally. (Assume the database server's IP address is: DB_IP_Address, then I can use: http://DB_IP_Address:5560/em). But wait a minute___
    a)What does this "locally" mean? If the Oracle DB is installed in a remote location, and there is no LAN connection to it, can I still access it via the Oracle Enterprise Manager (Database Control Console)? (i.e., via the HTTP protocol)
    b)The same question is asked for the iSQL*Plus in regarding to the remote access. I guess the answer to a) above will automatically answer the b) ? (Actually I doubt that I can access remote database using the iSQL*Plus via HTTP protocol).
    Thanks
    Scott

    Hi,
    and there is no LAN connection to itWell you'll need some network link in order to connect successfully.
    What is meant by locally is that you can only manage databases installed on the local computer.
    For example if you installed it on machine "CPTR1", and on another machine "CPTR2", then you can't use http://cptr1:5560/em to manage the databases on "CPTR2. And vice versa.
    About iSQL*Plus, in fact, as far as the tns alias is ok from "CPTR1", you can connect to the databases on "CPTR2", "CPTR3", ....
    HTH,
    Yoann.

  • Problem mapping to XMLBean using database control

    Hi
    I have to generate an XML document based on the values returned from the database. I have an industry standard XSD with me and Im trying to use the database control to automatically map the resultset data to the XMLBean. While doing so, it works fine for flat structures that doesnt contain any complex types and attributes. But, when the XSD contains attributes or nested complex types it creates XMLBean with a flat structure and generates an invalid XML document. All the attributes get mapped to elements and thus when i try to validate, it fails.
    I would appreciate if anyone can let me know if this is a limitation in weblogic 8.1 or do i need to configure something. This problem has been bugging me for a very long time and i have posted in all forums and i strongly feel that there is no point checking for everyfield value and setting into XMLBean manually. Also the number of fields in our XSD is 400. So any help would be greatly appreciated.
    Thanks
    Kishore

    Hi Kishore,
    This is vinod.I have same problem but not too complicated as yours.It is written u got simple values from database using flat structures.could u please post the code for me.
    We have this requirement:
    We have to retrieve the each row from the database and display in form of a tree.how do we get it.
    Thanx in advance.
    Vinodh

  • Installing Enterprise Manager 10g Grid Control Using an Existing Database

    I want to install Enterprise Manager 10g Grid Control 10.2.0.3 using an existing database. This database is RAC 10.2.0.2. and I use it as Infrastructure Metadata Repository.
    I is said in Oracle documentation that SYSMAN schema has to be dropped, thus Database console repository has to be dropped. As far as I understand after Grid Control installation I will not be able to use Database console for my RAC 10.2.0.2 Infrastructure Metadata Repository database. I will be able to use only Grid Control for this database.
    Am I right? Could you give me any advice about Installing Enterprise Manager 10g Grid Control Using an Existing Database?
    Thank you.

    I am trying to install the OEM rel 2.0 on AIX 5L from the downloaded software zip files which are as below,
    AIX_Grid_Control_full_10201_disk1.zip (656,766,406 bytes) (cksum - 2157028496)
    AIX_Grid_Control_full_10201_disk2.zip (655,758,726 bytes) (cksum - 2350778444)
    AIX_Grid_Control_full_10201_disk3.zip (641,760,716 bytes) (cksum - 2053607771)
    AIX_Grid_Control_full_10201_disk4.zip (606,903,411 bytes) (cksum - 4162514797)
    AIX_Grid_Control_full_10201_disk5.zip (576,555,758 bytes) (cksum - 3304661461)
    AIX_Grid_Control_full_10201_disk6.zip (459,658,650 bytes) (cksum - 3120478203)
    AIX_Grid_Control_full_10201_disk7.zip (311,903,435 bytes) (cksum - 2438252536)
    AIX_Grid_Control_full_10201_disk8.zip (224,594,251 bytes) (cksum - 2618845234)
    I am unable to locate the runInstaller in any of the disks 1- 8 ,can somebody help me on this. Thanks

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

  • Woes wiring up an ejb to use a database control

    first my question & then background:
    how do i wire up an ejb to use a database control jcx object so that the dbcontrol is instantiated at runtime?
    here's the scene:
    i created a java page flow from a database control & this works correctly, but i also need to be able to expose some of the functionality to another deployed application. this application, incidentally is not a workshop application; but rather is a hand-coded war.
    the first application (a workshop app) renders forms that use a database control to persist the data. it only uses one table & therefore, there is only one pojo. as i mentioned, this resides in web project & works correctly. i abstracted my dbcontrol & my pojo to a separate java controls project & built this as a library. the jpf still has no problems seeing the dbcontrol.
    there is a second application (a non workshop app) that needs to be able to use a method provided by the dbcontrol. i created an ejb in a third project in the first application that makes the call to dbcontrol in the exact same way that the jpf did. but i am finding, however, that the dbcontrol is null whenever the ejb makes the call to it's method.
    here's the more detailed design:
    i started with a database control. i mapped to my datasource, wrote out the sql for the methods i wanted & generated the pageflow from this. i rewrote the pageflow/jsps to suit my needs & everything just works. i did notice at the time that i generated the page flow that the dbcontrol was never instantiated. here is a snippet of the jpf:
    <pre>
    public class SiteAlertMessageManagementController extends PageFlowController {
    * This is the control used to generate this pageflow
    * @common:control
    private SiteAlertMessageDBControl dbControl;
    public Forward getCurrentMessage() {  
    SiteAlertMessage currentMessage = dbControl.getCurrentMessage();
    </pre>
    because SiteAlertMessageDBControl is an interface, i assumed that the '@common:control' annotation told weblogic what it needed to know in order to instantiate a runtime class of time SiteAlertMessageDBControl. because it just worked, i never questioned this.
    with the form read/write functionality complete, i assumed i could quickly wrap an ejb around the dbcontrol method & be done with it. i soon realized that i could not create an ejb inside a web project & that an ejb project would not have classpath visibility to my dbcontrol & pojo, so i put the dbcontrol & the pojo into a java control project & made a library out of this. i double checked that the web project could see the classes in the library & they could.
    so i created a separate ejb project that also could now see the classes in the library. i thought i was in the home stretch. i now have these projects in my first application:
    administrationControls, administrationWeb, & administrationEjb. i moved the administrationControls.jar & the administrationEjb.jar over to the WEB-INF/lib directory of my (remember: non-workshop) war & wired up the code to pull the bean off jndi tree to make the rmi call. but it didn't work. so i backtracked & created a new jsp back in my workshop project that would make the same rmi call so that i could use the debugger. with this as the background, here is my specific problem.
    what i noticed is that the ejb code itself works correctly. i guess i should show it as well.
    <pre>
    public class SiteAlertMessagesAPI extends GenericSessionBean implements SessionBean {
    * This is the control used to generate this pageflow
    * @common:control
    private SiteAlertMessageDBControl dbControl;
    public void ejbCreate() {
    // Your code here
    * @ejbgen:remote-method
    public SiteAlertMessage getCurrentMessage() throws Exception {
    SiteAlertMessage message = null;
    try {
    // dbControl is null here
    message = dbControl.getCurrentMessage();
    catch (Exception e) {
    e.printStackTrace();
    return message;
    </pre>
    the problem is that my dbControl object is null. what i did was cut & paste the code from the jpf over to my bean. like i stated earlier, i assumed that the annotation would tell weblogic to instantiate an instance. this was obviously not the case. incidentally, i rewrote my ejbCreate() method like this:
    <pre>
    public void ejbCreate() {
    // Your code here
    dbControl = new SiteAlertMessageDBControl();
    </pre>
    but workshop gives me a "error: this type is abstract and thus cannot be instantiated" warning.
    my question is: how do i wire up an ejb to use a database control jcx object so that the dbcontrol is instantiated at runtime?
    any light you could shed on this would be most appreciated. thanks,
    doug

    Hi,
    unfortunatly, it's not possible to use a control outside a control or a
    web service...
    Emmanuel
    douglas thomas a ?crit :
    first my question & then background:
    how do i wire up an ejb to use a database control jcx object so that the dbcontrol is instantiated at runtime?
    here's the scene:
    i created a java page flow from a database control & this works correctly, but i also need to be able to expose some of the functionality to another deployed application. this application, incidentally is not a workshop application; but rather is a hand-coded war.
    the first application (a workshop app) renders forms that use a database control to persist the data. it only uses one table & therefore, there is only one pojo. as i mentioned, this resides in web project & works correctly. i abstracted my dbcontrol & my pojo to a separate java controls project & built this as a library. the jpf still has no problems seeing the dbcontrol.
    there is a second application (a non workshop app) that needs to be able to use a method provided by the dbcontrol. i created an ejb in a third project in the first application that makes the call to dbcontrol in the exact same way that the jpf did. but i am finding, however, that the dbcontrol is null whenever the ejb makes the call to it's method.
    here's the more detailed design:
    i started with a database control. i mapped to my datasource, wrote out the sql for the methods i wanted & generated the pageflow from this. i rewrote the pageflow/jsps to suit my needs & everything just works. i did notice at the time that i generated the page flow that the dbcontrol was never instantiated. here is a snippet of the jpf:
    <pre>
    public class SiteAlertMessageManagementController extends PageFlowController {
    * This is the control used to generate this pageflow
    * @common:control
    private SiteAlertMessageDBControl dbControl;
    public Forward getCurrentMessage() {  
    SiteAlertMessage currentMessage = dbControl.getCurrentMessage();
    </pre>
    because SiteAlertMessageDBControl is an interface, i assumed that the '@common:control' annotation told weblogic what it needed to know in order to instantiate a runtime class of time SiteAlertMessageDBControl. because it just worked, i never questioned this.
    with the form read/write functionality complete, i assumed i could quickly wrap an ejb around the dbcontrol method & be done with it. i soon realized that i could not create an ejb inside a web project & that an ejb project would not have classpath visibility to my dbcontrol & pojo, so i put the dbcontrol & the pojo into a java control project & made a library out of this. i double checked that the web project could see the classes in the library & they could.
    so i created a separate ejb project that also could now see the classes in the library. i thought i was in the home stretch. i now have these projects in my first application:
    administrationControls, administrationWeb, & administrationEjb. i moved the administrationControls.jar & the administrationEjb.jar over to the WEB-INF/lib directory of my (remember: non-workshop) war & wired up the code to pull the bean off jndi tree to make the rmi call. but it didn't work. so i backtracked & created a new jsp back in my workshop project that would make the same rmi call so that i could use the debugger. with this as the background, here is my specific problem.
    what i noticed is that the ejb code itself works correctly. i guess i should show it as well.
    <pre>
    public class SiteAlertMessagesAPI extends GenericSessionBean implements SessionBean {
    * This is the control used to generate this pageflow
    * @common:control
    private SiteAlertMessageDBControl dbControl;
    public void ejbCreate() {
    // Your code here
    * @ejbgen:remote-method
    public SiteAlertMessage getCurrentMessage() throws Exception {
    SiteAlertMessage message = null;
    try {
    // dbControl is null here
    message = dbControl.getCurrentMessage();
    catch (Exception e) {
    e.printStackTrace();
    return message;
    </pre>
    the problem is that my dbControl object is null. what i did was cut & paste the code from the jpf over to my bean. like i stated earlier, i assumed that the annotation would tell weblogic to instantiate an instance. this was obviously not the case. incidentally, i rewrote my ejbCreate() method like this:
    <pre>
    public void ejbCreate() {
    // Your code here
    dbControl = new SiteAlertMessageDBControl();
    </pre>
    but workshop gives me a "error: this type is abstract and thus cannot be instantiated" warning.
    my question is: how do i wire up an ejb to use a database control jcx object so that the dbcontrol is instantiated at runtime?
    any light you could shed on this would be most appreciated. thanks,
    doug

Maybe you are looking for

  • CS3 installs but won't run

    Ok - not sure if this goes in this section or not.. but it's a technical question. My b/f bought me a Dell Laptop last week. It has the recommended minimum of everything adobe says it needs for photoshop CS3 (see below for 1721 specs) When I installe

  • Vendor & Customers in FBL3N

    Hi, I want to see Vendor/Customers in FBL3N for Sales/Purchases GL's. I'm able to see the fields in the layout but data is not displaying. is there any special settings required to get the data. I've already seen BSEG table and there KUNNR field is a

  • Problems With iPhone after updating to Software Version 1.0.1

    I recently installed software version 1.0.1 and my iphone has had problems ever since. problems i have noticed is that when you press the lock button it takes about 2 seconds to respond, the same goes for when i try to unlock the phone. I have also n

  • Start up with Mac

    How can I prevent the Palm software from starting up on is own when I  start up my Mac Powerbook G4?   I do not use Palm that often and only want to see it when I want to, not every time I start up. GW Post relates to: Treo 755p (Verizon)

  • Values displayed in report do not match those in underlying data source

    hi -- I have a report based on a view. The view contains a date (never null) and several numeric value columns which can be null. The dates are outer joined to a date table, so even in Feb of 2011, the view will have a month date for every month of t