How to list the current user in sqlplus and how to switch to another?

Assume I am in a sqlplus sesion.
How can I display the user with whom I am currently working?
And how can I switch (without leaving the sqlplus session) to another
user aaa with pw=mypw?
Peter

By using host command
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> host su oracle
Password:
[oracle@backup root]$ exit
exit
SQL>From Documentation:
*HOST [ command ] - Execute host commands*
http://download.oracle.com/docs/cd/B19306_01/server.102/b14195/sqlqraa.htm#sthref1972
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com

Similar Messages

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • How to get the current user logon to portal?

    Hi Gurus,
    How to get the current user who logged into portal.
    I have a webdynpro requirement where in which I have to get the current user id who loggedinto portal which will be the input parameter of the BAPI(adaptive RFC model) which will return me employee number of the particular user.
    Can anyone send me the code to retrive the user id through webdynpro application..........
    Pts will be rewarded for useful inputs......
    Thanks in Advance,
    Dharani

    Hi Dharani,
    Using UMEfactory u can do that...
    1. create one input field,
    2. create one attribute called Uid
    3. assign Uid attribute to the input field
    4. type the following code in Doinit() method
                String uid = wdContext.currentContextElement().getUid();
         try {
         IUser user = UMFactory.getUserFactory().
         getUserByLogonID(uid);
         String userName = user.getDisplayName();
         } catch (UMException ex) {
          e.toString(); 
    5. after that go to Portal create one iview assign to particular user. then u get into the user details...
    thats it
    Regards,
    P.Manivannan

  • How to view the planned orders in mass and how to delete in mass

    Hi gurus,
    How to view the planned orders in mass and how to delete in mass.
    Regards
    R.Rajakarthik

    Hi,
    Use the collective display of planned orders, transaction code MD16.
    You can select the data by different options and choose which ones or all that you need to delete.
    Click the Delete button to trash them.
    This will delete planned orders without deleting the planned independent requirements and sales orders.
    Hope it helps

  • How to get the current user name of the host who is occupying a specific VM?

    I'm developing a winform app with c# code to manage Hyper-V. I need to remind someone if he/she would take a VM which has already been occupied by others.
    Is there any powershell cmd or WMI interface to get the current user of a specific VM?
    Thanks!

    Hiya,
    from cmd there are quser(Query user) and qwinsta(Query Session)
    which should give you that. Don't know how you can incoorperate that in C#, but that should give you something to work with :)
    https://technet.microsoft.com/en-us/library/cc785434.aspx
    https://technet.microsoft.com/en-us/library/cc788125.aspx

  • How to retrieve the current User using PL_/SQL code?

    Hi,
    How can find the current logged user within a Dynamic Page using PL/SQL code?
    Thanks.

    Hi,
    There is a function wwctx_api.get_user which returns the logged in user. You can use this in your plsql code.
    Thanks,
    Sharmila

  • How to add the current user to a people picker using javascript coding in document library

    Hi Everyone,
    This is my scenario,
    I have a document library,for this if any user uploads a document,there we have three content types(Ex:content1,content2,content3)
    if the uploaded user is from content 1(here we have four columns name,assigned to ,status,published to) after uploading the document the document has to be updated.so when the document is updated by the user then automatically the published filed people
    picker has to be filled up with the current user name this is done by using java script object model programming.
    i am stuck with this can anyone help me..............
    thanks in advance
    Ramu

    Hi,
    I understand that you want to set a people picker field value automatically to current user. You can use these ECMA scripts on your EditForm.aspx page. Edit the page in SharePoint designer and add the code before a </asp:Content> tag.
     <script type="text/javascript">
    var context = null;
     var web = null;
     var currentUser = null;
    ExecuteOrDelayUntilScriptLoaded(GetUserLoginName, "sp.js");
    function GetUserLoginName() {
    context = new SP.ClientContext.get_current();
     web = context.get_web();
     this._currentUser = web.get_currentUser();
     context.load(this._currentUser);
     context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod),
    Function.createDelegate(this, this.onFailureMethod));
     function onSuccessMethod(sender, args) {
     var today = new Date();
     alert('Name:' + this._currentUser.get_title() + '\n Login:' + this._currentUser.get_loginName()); document.getElementById('ctl00_m_g_9b4b3950_80d8_4e6e_b2fa_241b727d83d4_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').innerHTML=this._currentUser.get_title();//you
    need to change the ID here to you people picker field ID. You can get the id for this field with the help of IE developer tool.
     function onFaiureMethod(sender, args) {
     alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     </script>
    For more information, please refer to this site:
    Get current user’s LoginName Ecmascript Sharepoint 2010:
    http://www.learningsharepoint.com/2011/05/18/get-current-users-loginname-ecmascript-sharepoint-2010/
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • How to reference the current user ID in an URL  iView

    Hi
      I have created an iview based on URL iview.
      I need to pass the logged on portal user id as parameter to a url.We are using EP6 SP2.
    Can any body help me in this regard.
    Regards
    Sayantan

    Hi SAYANTAN,
    You can create a dynpage that takes the current user id, use it to construct the url,
    and redirects to that url in doProcessBeforeOutput():
    public void doProcessBeforeOutput() throws PageException {
       Form myForm = this.getForm();
       IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();     
       IUser currUser = (IUser)request.getUser().getUser();
       String userid = currUser.getId();
       String url = "http://myUrl.com?userid="+userid;
       myForm.addRawText("<script>");
       myForm.addRawText("open(""+url+"","_self");");
       myForm.addRawText("</script>");      
    Hope that helps,
    Yoav.

  • How to find the current users logged in.

    Hi,
    I have a problem in finding the current users logged into the database and the operations they are doing.
    If u know pls help me........
    Thanks.
    K.Vijay Choudary Reddy.

    hi vijay,
    this is the OracleAS Portal Content Management forum. Please post your database related question in the Database Forum:
    General Database Discussions
    thanks,
    christian

  • How to get the current User Id

    Hi,
    is there any system variable containing the current "user code"
    because, based on current user code, i would like to get the branch from OUSR, so that, one query can display only those records pertaining to that branch.
    Thanks & Regards,
    Kr

    Hi
    You can create a formatted search to get and the following query:
    SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER]
    Paulo Calado
    SAP Business One Forums Team

  • How to find the current User Name and stored in which table

    In which table the current user name (Login) is stored?

    Hi Mohanapriya
    The query provided by Gordon can not run on query generator as the $USER is a runtime variable.
    You need to save it to a query then use it in a FMS(Formatted Search.)
    Just open a form(ex:sales order ), click the field in which you want to show the user name,
    then press ****+F2 or Tools->Search Function->Define,
    Search by Saved query,then assign the save query to the field.
    After that ,you can run the FMS(shift+F2) to get the current user info.
    Regards,
    Syn Qin
    SAP Business One Forums Team

  • Really how secure is the current erase all content and settings?

    I am not sure about taking my iPhone in for repair or exchange after reading many old articles about how unsecure the erase really is, seeing how many sensitive passwords and e-mails I have. I have the most current firmware. So tell me, how reliable for keeping my data safe and gone is the current "Erase all content and settings" feature?
    Also note: I have iPhone 3g, not later or earlier. So I am not sure if the hardware would make a difference, but yeah.
    Message was edited by: nkcrcr

    It is what it is. Erase all contents & settings overwrites user settings and information, writing a series of ones to the data partition. This process can take several hours, depending on the storage capacity of your iPhone. During this time, the device displays the Apple logo and a progress bar. If you had a 3GS, it would be instantaneous, as the 3GS supports hardware encryption. Can someone still recover data? Yes. But the software & equipment necessary to do so is very expensive & generally only available to law enforcement.

  • How to know the model of my Dv6 and how to install switchable graphics driver

    hi,
    I have a HP pavilion dv6 but I don't know what model is to download the drivers.
    Here are the specs:
    (this was purchase in Europe Portugal)
    - Intel core I5 M480 2.67Ghz
    - 500GB HDD 5600rpm
    - HD 6650
    - 4GB RAM
    - Finger print reader
    - 3x USB
    -Dvd Rom
    - x1 SD CARD reader
    - x1 esata
    - x1 HDMI
    - x1 Vga port
    - Camera HP trueVision
    - Dobly Advance Audio ALTEC lansing
    - Win7 Home Prem 64bit
    I need to install the AMD 6650 Driver with the switchable drivers options currently it only detects the Intel HD Graphics, installing the latest driver from AMD for the mobil 6650 will not work it doesn't dettect the graphics card.
    How can I know my laptop model ? and how to install the switchable and AMD drivers.. the laptop came with no CDs.
    Thank you,
    Arthur

    Get your full Model number or Product number from the Service Tag attached to bottom of laptop (may be under battery)
    How Do I Find My Model Number or Product Number
     Once you have the info, use the button at top of this page titled "Support", then click "Download drivers" from the menu. Enter your Product Number. After entering PN click 'Go". On the next page use the dropdown menu to select your Operating System, click Next. A list will populate with drivers/software.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • How to get the current values of LINESIZE and WRAP in SQLplus ?

    How do I get the current values for the SQLplus environment variables
    e.g. LINESIZE, WRAP, PAGESIZE ?
    When I type
    SQL> show parameter LINESIZE
    nothing is displayed.
    Is there a command to show ALL existing current paramter values at once ?

    SQL> show linesize
    linesize 134
    SQL> show wrap
    wrap : regels zullen omgeslagen worden
    SQL> show pagesize
    pagesize 50000And you can issue a "show all" to see all settings at once.
    Regards,
    Rob.

  • How to get the current user name in Provider hosted app using appOnlyAccessToken

    Hi, 
    Please help me, how to get the HostWeb UserName in Provider Hosted App
    i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
    Below code does not return current user who Log in in hostweb, it is returning
    SharePoint App (app@sharepoint)
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;
    Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
    app prompts for credentials 
    HttpContext.Current.User.Identity.Name
    Thanks
    Ram

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for

  • Mac 10.6.4 and CS5 - known problems? VERY slow, long freezes

    I am on a brand new 12-core (dual 6-core 2.66GHz) Mac Pro with 16GB of RAM (and of course running 10.6.4). I have a new install of CS5 Master Suite (trial version, our box has not arrived yet), and primarily in my explorations with After Effects, it

  • Error in running client program

    hi , i am tring to run a sample client program for web service i am getting the following error: Exception in thread "main" java.lang.NoClassDefFoundError: BatchWebServices/axis /browsing/Sample1 (wrong name: browsing/Sample1) at java.lang.ClassLoade

  • Cannot View the Employee Salary Report in BI Publisher

    Hi, everyone, I have installed the Standalone version of bi publisher for windows (bipublisher_windows_x86_101341). I have logged in as administrator, I have connected to my oracle database 11g thru jdbc succesfully. i cannot view the Employee Salary

  • PM 7.0 SP2  Pagemaker Corrupts files when it opens them

    I work in the IT department at a hospital and the hard drive failed in our Print Shops computer. After reinstalling all the programs I'm having problems with page maker 7.0 whenever I open a document with it (from a networked drive) it corrupts the f

  • LR 2.7, How to Edit Copyright Metadata at Export?

    Attempted to edit metadata but my changes aren't saved...that's one issue.  So, I created a new metadata preset can't quite figure out how to select the new preset at export; I'm unable to change the metadata preset to the new one at export screen. C