display only user information sessions

Hello

I am looking for a solution to grant limited access to v$ session, so the specified database user can list only sessions held by himself.

something like a public version of:

Select * from session $ v

where username = user;

I can do this with v_$ session for the specified user. But there is not much sense in it since v_$ session shows all sessions.

So is it better?

Thank you

SYS, grant select on v_$ session directly to a user with grant option option.  (Someone who is a DBA is still a good choice)

As this privileged user create a view by using the same query, you have above.  (USER_SESSION is a logical name)

create a public synonym for your point of view USER_SESSION.

Grant select on USER_SESSION to specific users, or the PUBLIC.

In this way, v$ session is not available to the average user, but is USER_SESSION and works the way you want.

Tags: Database

Similar Questions

  • Show only user information after the connection

    Hello world

    I hope someone can help me please, I'm new to databases and programming.

    OK, I just created my first page of the login of the user (using the dreamweaver builtin functions).  Nowi have successfully built a MySQL database, insert a table with username, userPass and e-mail.  The login page works correctly and redirects to the authorized page

    Now, this is where I get lost.  On the authorized page, I want that it lists the information related to that user only, IE display their username and your email address.  What I can't work.  I'm sure you must filter to show only the logged-in user, but I can't see anything at all.

    Help, please

    My login page

    <?php require_once('Connections/connection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    mysql_select_db($database_connection, $connection);
    $query_users = "SELECT * FROM tbl_users";
    $users = mysql_query($query_users, $connection) or die(mysql_error());
    $row_users = mysql_fetch_assoc($users);
    $totalRows_users = mysql_num_rows($users);
    ?><?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
      if (isset($_POST['userName'])) {$_SESSION['userName'] = $_POST['userName'];}
    }
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }
    if (isset($_POST['username'])) {
      $loginUsername=$_POST['username'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "index.php";
      $MM_redirectLoginFailed = "login.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_connection, $connection);
      
      $LoginRS__query=sprintf("SELECT userName, userPass FROM tbl_users WHERE userName=%s AND userPass=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
       
      $LoginRS = mysql_query($LoginRS__query, $connection) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;       
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 
        }
        header("Location: " . $MM_redirectLoginSuccess );
      }
      else {
        header("Location: ". $MM_redirectLoginFailed );
      }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
      <label>User Name:
      <input type="text" name="username" id="username" />
      </label>
      <p>
        <label>Password:
        <input type="password" name="password" id="password" />
        </label>
      </p>
      <p>
        <label>
        <input type="submit" name="submit" id="submit" value="Submit" />
        </label>
      </p>
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($users);
    ?>
    
    

    My page authorized

    <?php require_once('Connections/connection.php'); ?>
    <?php
    //initialize the session
    if (!isset($_SESSION)) {
      session_start();
    }
    // ** Logout the current user. **
    $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
      $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
    }
    if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['MM_Username'] = NULL;
      $_SESSION['MM_UserGroup'] = NULL;
      $_SESSION['PrevUrl'] = NULL;
      unset($_SESSION['MM_Username']);
      unset($_SESSION['MM_UserGroup']);
      unset($_SESSION['PrevUrl']);
     
      $logoutGoTo = "login.php";
      if ($logoutGoTo) {
        header("Location: $logoutGoTo");
        exit;
      }
    }
    ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    }
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
      // For security, start by assuming the visitor is NOT authorized. 
      $isValid = False; 
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
      // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
      if (!empty($UserName)) { 
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
        // Parse the strings into arrays. 
        $arrUsers = Explode(",", $strUsers); 
        $arrGroups = Explode(",", $strGroups); 
        if (in_array($UserName, $arrUsers)) { 
          $isValid = true; 
        } 
        // Or, you may restrict access to only certain users based on their username. 
        if (in_array($UserGroup, $arrGroups)) { 
          $isValid = true; 
        } 
        if (($strUsers == "") && true) { 
          $isValid = true; 
        } 
      } 
      return $isValid; 
    }
    $MM_restrictGoTo = "login.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
      $MM_referrer .= "?" . $QUERY_STRING;
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo); 
      exit;
    }
    ?><?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    $colname_Recordset1 = "-1";
    if (isset($_SERVER['MM_Username'])) {
      $colname_Recordset1 = $_SERVER['MM_Username'];
    }
    mysql_select_db($database_connection, $connection);
    $query_Recordset1 = sprintf("SELECT * FROM tbl_users WHERE userName = %s", GetSQLValueString($colname_Recordset1, "text"));
    $Recordset1 = mysql_query($query_Recordset1, $connection) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p align="center">WELCOME <strong><?php echo $row_Recordset1['userName']; ?></strong>,</p>
    <p align="center">IF YOU ARE VIEWING THIS PAGE THEN YOU HAVE SUCCESSFULLY LOGGED IN</p>
    <p align="left"> <a href="<?php echo $logoutAction ?>">Log out</a></p>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>
    

    You have selected the wrong option in the fields of the Recordset dialog box filter. You have chosen Server Variable. It is expected the Session Variable.

  • Automatically display the user information

    So I'm working on this website of the school project, it's a pretty simple site in Dreamweaver. I created a log in the site and I use MM_Username to show the connected to the user. How can I go to show information of the user (name, first name, telephone number etc.) on a wall that they display all sorts of different things in (to sell, animals lost, happening, etc.

    Thanks in advance!

    With queries SQL table names & field desired database.

    I hope that you do not use the obsolete Server & database for this panels.

    Nancy O.

  • The Task Manager currently has two active users in the console session, but I am the only user.

    Task Manager

    my task manager currently has two active users in the console session. I am the only user of the computer and when clicking on USERS it always shows only one user. What or OMGE could be the cause.

    Hello

    Open the Task Manager->, click on users-> right click on another user who isn't currently active and choose log off.

    This can occur when the user account is not properly disconnected.

    I hope this helps.

  • My computer will not allow the installation of the Adobe Air software, a message informs you that I must refer to the administrator. I am the only user on this machine

    My computer will not allow the installation of the Adobe Air software, a message informs you that I must refer to the administrator, I'm the only user on this computer.   Help please.

    Thank you, Nicholas Cooper.

    Here you go:

    1. Right click on the installer.
    2. Click on "Run as Administrator".
  • When one of my users start CC and select applications, nothing is displayed, only the arrow circling. What is c?

    When one of my users start CC and select applications, nothing is displayed, only the arrow circling. What is c?

    It is resolved, they did not have local Admin rights.

  • How to display the user id and the session on the form?

    Hi all can someone guide me how to display the user id and the session on the form? Please guide me

    Sarah

    Hi Sarah,.

    You can use GET_APPLICATION_PROPERTY (CONNECT_STRING) for this.

    BTW, have you tried search in forms online help? It has good examples explaining all the built-ins.

    Arun-

  • Restricting the views to DISPLAY ONLY the rows CreatedBy current connected user

    I want to user Oracle views - restrict the view to DISPLAY ONLY the rows CreatedBy / current OwnedBy signed / authenticated user!

    What are the different approaches, I have something with;
    setNamedWhereClauseParam, but this must be called on each ManagedBean in the constructor, as I have now!
    This approach caused the button Edit/Save which simply calls the commit to stop working. In a complete view of all the lines, there is no problem, with
    the button requesting validation the selectedRow in af: table.

    Other means?

    Thank you

    It does not appear that your view object extends the framework with custom code extension class in dealing with populating the bind variable by default.

  • If Firefox Mobile is opensource and free why is only available on googles 'user information gathering/monitoring/profiling' market?

    I want to download Firefox Mobile for my android phone. I refuse to use Googles profiling and collecting user information 'market of all the apps. Where can I download Firefox Mobile?

    See the link bitly to https://wiki.mozilla.org/Mobile/Platforms/Android#Download_Firefox_for_Android however, you will need to download the updates manually in order to maintain a secure browser. New features every 6 weeks.

  • I myself put in place as long as the administrator and am the only user, but my wife's name is still on display in the user records

    original title: problem strange user

    Hello people out there... My problem is that I got on the computer of my wife which is a HP Pavilion with Vista home Premium. I myself put in place as long as the administrator and am the only user... However my wife's name still shows under the user folders, i.e. 'C:\User\jenny '. I went to the sections of the user to delete, but it does not appear, it shows me only... also when I try to delete the folder of the user, the delete option wonder if I want to delete my account... My folder is located on the right of the Start button with more programs from the main menu, but my wife is located under the main C: drive I obviously did something wrong when I set up my user account, but I have no idea... so if anyone of you people can help me, I would be very grateful... Thank you.

    If you change the name of an account, the name of the associated in C:\Users folder does not change. As far as I know, there is no way to change this.

  • Error "Unable to get user information" when you try to open a session

    Ahoy hoy,

    When you try to connect to the workspace, everyone's is "unable to get user information".

    I think the problem might come as our domain controllers have changed IP address. If it's still weird that I entered the domain name, not a specific domain controller. It could be a coincidence, I guess so.

    When I log in https:// HorizonWorkspaceFQDN 0/SAAS/login/0 to use a domain account and check, it connects fine, but there is nothing outside of "details of the error: Null".

    Any help would be greatly appreciated.

    See you soon,.

    Craig

    All fixed now. Found that this /etc/resolv.conf pointed to a DNS server that had his IP has changed. It was put in the Pool of IP on initial Setup. I updated /etc/resolv.conf on workspace all virtual machines and also updated the Pools of IP.

    Rebooted and everything got back online. Happy days.

  • I can't open my pictures folder. Error message says I don't have permission! I ran disk utility and found no errors. How this could have happened and how can I fix this problem? I'm the only user.

    Suddenly, I can longer open my pictures folder. I tried to move a picture to the folder to see what is happening and received an error message saying I was not allowed to display the contents of the folder and if I move the picture here, I won't be able to see. I ran disk utility and found no permissions error.

    How this could have happened and how can I fix this problem? I'm the only user. No one else has ever physical access to my computer. However, I sign up for Skyhub a few weeks ago and copied the contents of my Macbook it. Since then, a "Remote disk" icon on my hard drive. This would be part of the problem?

    Select it, choose get the information on the file menu, open the section sharing and permissions and give you access.

    (141083)

  • FaceTime will not open on my Macbook pro (el capitan).  Message: "FaceTime close unexpectedly.  Click Reopen to reopen the application. Click report to display more detailed information and send a report to Apple. "Please help me.

    FaceTime will not open on my Macbook pro (el capitan).  Message: "FaceTime close unexpectedly.  Click Reopen to reopen the application. Click report to display more detailed information and send a report to Apple. "Please help me.

    Please launch the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Step 1

    For this step, the title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    In the upper right corner of the Console window, there is a search box to filter. Enter the name of the application crashed or process. For example, if Safari has crashed, you would enter "Safari" (without the quotes).

    Each message in the journal begins with the date and time when it was entered. Select the messages since the time of the last fall, as appropriate. Copy to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost everything that is not relevant to solve a particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name, may appear in the log. Anonymize before posting.

    Step 2

    In the Console window, clear the search box, and then select

    DIAGNOSIS AND diagnostic USE information reports ▹ user

    (not diagnose them and use Messages) in the list of logs on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points downwards. You will see a list of reports of incidents. The name of each report begins with the name of the process and ends with ".crash". Select the most recent report on the process in question. The content of the report is displayed at right. Allows you to copy and paste to validate all of the content, text, not a screenshot.

    I know that the report is long, perhaps several hundred lines. Please report all this anyway. If the report is only a few lines, make sure that you have disabled the search box.

    If you don't see any report, but you know, he had an accident, you have chosen diagnostic and using the list of Log Messages. INFORMATION on the USE of DIAGNOSTIC AND choose instead.

    In the interest of privacy, I suggest that, before posting, you change the UUID ' anonymous, ' a long string of letters, numbers and dashes in the header of the report, if it is present (it cannot be). "

    Please do not post other types of diagnostic report - they are very long and rarely useful.

    When you post the journal excerpt or the accident report, you might see an error message on the web page: "you have included content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • In Control Panel is displayed only the themes page

    In XP - SP3, click display in Control Panel shows only themes page.  Tabs marked office, Sceensaver, appearance and settings all disappeared.  What I did to crush them and how to get back the missing tabs?  I tried to replace desk.cpl in the system32 folder, but still get the same result.  I am the only user on the machine and have administrator privileges.

    Hello
     
     
    1. have you made changes on the computer recently?

    Method 1.
    Let us first start the sfc scan and check if there are any file system corruption.
    a. to do this, click Start, click programs, accessories principally made, right click Guest and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.
    b. type the following command and press ENTER:
    sfc/scannow
    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
     
    More information on SFC scan found in this document:
    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    http://support.Microsoft.com/kb/310747

    Method 2.
    If the problem persists, then create a new user profile and then copy your current users assigning to this profile. For more information, see:
    How to create and configure user accounts in Windows XP
    http://support.Microsoft.com/kb/279783

    Note: If you are unable to create a user profile on this user account try to create this in safe mode.

    How to copy data from a corrupted to a new profile in Windows XP user profile
    http://support.Microsoft.com/kb/811151

    How to recover damaged Windows XP user profile
    http://support.Microsoft.com/kb/555473

    I hope this helps.

  • Capturing information session registration

    Hi all

    Jdev Version: 11.1.1.7.1

    Requirement: must enter the user name and roles in a table when a user connects. In this context, seeks to determine the means to achieve. More specifically, seeks to the exact spot as well as the information above. is captured only once per session and at the beginning of each session.

    Explored approaches:

    i. Web filters (filters in web.xml file) - excluded that this is not an optimal as option that gets called every request.

    II. Landing Page executable - excluded, as this will be executed on every refresh as well as on the tabs of the browser within the same session

    III. lifecycle listeners - once again, they are at the page level and not at the session level - thus excluding it.

    I explore a different approach I'll keep this thread updated. During this time, wanted to see if there are better options that the forum here.

    Consider

    http://rohanwalia.blogspot.com/2013/10/save-logged-in-user-details-in-ADF.html

    http://one-size-doesn

Maybe you are looking for

  • How can I unlock my iPod classic that froze during the game

    iPod classic 80 GB, the iPod has been blocked while playing on an IM600 Altec Lansing In Motion. The iPod display the normal image (song, author, etc.) the progress bar is interrupted by a small speaker. At the same time on "Menu" and "Power" does no

  • Backup Watch issue

    I unpaired my 38 m Apple Watch sport when he was to be sent service. Now that I have my replacement watch, it does not show a backup for the last 8 months. I thought that my watch made a return to the top when the coupling and with my nightly backup?

  • HP ENVY 7640: How to print envelopes

    How to print envelopes with HP ENVY 7640 e-all-in-one series?

  • Scrollbar on touchpad not working not

    All of a sudden, the scroll bar on the right side on my touchpad stopped responding. What can I do to get it working back? Thank you

  • HP Pavilion dv6-T119TX battery error internal 601. How can I change the battery.

    my lap top girls (a little more than 12 months) she uses for United is setting up the 601 battery error message internal needs changing. How can I change, I assume it is the small 2032 battery that keeps the clock etc? Is there something special you