ID of session in 12 c CBD.

We have several monitoring database scripts that assume that sid is unique within the instance. For example, v$ session and v$ sesstat are joined by sid.

But in 12 c CBD, when the current container is root, these views show sessions of all containers. SID is also unique in this case, or we should use con_id in addition to sid as a join key?

Thank you.

A lot of questions on these forums are caused by the lack of knowledge about the internals of Oracle that are not mentioned in official documents.

Yes - but the truth is that many, if not most, these questions are useless or even deciduous.

Generally, you should NOT know about the 'Internals' proper use of Oracle.

In your case you already know, or suspect, that SID is NOT unique for 12 Multitenant c. I already said in my first answer here:

MSN can be reused in an instance. That's why the commands such as KILL require that you provide the SID and SERIAL No. to identify uniquely the sessions in the container.

Don't believe me? See the documentation of Oracle for V$ SESSION

http://docs.Oracle.com/CD/B19306_01/server.102/b14237/dynviews_2088.htm#REFRN30223

Session NUMBER SID identifier

SERIES # Session serial number. Used to identify a session

objects. Ensures that the session level controls are applied to the correct session

objects if the session ends and a new session begins with the same session ID.

Even in 11g or a version previous SID is NOT unique, even within an instance. That's why I said that your scripts are distorted if rely you on this even to 11g.

This is why orders KILL/DISCONNECT what oracle provides requires the SID and SERIAL No. Why Oracle itself what to do if the SID is unique?

Now that you have CON_ID in the mix. You can NOT and should not rely on the presumption of knowledge of the workings of the Oracle design/writing your code.

Now, you know, or should know if you believe me, that your code has always had this flaw "sid is not unique. You have been lucky so far that apparently did not affect you. Or maybe your particular use case did not meet re-use of the SID in your instance.

I suggest that you press your luck and just use CON_ID, SID and serial of your username unique. I understand you very well, and others (including me), would like to know how Oracle 'really' works and what the rules are. But the reality is that the inner workings are ALWAYS subject to change.

Use the published interface and Oracle will you help., use another thing and Oracle will not lift a finger to help you. They simply can NOT guarantee, even to themselves, that internal work exactly fix patch.

Tags: Database

