Make a users not to use schema prefix in a query

Hello,
I created a user who has a default tablespace name "USERS", apparently this user need to query tables from another schema, as a result this user need to use the schema prefix to query this table. Now, how can i create the user such that this user does not need to key in schema prefix before querying the table in this schema. Please help
thx
Sam

Hi,
I can see 2 choices:
1/ create SYNONYMs for objects in the target schema. This will allow you to use the synonym for the object. Check in TFM for more infos about SYNONYMs.
2/ use an after logon trigger to define which is the current schema in the session (ALTER SESSION SET CURRENT_SCHEMA=xxx). Note that if you do that, you'll need to prefix the tables of the user if you want to acces them.
Regards,
Yoann.

Similar Messages

  • User not available means schema not existed in the Database?

    Hi Team,
    I am trying to add primary to existing table. Requester mentioned schrma_name and table_name.
    I used below query......to find schema existed or not.
    select USERNAME,ACCOUNT_STATUS from dba_users where username='ABCD_USA_NUM';
    no rows selected.
    Please suggest any one., User not existed means schema not existed right?. This is 4 nodes RAC Database.
    Thnaks

    Please suggest any one., User not existed means schema not existed right?. This is 4 nodes RAC Database.In your case, yes.
    Rgds,
    Ahmer
    N.B.: To earn a good reputation on forums, and if you want that your questions will be answered timely. Kindly adopt the habit of marking your questions closed as soon as you get the answer. and be courteous to the people who trying to help.

  • HT4972 My ipad 1 has never been updated and can't run many apps which makes it of not much use, how do I update it ? A simple step by step idiot proof guide would be best ! Can anyone help please ?

    My ipad 1 has never been updated and can't run many apps which makes it of not much use, how do I update it ? A simple step by step idiot proof guide would be best ! Can anyone help please ?

    You can only update the iPad to iOS 5.1.1and you cannot go any higher. If you never updated that high, you can do so by using iTunes on your computer. You will have to connect the iPad to your computer with the cable and launch iTunes
    You can read more here. Make sure that you read the section about using iTunes. The article starts off with using the Settings on the iPad for WiFi updates. That only works with the iPad 2 and higher that is already running iOS 5.
    Update your iPhone, iPad, or iPod touch - Support - Apple

  • An index can not being used and still afect a query performance?

    Hi i have a query with a high cost so i created two indexes, A and B, to improve its performance.
    After the creation of the indexes when i reviewed the execution plan of the query the cost had been reduced, but i noticed that the index B is not being used,
    and if i try to force the query to use index B with a HINT the cost increases, so i decided to drop the index B.
    Once i droped the index B i checked the execution plan again and then i noticed that the cost of the query increased, if i recreate the index B the explain plan
    shows a lower cost even though its not being used by the execution plan.
    Does anyone know why is this happening?
    An index can, not being used by the execution plan and still affect a query performance?

    user11173393 wrote:
    Hi i have a query with a high cost so i created two indexes, A and B, to improve its performance.
    After the creation of the indexes when i reviewed the execution plan of the query the cost had been reduced, but i noticed that the index B is not being used,
    and if i try to force the query to use index B with a HINT the cost increases, so i decided to drop the index B.
    Once i droped the index B i checked the execution plan again and then i noticed that the cost of the query increased, if i recreate the index B the explain plan
    shows a lower cost even though its not being used by the execution plan.
    Does anyone know why is this happening?
    An index can, not being used by the execution plan and still affect a query performance?You said that is what is happening, & I believe you.

  • User Not Found Using Migration Assistant and Time Machine

    My iMac running Leopard kernel panicked which forced me to do a hard reset. After rebooting, the account I was logged in as disappeared. Fortunately, that wasn't the admin account. I logged into my admin account and thought I would use Migration Assistant to recreate the missing account (I did run Disk First Aid first to ensure the hard drive was in good working order). However, Migration Assistant does not list the missing user account when reading my Time Machine backup. I do see the user if I go directly into into Time Machine. I'm guessing that Migration Assistant may only be looking at the most recent backup which obviously doesn't contain the missing user.
    Suggestions on how to restore the missing user or how to get Migration Assistant to read all of the users in my Time Machine backups?

    BobParr wrote:
    I'm guessing that Migration Assistant may only be looking at the most recent backup which obviously doesn't contain the missing user.
    Correct.
    Suggestions on how to restore the missing user or how to get Migration Assistant to read all of the users in my Time Machine backups?
    How many backups were done after the problem occurred? One possibility would be to delete those backups (see #12 in the Frequently Asked Questions *User Tip,* also at the top of this forum), so the last one has the missing user's data, and Migration Assistant can find it. If you do that, once everything's properly restored, boot up from your Leopard Install disk, then reboot normally. That will trigger a "deep traversal" in the next backup, where TM will compare everything on your system to it's backups, thus assuring that nothing was lost via the earlier deletions.
    Another would be to do a full restore from Time Machine, per #14 in the FAQ.

  • User not deleting using iPlanet Connector

    Hello,
    I am using iPlanet connector & created a task where users with Employee-Type as Part-Time are provisoned
    to iPlanet Resource & user is created in target system,but when i remove that user from Part-Time & set some
    other Employee-Type then iPlanet resource is revoked but user is not deleted from target system & it gives
    response as user does not exist,but users exist in target system.Could anyone suggest what is missing ?
    Thank-You
    Rahul Shah

    Thanks Kevin
    After your reply i checked my Task status & there was 1 task created by me was having status
    as Pending,so i tried to delete that task,but was not able to delete that task as OIM does not allow to
    delete any task once a task runs , so i renamed it & made conditional & then checked & was working i.e
    users were getting deleted from target system.

  • Ajax Autocomplete Tabular does not work using apex_item.text in SQL Query.

    Hello,
    Is it possible to use the search function which is used in, Dennis Kubicek example, ENAME topic Ajax Autocomplete Tabular
    in a sql query using apex_items?
    Query line :
    , apex_item.text(17,xp.part_nr,null,null,'onfocus="f_register(this);" autocomplete="off"') PART
    At first I followed the example by adding 'onfocus="f_register(this);" autocomplete="off" in the element attributes in the report field.
    This didn't work... so tried to add the it in the attirbutes parameter of the apex_item.
    But this still doesn't work. No errors are given, it does not respond.
    Could somebody please help me?
    Thx!
    Astrid

    Well, I'm trying to take this one step further, but I seem to be having some difficulty.
    I'm trying to make a Filter screen to create a dynamic where clause filter screen.
    This is a page I made with Popup LOVS, just to show you my goal (now trying to use autofilters)
    http://apex.oracle.com/pls/otn/f?p=29989:5
    I have a table on my system that tells you where the field is, and I'm using that to get the table (didn't want to change the javascript, so I pass in a static value).
    This is the javascript code I used
    <pre>
    <script language="JavaScript" type="text/javascript">
    function f_register(p_this,p_name)
    var p_registered = $x('P5_ITEM_ID').value;
         var p_this_name = $x(p_this).id;
    //alert(p_this_name);
    if (p_registered != p_this_name)
    register(p_this_name, "COSTING_M", p_name, "blue", "red");
    $x('P5_ITEM_ID').value = p_this_name;
    </script>
    </pre>
    This is my query
    <pre>
    select column_name || apex_item.hidden(1,column_name) Col_name,
    apex_item.SELECT_LIST_FROM_lov(2,'=','OPERATOR') OPERATOR,
    apex_item.text (3,
    NULL,
    20,
    200,
    'onfocus="f_register(this,''' || column_name || ''');" autocomplete="off"',
    'f3_' || '#ROWNUM#',
    NULL
    ) value,column_id
    from user_tab_cols
    where table_name = 'COSTING_M'
    ORDER BY ROWNUM
    </pre>
    and here is my on-demand process
    <pre>
    declare
    TYPE CurTyp IS REF CURSOR;
    v_row varchar2(4000);
    rec CurTyp;
    V_TABLENAME NKW.UTFIELD_M.TABLE_NAME%TYPE;
    begin
    BEGIN
    SELECT TABLENAME INTO V_TABLENAME
    FROM NKW.UTFIELD_M
    WHERE FIELD_NAME = :TF_SL_COLUMN;
    EXCEPTION WHEN NO_DATA_FOUND THEN RETURN; END;
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&amp;','&');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&lt;','<');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&gt;','>');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&quot;','"');
    owa_util.mime_header('text/xml', FALSE);
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<rowset>');
    open rec for
    'select distinct ' || :TF_SL_COLUMN || ' ' ||
    'from NKW.' || V_TABLE_NAME || ' ' ||
    'where '||:TF_SL_COLUMN||' like :1||''%'' ' ||
    'and rownum < 100 ' ||
    'order by '||:TF_SL_COLUMN
    using :TF_SL_SEARCH;
    loop
    fetch rec into v_row;
    exit when rec%NOTFOUND;
    htp.prn('<row>' || htf.escape_sc(v_row) || '</row>');
    end loop;
    htp.prn('</rowset>');
    end;
    </PRE>
    I made some slight mods to make the table dynamic from my source table (this is to grab master files when they exist and not to when they don't).
    I get my select list, but it's blank on all fields, any suggestions?
    thanks,
    Scott

  • How can I write code that uses schemas returned by one query to run another

    I need to use the data returned by this SQL
    Select owner
    From dba_tables
    Where tablename = 'TRANSACT';
    To run the following SQL for every schema in the database:
    Select $vschema, count(*)
    from $vschema..transact;
    Where I am using $vschema as a variable to hold owners returned by the first statement.
    I have tried using 1 cursor, 2 cursors, 1 coursor and an execute immediate command and either my code fails or I get a message that it ran successful but I cant see the data that I want returned by the second query.

    I don't actually want to get the count on the transact table for each schema I just used that as an example to simplify... Maybe the code that I have written so far would be better... Here is one attempt:
    SET SERVEROUTPUT ON SIZE 1000000
    SET VERIFY OFF
    DECLARE
    v_schema Varchar2(50);
    v_chgdate DATE;
    v_debits NUMBER(14,4);
    v_amount NUMBER(14,2);
    /* First cursor */
    CURSOR get_schemas (v_schema OUT char) IS
    SELECT DISTINCT t.owner
    FROM sys.dba_tables t
    WHERE t.table_name = 'GERCVLOG'
    ORDER BY t.owner;
    /* Second cursor */
    CURSOR get_stats (v_schema IN char) IS
    SELECT MAX(g.chgdate),
    SUM(g.debits),
    SUM(g.totalamt)
    FROM &&v_schema..gercvlog g
    WHERE g.chgdate >= '01-Jan-07' or
    g.chgdate = (SELECT MAX(g1.chgdate)
    FROM &&v_schema..gercvlog g1);
    BEGIN
    /* Open first cursor*/
    OPEN get_schemas (v_schema OUT char);
    LOOP
    FETCH get_schemas INTO v_schema;
    EXIT WHEN get_schemas%NOTFOUND;
    dbms_output.put_line('Schema: '||v_schema);
    OPEN get_stats (v_schema IN char);
    LOOP
    FETCH get_stats INTO v_chgdate, v_debits, v_amount;
    FETCH get_schemas INTO v_schema;
    EXIT WHEN get_stats%NOTFOUND;
    dbms_output.put_line('Latest Import: '||v_chgdate);
    dbms_output.put_line('Total Debits: '||v_debits);
    dbms_output.put_line('Total Dollars: '||v_amount);
    dbms_output.put_line('______________________________');
    END LOOP;
    CLOSE get_stats;
    END LOOP;
    CLOSE get_schemas;
    END;
    /

  • Hi.. I am reinstalling ios on macbook. While doing process, it asks for the Apple id and password. I am providing the id but it displays the message that apple user id has not been used with apple store... what shall I do to make my id work. Please assist

    Hi.. I am reinstalling ios on macbook.
    While doing process, it asks for the Apple id and password. I am providing the id/password but it displays the message that apple user id has not been used with apple store... what shall I do to make my id work. Please assist

    Just to clarify, iOS is the operating system for iOS based devices such as the iPod touch, iPhone, and iPad.
    Your Mac runs on OS X.
    As for your Apple ID, help here >  Using an existing Apple ID with the iTunes Store, Mac App Store, and iBooks Store

  • How to make different users to use different Plan_Tables?

    How to make different users to use different Plan_Tables?
    I want each user use his own's Plan_Table. How to achieve this goal?

    qkc wrote:
    How to make different users to use different Plan_Tables?
    I want each user use his own's Plan_Table. How to achieve this goal?Which version of Oracle - if you're on 10g or later you are already (effectively) doing this.
    If not, then copy the 10g strategy back to your version; in outline:
    <ul>
    drop all existing plan tables
    create a table (but call it plan_table$) in the SYS schema (you may prefer to use SYSTEM) as a global temporary table on commit preserve rows
    create a public synonym plan_table for plan_table$
    grant select insert update delete on plan_table to public
    </ul>
    Look in $ORACLE_HOME/rdbms/admin/catplan.sql in a 10g version of Oracle to check how it's done.
    Each user gets a private (temporary) table in their temporary tablespace whenever they use the plan_table
    Their private data disappears when there session ends.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Moved iTunes library to an ext hard drive to make space on my int drive... Followed steps from apple.  Now I cannot access my music... It says: "File could not be used because the original file cannot be found.  Would you like to locate it?"

    Moved iTunes library to an ext hard drive to make space on my int drive... Followed steps from apple.  Now I cannot access my music... It says: "File could not be used because the original file cannot be found.  Would you like to locate it?"
    I moved my iTunes library to my external hard drive some time ago and I followed the directions listed here on the apple support page.  It did copy my library and now is on my hard drive... I can open iTunes and use it to sync all of my devices but I would like to play my music... I can see all of my music files but can not play them if I click on an album or song it says the following:  "(file name) could not be used because the original file cannot be found.  Would you like to locate it?"  I click locate but do not know where to go from there?  I need a way to access all files and not to hunt down one at a time on my hard drive... I am pretty sure I deleted the original library to make space on my internal drive which was the reason for moving it.  I have tried and tried to fix it and do not have a lot of time to do so with a one and two year old at my house who do not like it whenI sit down at my computer.  What to do???  Any help is much appreciated!!!

    See Make a split library portable. Move all of the bits of the library together in the the correct shape and it should work. Or undo exactly what you did and then start over.
    If you're a former Windows user don't try merging two folders together that have the same name by dropping one into the same folders as the other, as that goes badly on a Mac.
    tt2

  • I'm getting this error message: "User not registered for online use" when i'm trying to download music/ track names from a CD into ITunes on my Windows 8 PC.  I'm registered and my itunes account/ appleID are all correct and working.

    I'm getting this error message: "User not registered for online use" when i'm trying to download music/ track names from a CD into ITunes on my Windows 8 PC.  I'm registered and my itunes account/ appleID are all correct and working.

    The ""not recognized for on-line use". error is associated with the Gracenote service that iTunes uses to look up and retrieve metadata for CDs.  Some users have reported that this error occurs when trying to import from CD, subsequent to upgrading to version 12.  A number of slightly different solutions have been reported (though all of a similar nature).
    Try walking through the following steps - before starting you may have to enable hidden files and folders to be viewed - in Windows 7 / Windows Explorer select Organize > Folder and search options, then on the View tab make sure that Show hidden files, folders and drives is selected.  Without this you won't see the AppData folder in C:\Users\username\
    Exit iTunes
    In Windows Explorer, go to the folder C:\Users\username\AppData\Roaming\Apple Computer\iTunes
    Delete the following files:
    CD Info.cidb
    com.apple.iTunes.Gracenote.plist
    Restart iTunes
    Insert a CD and see if details are now correctly retrieved from Gracenote
    If this doesn't work:
    In iTunes, select Edit > Preferences and make a note (or take a screenshot) of your preferences settings in all relevant tabs
    Exit iTunes
    In Windows Explorer, go to the folder C:\Users\username\AppData\Roaming\Apple Computer\iTunes
    Delete the following file:iTunesPrefs.xml
    Restart iTunes
    Insert a CD and see if details are now correctly retrieved from Gracenote
    If this second procedure does work, you'll need to restore other iTunes preferences settings to those that you noted in step 1.
    If this one didn't work:
    Exit iTunes
    Check the following folders:
    C:\Users\username\AppData\Local\Apple Computer\iTunes
    C:\Users\username\AppData\LocalLow\Apple Computer\iTunes
    Delete any copies of the following files:
    CD Info.cidb
    com.apple.iTunes.Gracenote.plist
    iTunesPrefs.xml
    Restart iTunes
    Insert a CD and see if details are now correctly retrieved from Gracenote
    Again, if this procedure does work, you'll need to restore other iTunes preferences settings to those that you noted in step 1 of the second procedure. If you're still not able to retrieve CD info:
    Exit iTunes
    In Windows, select Start > Control Panel > Programs and Features.  Find the entry for iTunes, right-click and select Repair.
    When this process has finished, restart iTunes
    Insert a CD and see if details are now correctly retrieved from Gracenote
    If none of these have worked (and almost everything I've seen suggests you should be OK by this point), you may have an issue with the installation and configuration of iTunes itself.  If you have got this far, see turingtest2's notes on Troubleshooting issues with iTunes for Windows updates for advice on how to remove and replace of all components of iTunes.

  • Can not make network user accounts

    After upgrading from 10.6.8 Server to 10.8 and installing server tools, I can not make network user accounts.  All of my old network user accounts migrated to the new OS and work properly, I just can not seem to make new accounts under 10.8.
    Under 10.6.8 I would log into Workgroup Manager as diradmin and I could pretty easily make new users.
    Under 10.8.2 I launch the server app and click on "users".  The addition (+) symbol in greed out for making new users.  I can make local users via System Preferences, but I can not see any way to change local users to network users via either System Preferences or the Server app.
    I have logged into the server app using a local administrator account, the diradmin account, and the root account.  None of the accounts allow access to create new network users (addition symbol is greed out).
    Is there a trick to making network users in 10.8 that I am missing?
    (as an aside, I have noticed I can log into Directory Utility as diradmin and can view the node with all my network accounts.  It seems like I might be able to manually create a user account this way, but I'm not quite sure how to make the user record)

    Open Directory service is started and functional for all the pre-existing network user accounts that were made under 10.6.8 and earlier.  I just can not seem to create new netowork user accounts.
    I followed the steps on this page and managed to make a user record that appeared as a network user in the Server app, but I still can not seem to log in under the user I made in this fashion (dscl command via terminal).
    http://www.deadmarshes.com/Blog/20111105010130.html

  • [solved] Bash shell... does not start with user name, but used to...!

    when I start a console, logged in as user, it always used to start with
    user@hostname ~$
    Suddenly, and I cannot recall having done anything that could lead to the issue, konsole will always start as
    bash3.2$                                                     
    even after many reboots, this is still the case.
    whoami shows my user name. I can su to root, and from there to my username, but never directly from bash.
    Occasionally, starting a program like KDE partition manager fails with the error message the program su could not be found. but it is as I said occasional.
    I am quite a newbie to Linux, so I am clueless. Can someone help me..? I tried googling, but I seem to be the only one in the WWW that goofed up to such an extent..! and searches are quite unrevealing.
    I am installing Linux From scratch using arch linux as base system, but I am just following The Book to the letter and don't think that caused the problem.
    Last edited by jaydoc (2009-01-26 09:12:56)

    @weasel8...
    That is THE trouble. And I take back my words, it was during the linux from scratch install that I botched that file...! I was supposed to make a new bashrc file in the LFS directory, but I went wrong on the commands and I think I ended up removing the Arch Linux file...!
    If it is to be found, it should be in the etc directory, right..? I looked there and could not find it. Did I look in the right place...?
    What can I do...?
    Last edited by jaydoc (2009-01-26 07:33:14)

  • How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    So what is your question?
    If you forgot your encryption password:
    Warning: Make sure it's a password you will remember or write it down for safekeeping. If you encrypt an iPhone backup in iTunes and forget your password, you can't restore from backup and your data will be unrecoverable.
    If you can't remember the password and want to start again, you must perform a full software restore and chooseset up as a new device when iTunes prompts you to select the backup from which to restore.
    The above comes from here:
    http://support.apple.com/kb/HT4946

Maybe you are looking for

  • CVD IMPORT

    hi I amfacing problem in import purchase CVD value is Imposing on material value (i.e it in non cenvatable & is should be cenvatable it should not added to material value because we take CENVAT credit for CVD amount ) entries are like this Creation o

  • How do I add widescreen to a moving pic that doesn't adjust with the pic?

    If anyone knows that would be great. I need to add a widescreen filter to several moving photos. But something so the borders don't adjust when I zoom in and out of the photo. thanks

  • Financial reports 9.2.0

    HI, How to get the level0 and level1 memebrs hirarchy in a data row. I have taken decendants of customers , I am getting the level1 members fallowed by level0 members. In the report I want to show them as a hirarchy. Thanks, Satya

  • Infopath form load rule not working in browser forms but works on Client

    Hi I am working on an Infopath form and there are rules on form load. The form load checks for a value in a list, if the username() matches the one in the list, then the form would change its view. It works when I open it on client, but on the browse

  • Can't get authorized to use CS5; PS 6.0; PS 7.0 on new computer

    Can't get authorized to use CS5; PS 6.0; PS 7.0 on new computer.