Service name and database name are different.

Hi,
I had created a database with name PROD, latter i changed DB name to PRODT as per management request.
But i notice the following things.
1. At OS level ORACLE_SID variable is still PROD.(.bash_profile too have this entries)
2. From sql prompt DB_NAME is PRODT.
3. In Listener service name is showing PRODT and instance name is PROD.
can any one please explain me, why oracle is behaving like this.
Our all the applications are working fine with out any issues till now.
[oracle@qual ~]$ echo $ORACLE_SID
PROD
[oracle@qual ~]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 5 10:35:01 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 1220868 bytes
Variable Size 209719036 bytes
Database Buffers 394264576 bytes
Redo Buffers 2969600 bytes
Database mounted.
Database opened.
SQL> select name from v$database;
NAME
PRODT
SQL> !lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 05-MAR-2013 10:38:30
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=qual.com)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 05-MAR-2013 10:36:54
Uptime 0 days 0 hr. 1 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u001/app/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /u001/app/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=qual.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PRODT" has 1 instance(s).
Instance "PROD", status READY, has 2 handler(s) for this service...
Service "PRODT_XPT" has 1 instance(s).
Instance "PROD", status READY, has 2 handler(s) for this service...
The command completed successfully
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@qual ~]$

Hello,
I had created a database with name PROD, latter i changed DB name to PRODT as per management request.Using NID ?
But i notice the following things.
1. At OS level ORACLE_SID variable is still PROD.(.bash_profile too have this entries)ORACLE_SID is the instance name. Changing DB name does not change the instance name. You can manually change it by creating a new PFILE/SPFILE and Password file for the new instance.
2. From sql prompt DB_NAME is PRODT.Yes, as you have changed the DB name from PROD to PRODT.
3. In Listener service name is showing PRODT and instance name is PROD.Database name is PRODT and the instance associated with it is PROD. There can be multiple instances for a single database.
Regards,
Shivananda

