Get SID (SERVICE_NAME)

How can I programmatically get SID (SERVICE_NAME) of Oracle DB on which application server is running except for query "select sys_context('userenv','db_name') from dual"?

Hi,
select * from v$session
Thanks
--Anil                                                                                                                                                                                                               

Similar Messages

  • Getting SID with a given service name or host

    Hi.
    I am curious if there is a way or command line to get SID with a given service name or host. I have a service name, but I don't know how to get SID. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.

    caesarkim wrote:
    Is there a way to take care of it as one command something like this?
    sqlplus username/password@localhost "SELECT NAME FROM V$DATABASE@SERVICE_NAME"
    Thanks.Make a text file, dbname.sql, that contains lines below
    spool sid_name.txt
    SELECT NAME FROM V$DATABASE@SERVICE_NAME;
    spool off
    exit
    then invoke it like below
    sqlplus username/password@localhost @dbname.sql

  • Difference between SID, Service_name, Database_Name and DB_ID.

    Hi Experts
    Can anyone please clarify me whats the difference between the SID, Service_name, Database_Name and DB_ID.Thanks in advance
    Ram

    In summary:
    SID - uniquely identifies an instance. This given as the intialisation parameter INSTANCE_NAME. The SID and the Database name should be the same in a single instance database, but in RAC environment where multiple instances are associated to one database, there will be different name for each instance.
    Service Name - Registers the database on the oracle network. For instance, when the database starts, it needs to be registered to the listener service for other clients to see it on the network. This is what you need in the SERVICE_NAME entry of the tnsnames.ora. This is specified as the initialisation parameter SERVICE_NAME.
    Database_Name - This is the unique name that identifies all the mounted databases. This is the name you used when the database was created and is shown in the initialisation parameter DB_NAME.
    DBID - This is the Database numeric Identifier. It is found on the header of all controlfiles and you can see it in v$database view. e.g select name,dbid from v$database. You can also see this when you connect to the database with RMAN. e.g rman target /
    Note that you can use DBNEWID to change both the db_name and DBID. You can read more on all these to get more details

  • ODS Activation Problem - Error getting SID

    Hi All,
    I am facing the problem while activating the request,
    "Error getting SID for ODS object xxxx.i know lot of threads are there in forum but those all are taking about while loading the data to ODS,Here i loaded the data into my first ODS(here fine) and then transferring the data to another ODS while activation of Data in second ODS i am getting problem.the second ODS checked the Bex reporting.
    If masterdata not existis then it can be a problme in my first ODS but i didn't face any problem in First ODS.First ODS loaded the data from R/3 and second ODS using the datamarts.
    Any ideas how to solve this problem.
    Thanks,

    Use Tcode RSRV  Tests in Transaction RSRV  All Elementary Tests  ODS Objects  Foreign Key relationship of reporting-relevant ODS object and SID table characteristics (Dbl Click)
    From the right side window, expand u201CForeign Key relationship of reporting-relevant ODS object and SID table characteristics & Enter second ODS name, and click u201CTransferu201D
    Now, click u201CExecuteu201D (Toolbar)u2026 and check whether the results displayed in green icon..
    Otherwise, go back and click u201CCorrect erroru201D (Toolbar)...then try to activate second ODS

  • Oracle SID & SERVICE_NAME

    What is the difference between Oracle SID & SERVICE_NAME ?
    and which one is better to use in tnsnames.ora and why ?

    When you use the names resolution service TNSNAMES, you always use both a service name and a SID in each entry of the client's TNSNAMES.ORA file. The SID is the actual name of an instance as recorded in the INSTANCE_NAME column of the instance's V$INSTANCE view and as specified in the instance's entry in the server's LISTENER.ORA file. The service name is an alias for the instance that is found only in the client's TNSNAMES.ORA file. Here is an example of a series of entries in a client's TNSNAMES.ORA file for three databases on three servers all having the same SID:DEVDB.WORLD =
    (DESCRIPTION =
       (ADDRESS =
          (PROTOCOL = TCP)
          (PORT = 1521)
          (HOST = DEVSVR.OURCOMPANY.COM)
       (CONNECT_DATA = (SID = OURSID))
    TESTDB.WORLD =
    (DESCRIPTION =
       (ADDRESS =
          (PROTOCOL = TCP)
          (PORT = 1521)
          (HOST = TESTSVR.OURCOMPANY.COM)
       (CONNECT_DATA = (SID = OURSID))
    PRODDB.WORLD =
    (DESCRIPTION =
       (ADDRESS =
          (PROTOCOL = TCP)
          (PORT = 1521)
          (HOST = PRODSVR.OURCOMPANY.COM)
       (CONNECT_DATA = (SID = OURSID))
    )The SID is OURSID and is the same for each of these databases, but each resides on a separate host--DEVSVR, TESTSVR, and PRODSVR. The service names are DEVDB.WORLD, TESTDB.WORLD, and PRODDB.WORLD, and each is an alias for a database on a particular server. The SIDs of all three databases are the same, however. If the server configurations are identical, it is possible to use copies of OURSID from PRODSVR in TESTSVR and DEVSVR without making any control file changes. Although the service name may be the same as the SID, it needn't be.
    We have hundreds of databases in our enterprise, and we make extensive use of the aliasing capability of the TNSNAMES.ORA entries.
    Kind regards,
    Russ

  • Error getting SID

    Hi,
    I am getting the following errors in the activation of ODS.
    1) Error getting SID for ODS object ZMMIVO01     
    2) Value 'PPM@HIGHWA' (hex. '50504D40484947485741') of characteristic ZCUSTREF contains invalid characters     
    3) Error when assigning SID (details in long text)
    Please help me in resolving this and I can assure full points for very helpful answers
    Thanks,
    RV

    Hi,
    1) SID errors
    SID errors occurs generaly when master is not loaded and activation takes place.
    If master data is loaded perform attribute change run and try again.
    Also try repairing master data object in RSRV.
    2) Invalid char
    I think you are facing an invalid character issue.
    This issue can be resolved by correcting the error records in PSA and updating it into the target. For that the first step should be to identify if all the records are there in PSA. You can find out this from checking the Details tab in RSMO, Job log , PSA > sorting records based on status,etc. Once its confirmed force the request to red and delete the particular request from the target cube. Then go to PSA and edit the incorrect records (correcting or blanking out the invalid entries for particular field InfoObject for the incorrect record) and save it. Once all the incorrect records are edited go to RSA1>PSA find the particular request and update to target manually (right click on PSA request > Start update immediately).
    I will add the step by step procedure to edit PSA data and update into target (request based).
    Steps
    1. Force the request to red in RSMO > Status tab.
    2. Delete the request from target.
    3. Come to RSMO > top right you can see PSA maintenace button > click and go to PSA .
    4.Edit the record
    5. Save PSA data.
    6. Got to RSA15 > Search by request name > Right click > update the request from PSA to target.
    This should solve your problem for now.
    As a long term you can apply some user exit in source system side or change your update rules to ensure that this field is getting blanked out before getting loaded in cube or add that particular achr to permitted character list in BW (Run TCODE RSKC
    Input the <character> and execute the program) This will add <character> to the allowed characters list.
    Refer
    /people/sap.user72/blog/2006/07/23/invalid-characters-in-sap-bw-3x-myths-and-reality-part-2
    Thanks,
    JituK

  • Unable to get sid

    i tried to get sid in oracle 9i by entering "echo %oracle_sid%" & got value as "%oracle_sid%" ,
    during install i entered sid as "mastersite" . how can i get my sid value

    Hi,
    Sorry for delay. I think if you set the Environment variable still it won't accept. AFAIK. (I have not tested - I might be wrong). See, the environment variables in windows @time of installation is accepted or used during silient installation of applications or setups. When coming to the case of the installation, which you referred is interactive mode, where the applications is expecting from User Explicity but not from some assigned variables. So due to that Oracle sid will not used over there from environment.
    HTH
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

  • Possible to get SID of current session when not logged on as SYS

    I would like to get teh SID of my current session, but access to V$MYSTAT is restricted:
    conn user/******@DB
    SQL> desc v$mystat
    ERROR:
    ORA-04043: object "SYS"."V_$MYSTAT" does not exist
    SQL> conn sys/******@DB  as sysdba
    Connected.
    SQL> desc v$mystat
    Name                                      Null?    Type
    SID                                                NUMBER
    STATISTIC#                                         NUMBER
    VALUE                                              NUMBERThanks

    Can you use [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176]SYS_CONTEXT for getting DB_NAME, INSTANCE_NAME, SID etc?

  • Would like to disable HTTP and use only HTTPS yet I get side effects

    Hello,
    I have established a secure connection between the AS ABAP and AS Java.
    I would like assure that all communication between the servers is using https and for that, as a test, I have deactivated the http service using SMICM transaction.
    The only side effect I could recognize so far is that the Web Dynpro for ABAP stuff doesn't work through transaction SE80, the working area simply doesn't come up. If I activate HTTP again it is working.
    Am I doing the right thing by disabling HTTP completely and if yes, what else do I need to do in order to prevent this side effect from happening?
    Roy

    humuhumunukunukuapuaa wrote:
    If I get some nice approvals on my app spree in 10 days, I would like to close Talbots and Abercrombie and Fitch store cards. Total CL for the 2 is $2,700 ($1,350 each)  but I can make up for that closure and utilization loss by getting quite a bit more than those amounts on majors during my app spree. Talbots has only been open 4 months, A&F one year. I have other cards that are the same age or older so should not majorly affect AaoA. Thoughts? I know some will say don't close cards, but they're store cards and I don't need to be responsible for store cards I don't use.If you have no use for them and don't foresee using them in the future then you should probably close them out.  They won't affect your AAoA as the cards will stay in your reports for 10 years.  No sense in keeping cards that you don't want just to take up room in your sock drawer.

  • How to get side palettes to expand downwards ?

    Hi,
    question on CS4 Palettes.
    18inch Eizo screen crt with 1024x768res.
    CS2 had palettes at the right hand side, e.g. info or hostory or layers, that expanded downwards. I am used to having my image fill the screen up to the palettes at right in CS2. In CS4 instead they occupy my screen space to the left of the menu when expanded and cover the very thing I am trying to work on.  We have the palette and its contents side by side, twice the screen space used up to what could be.  I have only just over half my screen left workable, especially if I open the layers palette with many layers as I normally have. How can I get them to expand downwards. Is it my settings or is there no choice ?  If its the new design, this is the sort of thing that might exist in an early version of a program before developers changed it in a new release and got more money out of us via an upgrade to obtain such a novel improvement.
    Envirographics

    Read the online help on how to create workspaces and dock panles in groups. none of what you describe is any problem, you just need to custimze your workspace.
    Mylenium

  • OWB 10.1 get sid and serial from running mapping

    I have a mapping that's executing way to long.
    I know how to kill a kill a session with alter system kill session <psid>, <serial> immediate.
    In OWB 10.2 these parameters are visible when you look at running mappings, in 10.1 you don't see them .
    I can get some info on the running mapping from the table wb_rt_audit_executions but this does not contain sid nor serial.
    Does anybody know the link between this table and sid an serial or another way to get them so I can kill the session?

    I have no owb 10.1 at hand, but can you just stop the execution in the design center?
    Or I think you can get the job id of the execution, then you can just use "OMBSTOP <job_id>" to stop that...
    Thanks,
    Shawn

  • How to get SID (SAPSYSTEMNAME) property of j2ee engine

    Hello colleagues,
    could anybody help us with the following point:
    in our development we have to determine the SAP system ID (SID)of j2ee server instance.
    As far as I remember in ABAP world there is a corresponding system variable.
    Unfortunately I failed to find something like that for j2ee server (i have to note we are talking about 6.40)
    Sorry if my question is a common place
    Thank you in advance,
    Regards,
    Ilya Rudakov

    Hi Ilya,
    It seems that I didn't get your question right. Sorry about that.
    I have no idea about what APIs to use to get the SAPSYSTEMNAME parameter. My <b>guess</b> is, however, that this API is part of the J2EE Engine core and therefore not available for external developments.
    But... let's wait if somebody knows that for sure!
    Regards,
    Ivo

  • How to get SID of the runtime WebAS

    Hi all,
    is it possible to get the SID of the runtime WebAS (Java Stack Installation) via API-Call?
    Regards,
    Markus.

    Hi Markus,
    Check How to get WAS Installation Number and  System Id?
    Best regards, Maksim Rashchynski.

  • 10g patchset 1 "guessing" wrong repository SID/service_name

    Does anyone know what file is used by patchset 1 to "guess" host,sid and service_name of the metadata repository? The installer is "guessing" wrong and (of course) doesn't allow for manual configuration of the parameter.
    Note: tried modifying the ias.properties file (prop. InfrastructureDBCommonName) but that didn't help.
    Thanks in advance,
    /SFL

    It might be worth mentionning that this particular 10g AS server has both the midtier and infrastructure instance on the same server (different oracle_home of course).
    I've succesfully patched the midtier instance but infrastructure patch is another story. When trying to connect using SYS the installer complains about not being able to connect using the password provided.
    THE PASSWORD WAS TESTED VIA AN OEM CONNECTION FROM ANOTHER WORKSTATION and it connected fine.
    Also, the installer reports a different SID then what is used from the workstation to test the connection...
    How can I make the installer use that SID which I know works?

  • How to Get Side-Panel is Gnome 3 ?

    i installed gnome 3 but something is lacking :-/ side-panel , it comes in some additional package ?

    Gnome has its own words for describing the UI elements. Please look at the pictures on the gnome help page and report back what exactly is missing.
    Also use the words from the help page to describe it.
    If you want to have a permanently visible dash on the left, you need modifications, as it is not included in gnome per default.
    gnome-shell help

Maybe you are looking for

  • How do I set up a knob with fixed snap-to points on a logorithmi​c scale?

    My question is pretty simple, but after rooting around in the knob/gauge proteries I can't seem to figure out how to do what I'd like: I would like a simple knob type control  with 4 possible values: 0.0125,0.125,1.25,12.5 I'd like them evenly spaced

  • Looking for a TAP (Telelocator Alphanumeric Protocol) replacement?

    Looking for a TAP (Telelocator Alphanumeric Protocol) replacement? We can help with our cloud TAP service. 1. Quick setup 2. Great customer support 3. 40% cheaper 4. Ability to send 10's of thousands of messages 5. Works in WiFi and in all mobile net

  • TECO for CO PRODUCTION ORDER

    Hi, Any one pls tell me what is the Tcode for MASS TECO FOR ONLY CO PRODUCTION ORDERS. we tried CO99 but it's showing Residence time 1 error Pls any one help on this Thanks

  • Palm sync with iCal and Address

    I have recently bought a new computer and since I have lost the installation CD of my Palm, I have down loaded the drivers from their web page. It seems to sync well, but it's not, because neither my contacts or my calendar are being synchronized! Do

  • ORACLE BAM 10.1.3.4 PATCH UPGRADE

    Hi Gurus, We are trying to install BAM 10.1.3.4 patch on existing 10.1.3.3.While running the patch after taking backup and stopping IIS ,the following error is returned.... Error running the ADC upgarde utility Error returned by batch file. Please ve