Find Database name through scripts

Hi ALL,
I have a solaris box with 10 Database are running on that.
i am wrirting some scripts on that box to do some activity. So From OS level i am fetching the database name like this.
Ps -ef | grep smon
Now i want to startup all my 10 database to single script.( now database is down).
So in this level how can i fetch the database name in OS level.
Kindly give some ideas....
MAny Thanks
Senthil Kumar

Senthil,
The Oracle provided script dbstart starts all databases in /var/opt/oracle/oratab.
Likewise the Oracle provided script dbshut shuts down all databases mentioned in this file.
Please don't reinvent the wheel.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Finding database name

    How can you find whta database name is currently running.

    If you are currently conected to it as sysdba
    SQL>select name from v$database;
    or
    SQL>show parameter db_name
    Message was edited by:
    DBMS Direct

  • Database creation through script

    10g / OEL
    I would like to create database using script istead of DBCA
    1. Create parameter file pfile
    2. create spfile
    3.create database ...
    4. run catalog.sql.
    what are the other steps to create database using script
    santhanam
    Edited by: santhanam_oradba on May 17, 2010 10:13 AM

    santhanam_oradba wrote:
    10g / OEL
    I would like to create database using script istead of DBCA
    1. Create parameter file pfile
    2. create spfile
    3.create database ...
    4. run catalog.sql.
    what are the other steps to create database using script
    santhanam
    Edited by: santhanam_oradba on May 17, 2010 10:13 AMDo you enjoy self-inflicted pain?
    Use DBCA. Select 'custom database'. Work through the wizard. At the end, select 'create scripts' and DEselect 'create database'. I think when you see and study the resulting scripts, you'll see the wisdom of going that route.
    I never use dbca to actually create a database, but I do use the above procedure. In fact, I used the resulting scripts to create a skeleton set of scripts that I reuse at will.

  • Find database name of sessions over database link

    Hi,
    I have a database in which i can see a few sessions which are connected to this database from one of my server which is hosting 2 databases. Now if i query v$session on my local database, i can only find the host name in program and module column of v$session view. How can i find out that from which database these sessions are established because i have two databases on that remote host from where these sessions are estableshed.
    Thanks
    Salman

    only way is if i have set the client info.alternatively application info.
    I've never tried the following, but perhaps using different LISTENER or port could be used as a differentiator.
    Keep in mind that what the local DB server "knows" is it serviced some connection request from remote client.
    Local DB server knows little to nothing about any remote DB masquerading as a client connection.
    This is an application issue not Oracle RDBMS issue.

  • How to find the database name?

    Hi,
    I have a little problem with my database under DB2.
    I acces this database through the ODBC with the name TESTALIAS, but the real name of the database is TEST. So what I need to find out is if there is a possibility to get the real name of the database.
    I used the com.ibm.db.DatabaseConnection class for the connection, but there seems nothing to indicate me the real name of this database.
    Have you any idea??? maybe another class that do this?
    thanks,
    alina

    if somebody is interested in, the following SQL Statement gets the real database name out and not the alias:
    SELECT CURRENT SERVER FROM one_table_name
    I don't know if the register CURRENT SERVER work for all DB environment, but for DB2 ist does.
    cheers,
    alina

  • How to find database attribute names that correspond to page labels

    I've been tasked with creating one or more views to be used in creating reports. The users know data items by the labels on pages, not the database attribute names. So my dilemma is how to correlate the page labels to the database attributes.
    For example, there's a course details web page. It includes items labeled "Replacement Course", "Inherited Competency Update Setting" and "Attachments", among others.
    Focusing on "Inherited Competency Update Setting"... there's no database attribute called that. I've found COMPETENCY_UPDATE_LEVEL, but I don't know if that is it. And is an "inherited" one different than a non-inherited.
    I've googled about, and discovered that "Inherited Competency Update Setting" can be set by using a workflow named OTA_COMPETENCE_UPDATE_JSP_PRC and setting an attribute named HR_APPROVAL_REQ_FLAG. Further research has lead me to determine that HR_APPROVAL_REQ_FLAG is used only within the workflow system. I've found in SYS.ALL_SOURCE a package OTA_COMPETENCE_SS with a function that gets that attribute's value. It includes a query against WF_ACTIVITY_ATTR_VALUES which retrieves values of YES_DYNAMIC, APPROVAL, NO, YES or NOTIFYONLY. I've not found any code that uses the function.
    Using ALL_TAB_COLUMNS, I'd found COMPETENCY_UPDATE_LEVEL in OTA_OFFERINGS, which contains "APPROVAL" or null. So that may be what I seek, but I can't confirm it.
    I also have been unable to find the translation from "APPROVAL" to "Notification, Automatic Update after Approval" (assuming I'm correct and this is the field)
    I've found a Training Administration Technical Reference Manual for Release 11i, which contains information about the database, but I've found no corresponding document for Learning Management for 12.1 (Only installation and user guides).
    And this is many days' research to find one attribute. Which I'm not certain I've found.
    So, in this case in particular, or any case in general, how does one find the database name for an attribute, given the page label's text??
    Thank you
    Cornell

    Whoa, easier than I'd thought...
    When the page first shows up, there's the About This Page link, at the bottom, clicking it you get to the About Page.
    I noted two sections, Page Definition and Business Component References Details.
    I expanded Business Component References Details and found View Objects. There's a list of views used. I was dismayed that the views don't appear to be in the database. Of course, they're camelCased Java names of Java objects, not database names (although sometimes some of the camelCased tokens might correspond to parts of view names). They are, however, clickable and when clicked the definition shows up, and I was thinking that it would take a long while to find what I was seeking.
    But... Hit the Expand All link in Page Definition, do a find on page for the desired label, and there it is... a row with the label, view object name and attribute! Pay dirt!
    Then go to the Business Component References Details, find the View Object, click it, and there's the view :-) Find the attribute, then the table... easy peasy!
    Thank y'all again

  • SQL script based on hostname and database name?

    I am trying to write a script that I can run on several unix servers and databases that will do different sql statements based on which server and database it is being run in.
    Something like:
    if hostname = 'A' and database name = 'D' then do this
    else if hostname = 'B' and database name = 'F' then do that
    I have tried many diifferent combinations of shell scripts and sql scripts but can't seem to get anything that works.
    Can someone help me out? Thanks.

    Since you are already able to get he db and host info, you are well on your way to branching based on that information. All you need is the basic framework:
    declare
      db VARCHAR2(30);
      host VARCHAR2(30);
      sqlcmd VARCHAR2(4000);
    begin
      select sys_context('userenv','host') host
           , sys_context('userenv','db_name') db_name
        into host
           , db
        from dual;
      case
        when db = 'XE' and host = 'mypc' then
          sqlcmd := q'[local_package.do_something('parm1', :db, :host)]';
          execute IMMEDIATE sqlcmd USING db, host;
        when db = 'DEV' and host in ('serv1','serv2') then
          sqlcmd := q'[different_packge.do_something('parm1', :db, :host)]';
          execute IMMEDIATE sqlcmd USING db, host;
        else
          dbms_output.put_line('unrecognized db/host combination: '||db||', '||host);
      end case;
    end;
    /In this example I've used dynamic SQL since not all instances are guaranteed to have any or all of the package procedures referenced in the dynamic sql. With out the dynamic sql, you would get errors and be unable to run the script on any instance lacking one or more of the reference package procedures..

  • How to find Logical database name using selection view

    Hi Experts,
                      How can we find logical database name using selection view in se36.
    Regards,
    Mani

    Hi,
    If you want to see the logincal database used in the report ( tcode se38) in the intial screen select the attribute tab
    and click display you will bw able to see the logical datbase ysed for the report.
    Thanks.

  • How to find current database name i am using

    what is the command to find current database name i am using

    Dear user!
    SELECT name
    FROM   v$database;Yours sincerely
    Florian W.

  • How to find out web content files linked in folio through scripting

    Hi all,
    Please suggest me, how to find out web content files linked in folio through scripting.
    Regards,
    Moorthy

    @Moorthy – can you tell us a bit more? By mentioning "folio", I think you are referring to Adobe Digitial Publishing Suite (ADPS or short: DPS). If yes:
    1. Do you want to analyze Folio files *.folio and get the linked web content files?
    2. Or do you want to check an InDesign file with an overlay and check what files are linked as web content?
    3. Or something else?
    Where is your base problem?
    Packaging the InDesign files and copy/relinking the web content files after the packaging process?
    Uwe

  • How to find out database name

    Hi
    can anyone please tell me how i can find out the database name for oracle8i.
    thankyou very much in advance

    I'm not expert in this, but your error has TNS in it which could mean its looking for the tnsnames.ora file which in an oracle client installation contains the mappings from the database name to the server ipaddress and port number for connection to oracle. Its possible you may need an oracle client installation.
    Another way of connecting is via ODBC drivers which are configured in control panel in winnt and under computer managenent in win2000. An installation of Oracle will ususally install ODBC drivers.

  • View to Find Primary database name from Standby

    Is there any way(view) we can find the primary standby database name and it's host from the standy database.
    Thanks,

    V$DATABASE holds the Database Name and this would be the same on the Standby as on the Primary -- at least would be the same for a Physical Standby, I haven't done or verified a Logical Standby with a different DB_NAME.
    However, the Host name is not a property of the database but of the instance -- an RAC database can have instances running on multiple hosts. Therefore, the HOSTNAME is always in V$INSTANCE only -- and that, of course, is different on the Standby then on the Primary.

  • I found my college roomates band's cd . how can i find track names since its not in database. they were semifamous so it should come up

    How can i use itunes to find track names on cds from an old roomate"s band. Its a professional cd that was sold in stores but it shows up as track 1 track two. the database could not find them.   
    I had another friend who made a cd and inputed all of the data but itunes still puts them as track 1 track two.  How can i find the names without manually putting them in?

    How can i find the names without manually putting them in?
    They will only show up in iTunes if someone (your friend, their producer, or a fan) has submitted them to Gracenote.
    If that did not happen, you can try identifying the tracks with an auto-tagging program such as Picard. 

  • Can I cycle through and change the color overlay of certain layers by name using script?

    Can I cycle through and change the color overlay of certain layers by name using script?

    Sure. Ask in the scripting forum and refer to the scripting docs.
    Mylenium

  • Save .wav file into database through script

    Hi,
    I want to store a .wav file into a database through script. Is that possible to do it through the ccx script?
    Thanks,
    HowYee

    Hi,
    At this moment, script can save the file only to Custom directory of UCCX. It's not possible to save it to external DB.
    Regards
    GP.

Maybe you are looking for

  • System Landscape in EP6.0 SP9 (Urgent ..)

    Hi, We have installed EP6.0 SP9 on Win 2003 and Oracle. After instalaltion I Created the System Landscape for R/3 Server. I maintained the Connector Properties,User Management Properties. Then i tested by creating the Transaction Iview after maintain

  • Return My New MacBook Pro Ahead of WWDC?

    I bought my new: MacBook Pro Retina, 13-inch, Late 2012 Processor  2.5 GHz Intel Core i5 Memory  8 GB 1600 MHz DDR3 on Wednesday, May 29 (10 days ago). I just found out that the exact model of computer I own is in short supply, and almost everyone sp

  • Podcast Will Not Play in Browser After Uploaded Through Fetch

    I'm using iWeb '08 to create my website and I have a Podcast section on this site. However, I cannot get my Podcast to play on the website after it is uploaded using Fetch. The Podcast works fine when integrated in the website and viewing it through

  • Need help with restore problem for itunes v 7.6.2

    I just installed itunes version 7.6.2 and I plugged my ipod into my computer and hit the restore button so i can erase and redo my ipod. Then when I plugged my ipod into my computer my ipod is stuck on the restore mode and i can't see the information

  • Adobe Flash appears to be installing with SCCM 2012 deployment, but ActiveX is missing

    I have found that even though SCCM 2012 deployment has installed flash, I later find that Active X is missing and that it is missing a registry key ? HKLM:\Software\Microsoft\Macromed\FlashPlayerActiveX Anybody have this problem?