Similar Messages

  • How to find the logins,program name and databases for a session id?

    I used the following the following query.
    select pr.spid ,pr.dbid,pr.program_name,pr.loginame,ss.session_id,ss.host_name,ss.login_time,db.name from master.dbo.sysprocesses pr,sys.dm_exec_sessions ss,sys.databases db
    where pr.spid = ss.session_id and pr.dbid = db.database_id
    order by ss.login_time desc
    Is spid in master.dbo.sysprocesses the same as session_id in sys.dm_exec_sessions and dbid in master.dbo.sysprocesses the same as database_id in sys.databases?
    My intention is to get the active sessions with the program name,login Name and database name corresponding to the session?

    1)Why you included the clause session_id > 50?
    Sessions with session_id <= 50 are system processes.
    2)Is there any problem with the query I used?
    You query was better than Latheesh's. To wit, his query will only show the database for sessions who are actually running something.
    On SQL 2005 and SQL 2008, this is the best solution:
    SELECT  des.session_id, des.[status], des.login_name,
            d.name AS database_name, des.program_name
    FROM    sys.dm_exec_sessions des
    JOIN    sys.sysprocesses p ON des.session_id = p.spid
    LEFT JOIN sys.databases d ON p.dbid = d.database_id
    WHERE   des.session_id > 50
      AND   p.ecid =0
    ORDER BY des.session_id;
    The condition p.ecid = 0 is needed to weed out extra rows when there are parallism in force.
    On SQL 2012, you don't need sysprocesses, but this works:
    SELECT  des.session_id, des.[status], des.login_name,
            d.name AS database_name, des.program_name
    FROM    sys.dm_exec_sessions des
    LEFT JOIN sys.databases d ON des.database_id = d.database_id
    WHERE   des.session_id > 50
    ORDER BY des.session_id;
    Erland Sommarskog, SQL Server MVP, [email protected]

  • I am trying to deauthorize my audible account.  It says the user name and/or password are incorrect after I had just deauthorized the computer using the same user name and password.  They should be different correct?

    I am trying to deauthorize my audible account.  It says the user name and/or password are incorrect after I had just deauthorized the computer using the same user name and password and logging in to post this.  They should be the same password correct?

    Deauthorize Audible Account... always appears as a menu selection, even if you deauthorized Audible or never even had an account.
    Audible is a different account from iTunes and does not require the same username / password.

  • 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 know database name and schema name by providing package name?

    Hi,
    Could someonw will help me to get database name and schema name by providing package name ?
    I have used the query : select * from all_objects where object_name='Package_name'; but it simply returns schema name where as i need DB name and username.
    --Prajakta

    but it simply returns schema name where as i need DB name and username.
    i want to retrive the DB name for package name
    Based on your questions, I wonder if you are used to working in SQL Server? (The server, database, and schema are part of the 4-part  name of an object, independent of any user.)
    In SQL Server, schema and username are two separate physical concepts.  "Schema" is purely logical in Oracle: a user which owns objects is often called a "schema".
    In Oracle, "database" is roughly equivalent to the SQL Server concept  "server" (what you log in to).  It is not part of the naming path to a specific object  (unless there is a database link involved, but there is no indication that's what you have here).  In Oracle you connect to an Instance (or Service) and people often call this the "database", but there is a fine semantic distinction there (separate topic). 
    Once connected in Oracle, you fully-qualify an object by only a 2-part owner and object name (possibly 3-part if a database link is involved user.object@link).
    12c added another wrinkle to all of this, but I'll assume this question was more basic than that, because you likely would have mentioned if this was a 12c question.

  • How to add a service account in SQL Server to display the "Service Account Name" and "Display Name"

    Can someone
    help with steps on how to add the following in SQL Server 2012 environments?<o:p></o:p>
    "Service Account Name" and "Display Name"<o:p></o:p>
    Your help will be greatly appreciated.<o:p></o:p>
    leonie6214

    Hello,
    Is the following article what you are looking for?
    http://msdn.microsoft.com/en-us/library/ms345578.aspx
    If not, could you explain a little bit more what you want to accomplish?
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Why java file name and class name are equal

    could u explain why java file name and class name are equal in java

    The relevant section of the JLS (?7.6):
    When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (?7.2.2), the host system must not impose such restrictions. In practice, many programmers choose to put each class or interface type in its own compilation unit, whether or not it is public or is referred to by code in other compilation units.

  • "Service Name" and "Routine Name" in tmadmin

    In tmadmin console, there is "Service Name" and "Routine Name". What is the differences between them? Do they have relation with "Server Name"? Thx.

    See http://download.oracle.com/docs/cd/E13161_01/tuxedo/docs10gr3/rfcm/rfcmd.html#wp1750061
    In 'buildserver' when you use the "-s" option you can specify the service name and optionally the routine/function name. The function/routine name is compiled and included in the server executable that 'buildserver' creates.
    Typically the service name and routine name are the same.
    Harvey

  • How to know database name and schema name

    Hi ,
    Once after logging in the database,how is it possible to know the current database and schema which we r using?Is there any system table where we can get the database names and schema names?
    please help me out.itz urgent.
    Regards,
    Sravan

    Probably not.
    If the database name is the name of the current database, it would be essentially redundant. If the database name is the name of some other database, in order to get the names of all the tables in the specified schema, you could create a database link to the remote system (which assumes you have a login and password to the remote database with appropriate privileges, that the database server's tnsnames.ora file has an entry for the remote database, etc) and query the remote data dictionary tables. Even if you could do that, however, you could not dynamically create triggers on the remote database since DDL over a database link.
    In theory, you could also load an appropriate JDBC driver into the database and write a Java stored procedure that would connect to the remote database (again, with an appropriate user name & password, host name, and port number) and issue DDL against that remote database. I have a hard time believing, however, that this would be a particularly beneficial approach. It would be easier just to put the appropriate code into each database that needs triggers generated or to have a separate Java application that generates triggers for a number of different databases.
    Justin

  • This.name and application.name different?

    Hello,
    how come that, within the application.cfc file, this.name and application.name are different?
    Shouldn't this.name be inherited by the application? Isn't that confusing?
    Thanks for clarification

    If I recall correctly, you use this.name to set your application name in Application.cfc, and Application.applicationName to read it in other files. Application.name is just a variable you've created in the Application scope.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007

    Can you please help me to write an SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007. Thanks!!

    Refer
    http://gallery.technet.microsoft.com/projectserver/Server-20072010-SQL-Get-a99d4bc6
    SELECT
    dbo.MSP_EpmAssignment_UserView.ProjectUID,
    dbo.MSP_EpmAssignment_UserView.TaskUID,
    dbo.MSP_EpmProject_UserView.ProjectName,
    dbo.MSP_EpmTask_UserView.TaskName,
    dbo.MSP_EpmAssignment_UserView.ResourceUID,
    dbo.MSP_EpmResource_UserView.ResourceName,
    dbo.MSP_EpmResource_UserView.ResourceInitials
    INTO #TempTable
    FROM dbo.MSP_EpmAssignment_UserView INNER JOIN
    dbo.MSP_EpmProject_UserView ON dbo.MSP_EpmAssignment_UserView.ProjectUID = dbo.MSP_EpmProject_UserView.ProjectUID INNER JOIN
    dbo.MSP_EpmTask_UserView ON dbo.MSP_EpmAssignment_UserView.TaskUID = dbo.MSP_EpmTask_UserView.TaskUID INNER JOIN
    dbo.MSP_EpmResource_UserView ON dbo.MSP_EpmAssignment_UserView.ResourceUID = dbo.MSP_EpmResource_UserView.ResourceUID
    SELECT
    ProjectUID,
    TaskUID,
    ProjectName,
    TaskName,
    STUFF((
    SELECT ', ' + ResourceInitials
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
    ,1,2,'') AS ResourceInitialsCombined,
    STUFF((
    SELECT ', ' + ResourceName
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
    ,1,2,'') AS ResourceNameCombined
    FROM #TempTable Results
    GROUP BY TaskUID,ProjectUID,ProjectName,TaskName
    DROP TABLE #TempTable
    -Prashanth

  • I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I have a script called ExportImport for this task, but it only runs in Windows.
    In principle something similar should be possible in AppleScript, but I don't currently have access to a Mac to write it myself.
    tt2

  • IPhoto won't recognize my iPhone 3Gs.  just says there's an apple iPhone, instead of the device name, and says there are no files to download, but there are 62 items on my phone... what's going on?

    iPhoto won't recognize my iPhone 3Gs.  just says there's an "apple iPhone" instead of the device name, and says there are no files to download, but there are 62 items on my phone... what's going on?  as far as I can tell I have everything up to date and it's always worked in the past.

    Have you already confirmed your Mac as a trusted device?  Try this:
    Lauch iTunes.
    Connect the Phone/iPad
    When it asks you to trust it, say yes.
    Now try again to import.

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • SharePoint 2010 Web Analytics showing user Display Name and Account Name from the same user

    Hi!
    Since July, 16th 2012 the Web Analytics Daily Unique Visitors reports started to show almost the double of visitors we used to have on our Web Application. Here are some of the data (I intentionally deleted the weekend data):
    10/7/2012 2.497
    11/7/2012 2.723
    12/7/2012 2.722
    13/7/2012 2.699
    16/7/2012 5.055
    17/7/2012 4.963
    18/7/2012 4.954
    19/7/2012 4.998
    20/7/2012 4.965
    23/7/2012 5.117
    24/7/2012 5.012
    25/7/2012 5.071
    As you may notice the data jumped from around 2.700 unique visitors to around 5.000 unique visitors. As the number of permissioned users remains constant it is pretty odd. I also checked the Number of Page Views report and see no change on its behavior.
    The number of page views remained constant.
    So I went to look the Top Visitors report and understand why the visitors number almost doubled. The analytics started to count the users Display Name and Account name as two different visitors with a different number of page views. Let me show you an example
    from yesterday (July, 25th) Top Visitors report:
    #     Visitor                  Page Views    %
    1    Cinthia XXXXXXXXXX    359        0,55%
    5    Giselle XXXXXXXXXX     143        0,22%
    7    Aline XXXXXXXXXX       138        0,21%
    15  nt\cmazevedo              111        0,17%
    60  nt\gbsantana                 69        0,11%
    73  nt\aglsiqueira                 65        0,10%
    "Cinthia" and the account "nt\cmazevedo" are the same person. The same is applied to "Giselle" / "nt\gbsantana" and "Aline" / "nt\aglsiqueira".
    As I stated this is an example from July, 25th. If I checked the same report from a period before July, 16th I can only see the users Display Name as "Visitors". No account name is displayed or counted as a different visitor.
    About the environment:
    We have two SharePoint 2010 farms: a "corporate" and a "enterprise". The corporate farm contains four web servers and a central administration servers with publishing services. The enterprise farm contains two servers running User Profile Services, Search
    Services and some others. Our main version is the SP1 with June/2011 Cumulative Update with a few more hotfixes applied.
    This behavior on analytics is affecting all web applications (we have more than 20) installed on this farm and my company Support team said that no change were made on SharePoint on the weekend the problem started.
    Does anyone have any tip about what is going on?
    Thanks in advance!

    Hi, Manas!
    First of all thanks for your interest on this issue but I don't think it is related to the User Profile or the Active Directory.
    I checked both records and there was no change on the Display Names. All the users have "full names" as display names (first + middle + last name) and not logins as SharePoint is displaying on this report.
    But I did a test yesterday and checked the results today confirming that just the access been made using a specific server are causing this. Explaining it better:
    I have four web servers on my farm named from P01 to P04. Then I created this test script:
    Step 1: Change local HOSTS file to point the web application on the server P01.
    Step 2: Access site "A"
    Step 3: Access site "B"
    Step 4: Close the browser.
    Step 1: Change local HOSTS file to point the web application on the server P02.
    Step 2: Access site "C"
    Step 3: Access site "D"
    Step 4: Close the browser.
    Step 1: Change local HOSTS file to point the web application on the server P03.
    Step 2: Access site "E"
    Step 3: Access site "F"
    Step 4: Close the browser.
    Step 1: Change local HOSTS file to point the web application on the server P04.
    Step 2: Access site "G"
    Step 3: Access site "H"
    Step 4: Close the browser.
    I asked three users to execute that script. The results: All access to the sites "C" and "D" were registered on Web Analytics with the user account name such as "nt\cmazevedo". All the other sites registered the user Display Name correctly such as "Cinthia
    XXXXXXXXXX".
    With this test we could isolate the problem just on the server P02. It doesn't occur on the others. Now my support team is trying to find any configuration difference between this server and the other three that could point for the root cause.
    I am also looking for some information regarding the service responsible for this task ("transform the account name into a display name") to understand why it doesn't work on one server and works on the others.
    Thanks!

Maybe you are looking for

  • Thumbnails not displaying properly

    Greetings, Why are files 00003.MTS, 000004.MTS, 000009.MTS and 00010.MTS not showing a thumbnail? In the pane on the left you do not see a thumbnail of 000003.MTS but when clicked it shows as on the right. Also, why are the filenames out of sequence?

  • Migrating music and all iTunes info from pc to Mac

    I have just purchased my first Mac.. I have been totally unsuccessful migrating any information over. I have even selected single folders and 10 hrs later no luck. How do i get all of my itunes music,podcasts etc transfered over to my new Mac? Help p

  • Service Book Issue possibly?

    Im NEW at Blackberrys. Im looking to access the WEB and I cant find an Icon for BROWSER. The website says there it is, the associate with Cellular South says its on there, and then says it may be a Service Book which I will have to get a Data associa

  • IPhoto 6: Does it fix the large maker note and slowness issue???

    I'm hopefull that the newly released iPhoto 6 resolves the problem that many of us with certain Pentax and Nikon cameras are having (creating a bloated library.iphoto file due to a larger maker note ... refer to http://www.ericlindsay.com/apple/iphot

  • Displaying Metadata In Aperture's Pdf Contact Sheet

    Hello everyone, I have been using Aperture's PDF contact sheets. It has a nifty way of showing metadata like caption underneath the photo. My problem is i do not want to display "Caption : TreeStump" I only want to display "TreeStump" Is there a way