Similar Questions

  • Application of computer Virtual Image precompiled App development database: start of the CBD fails with ORA-12514

    Hello

    I have a few questions about the pre built Database App Development VM image.

    I am trying to use it to familiarize myself with Oracle 12 c and would like to receive feedback on the following points:

    1. When you open a terminal session and then trying to connect as the sysdba, it automatically connects me to the ORCL PDB. How does this happen? I have just a sqlplus/nolog followed normal con sys/oracle as a sysdba. My ORACLE_SID is set to cdb1. Thank you I can change session at the root, etc. - my query is how by default does me to the ORCL PDB?
    2. If I connect to the container root of the CBD, namely sqlplus sys/oralce@cdb1 and then issue an immediate halt, the CBD closes down, but in the process gives an ORA-12514 error - after that I am unable to start CDB, as shows the ORA-12514 error when I try to sys/oracle@cdb1 conn - TNS:Listener is not currently of service requested in connect appears.

    For directions to the two above would be appreciated.

    Thank you, Mohan

    All,

    Well, I have fixed it for myself.

    TWO_TASK env var has been ORCL beforehand to be close the CDB.

    Disabling then close the container and restarting it fixed my error ORA-12514.

    Kind regards

    Mohan

  • Link db fast intra-CBD

    Various Oracle University course material uses the quick "Connection of db intra-CBD" expression to describe the links of database between containers living in the CBD even pluggable. They also state that "...". because communication link doesn't leave the instance, the link is very fast." I can find no other reference to this notion of "db link fast intra-CBD" and my own tests seem to show that the database of links between the containers work in exactly in the same way that they do in a non - CBD environment: contacting the listener to establish a session and send each way on TCP data. So all similarly as a link back to loop db in a non - CBD environment.

    Can anyone point me to any doc describing how it works "link db fast intra-CBD? Or to confirm what he done or it does not exist?

    Thanks for any idea.

    Thank you two for the answer. I'm going to close this topic with this conclusion (which is of course only I feel of its operation):

    Links on the service TCP exactly in the same way in the CBD and non - CBD. This seems to be confirmed by observing network traffic. If the link have been implemented on the IPC, it might be faster and that's probably what means Uni Oracle, when they talk of a link quick intra-CBD.

  • How to recompile PKG not valid in the PDB by referring to the CBD as LINK of METADATA

    Hello

    I would like to recompile invalid package belonged to SYS in PDB. This package point as METADATA LINK to package in the SYS schema in CBD (it has been recompiled successfully in CBD previously).

    See scenario:

    sqlplus sys/[email protected]/cdb_db as sysdba

    SQL > select status, owner, object_name, con_id from cdb_objects where object_name = 'HTMLDB_SYSTEM' and object_type 'PACKAGE Body ';

    OWNER OF CON_IDOBJECT_NAMESTATUS

    ------ ---------- ---------------  --------

    1 SYS
    HTMLDB_SYSTEM
    VALID
    2 SYSHTMLDB_SYSTEMNot valid
    3 SYSHTMLDB_SYSTEMNot valid

    SQL > alter session set container = pdb12;

    Modified session.

    SQL > show con_id

    CON_ID

    ------------------------------

    3

    SQL > select owner object_name object_type, status, sharing, con_id from cdb_objects where <>of status "VALID."

    OWNER OBJECT_NAME OBJECT_TYPE STATUS SHARING CON_ID

    --------- -------------------------- --------------- ------- ------------- ----------

    SYS HTMLDB_SYSTEM PACKAGE METADATA BODY NO VALID LINK 3

    APEX_PKG_APP_INSTALL_LOG PUBLIC SYNONYM OF METADATA NOT VALID LINK 3

    SYS HTMLDB_SYSTEM PACKAGE METADATA BODY NO VALID LINK 2

    APEX_PKG_APP_INSTALL_LOG PUBLIC SYNONYM OF METADATA NOT VALID LINK 2

    SQL > change the SYS package. HTMLDB_SYSTEM compile body;

    change the SYS package. HTMLDB_SYSTEM compile body

    *

    ERROR on line 1:

    ORA-65040: operation not allowed a pluggable database

    How to compile HTMLDB_SYSTEM in PDB when more metadata referring to CBD link?


    Hello

    Check this note

    HTMLDB_SYSTEM package is not valid after deletion APEX (Doc ID 1231863.1)

    HTH

    Anuj

  • synchronization session could start the ios 10.02

    Can someone help me out here?

    I restored my phone 2 times and yet I see the same error message. "" sync session could start "I can't drag and drop songs

    Hi there tarakfrombangalore,

    Thank you for bringing your question about the issues you are experiencing syncing your iPhone to iTunes for the Community Support from Apple.  It is super convenient to sync your favorite songs on your iPhone and it does not work can get in the way that for sure.  I'm happy to help you today.

    This article refers to the various errors that you encounter, but it has some good tips:

    If you see error - 5000, - 69 and 13010 13014 when you synchronize the music in iTunes

    Best wishes!

  • "Your breathing session was interrupted."

    I get this error message. Anyone know the cause or the solution?  Thank you.

    Hello

    At a meeting of Breathe, keep still.

    If you move too much or answer a call during a session, this session will end automatically and you will not receive any credit breathing for her.

    More information:

    Use the breathe app - Apple Support

  • I've been upgraded to El Capitan and electricity went off and stopped the session.  I don't have time to continue for 12 hours.  It is the CV.  How can I cancel until I have more time?

    I've been upgraded to El Capitan and electricity went off and stopped the session.  I don't have time to continue for 12 hours.  It is the CV.  How can I cancel until I have more time?

    Hello nancy milano,.

    Thanks for this info and choosing the communities Support from Apple. I know how important is able to complete your update to El Capitan at a later date! The good news is that you can simply delete the "install Mac OS X" install app in the Applications folder on your Mac. Then you can open the Mac App Store when you're ready to update and restart the download from the tab updates or searching through the Mac App Store for El Capitan. This is a resource that explains the process of update more:

    Update of OS X El Capitan

    See you soon!

  • El capitan cannot restart, stop or close the session

    If someone has problems with the restart, shut down or close the session with El Capitan (items disappear from the screen, but then restart stops on a white screen, the cursor still moves, dock still works) I have a possible solution. It should probably be a musician for your problem but check library-> Audio-> Plugins-> HAL and make sure that you don't have a plugin file named Digidesign CoreAudio or Avid CoreAudio. These two causes this problem. Avid is the most recent files, but still incompatible with El Capitan. Delete this file. Hope that helps someone.

    Yes!  I had this problem for awhile now.  Solved!  Thank you

  • iTunes sync session could start

    running itunes 12.2.2.25 64-bit on Windows 10 Pro.  All of a sudden when I connect a device I get the error message

    that the synchronization session could start.  Had been working fine until today.  Looked online and others found the question - none of their answers had worked.  That is what it is?

    Try to solve the problems between iTunes and Apple Support third - party security software.

    TT2

  • Lock Keychain Access with session and lock screen

    Hi guys,.

    I work on a macbook (which belongs to my boss) and he asked me to give him the password for the session.

    So far, it is quite logical since it is a work computer and not mine itself. But like all mac users, I use iCloud for share my keychain and passwords, so I'm pretty reluctant to give him my password for the session.

    There must be a way to lock the Keyring when the screen is locked so that the next time I log in, and I want to use build-in password management in Safari (for example), the system wonder a password. Is there a way to achieve this?

    Thank you.

    Hello!

    Please open Keychain Access via spotlight, take your cursor on the menu bar and select Preferences in the access of the main chain, click on Legeneralonglet.

    To select Preferences Keychain Access, you can also use command-comma

    Select view status of keychain from the menu bar, a padlock icon appears in the menu at the top of the screen bar.

    To lock the screen manually click the padlock icon and choose lock screen.

    Note: when its done do not click locking ring in the menu bar at the top like pop-up will appear and prompts for the password.

    Thank you!

  • Session restore saving connection token

    When I close Firefox and open it again I am is more connected to my account to Google and it is normal (I ask that my login details not recorded). However if I use the option to restore previous session I logged into my Google accounts. Why is the connection token not expired at the close and is still valid after restoring from a previous session?

    This happens even when disabling all add-ons.

    Firefox stores cookies used in the tabs that are currently open in the file sessionstore.js as part of the saved session data, so these cookies will be restored if Firefox is closed without first closing of these tabs.

    You can set browser.sessionstore.privacy_level 2 (never) or 1 (not HTTPS) on the topic: config page to deactivate the saving of cookies via session restore in the sessionstore.js file.
    The browser.sessionstore.privacy_level_deferred pref is used when you do not reopen last session automatically via "show my windows and tabs from last time" and use the same values.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

  • If I'm out in private browsing when I restart I can not restore the previous session

    I'm newbie/PC illiterate
    THANKS Mozilla AND VOLUNTEER FOR the EXISTING

    Private browsing mode is designed to keep not take of your browsing history. This allows users to browse the internet without their history to be saved on his computer. For this reason, you cannot restore a session that was made in private browsing mode, the session is permanently deleted from the closing of Firefox.

    If you want to have the ability to restore previous sessions, please use Firefox in normal browse mode.

    For more information on the incognito of Firefox, please read this Mozilla support article:

  • where are all my logical session files stored?

    I have logic on my computer and save all my sessions on an external hard drive, but on the hard drive I don't see the icon for the session, no files or anything, as in Pro Tools theres a lot, a lot of files for each session, but not with the logic! just an icon of the session and that's it!

    I can't complain, just a logical question works / records in a different way?   It seems easier and more net like this.

    When you save a project in logic, you can save it as a file or a package.

    If you save as a folder - you can see the directory structure of the file system that you expect.

    If you save as a package, the package contains all of the assets of the project.  If you want to see these assets, highlight the package in the finder file, then right click and view the package file. This will show you the files for the session all contained in a nice package file.

  • How to recover the session using "upgrade.js"?

    My computer auto-redémarré during the night while I was sleeping, come morning time that my wife has been checking his e-mails online... which caused my previous session to be lost. I have a few important tabs that I need to recover, and fortunately I was able to find my session in one of the files 'upgrade.js '.

    I copied the file "upgrade.js" and renamed it "sessionstore.js" as mentioned elsewhere on this support forum. It did not work, do not know if my version of Firefox is incompatible with these opinions... or... If there are missing details regarding all the steps I need to take to restore the session.

    Please, I need to recover my tabs ASAP

    I don't have to pay attention to the details as soon as possible...

    Instead of putting the file renamed in the main profile folder I kept trying to make it work by placing it in the folder "sessionstore-backup".

    Problem is solved, thank you

  • Disable session restore

    So, I had problems with firefox restore my session after I kill with the Task Manager, and his return to the page that did stop responding in the first place, it is possible to completely disable session restore, after all, I didn't use it anyway.

    I don't think that there is a simple switch for session restore. What might help, however, is to change what Firefox does start after a crash: instead of immediately to restore all windows and tabs, it can present a screen saying something like "Embarrassing" and listing the windows and tabs, so you can deselect those don't care you, or just start a new session.

    If you want to try, here's how:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste sess and make a pause so that the list is filtered

    3 double-click the browser.sessionstore.max_resumed_crashes and change the value from 1 to 0 (that's a zero) and OK the change.

    In this way, you can still restore the last session at the request (for example, using story > restore previous Session) if necessary, but you will not be forced to do.

Maybe you are looking for

  • HP ENVY notebook - m7-k211dx: Beats Audio

    HelloI'm looking for drivers for my beatsaudio on win7 64-bit. My laptop is HP ENVY laptop - m7-k211dxTNX

  • External hard drives - file transfer

    I have two external hard drives and I want to move the files from one to the other.   I want to create a new folder on the drive more so I can copy the files in this folder.  I have to be able to create this folder...  How to do this, then once done,

  • App ICS update problem

    Hello After update to ICS yesterday, whenever I change my phone and turn it back on, various updates to the app that have been previously installed are gone and I get a notification that the updates are available. Go to the game store, I see that all

  • The Application of the filter node of event using the mouse down?

    Hello I have a question regarding the application of the filter nodes of the Mods and PlatMods event. With respect to the event "Button" filter node, I can change the response when I click on the botton, either for a right click or left click. The fi

  • Windows Live essentials Beta unresponsive.

    Beta of Windows live essentials Windows live beta essentials unresponsive I uninstalled and reinstalled and my facebook games does not work I check problems and solutions and it said to uninstall essentalls and I and still nothing? help please?