Renaming a schema name and full priveleges

Hi,
1) it possible to rename a particular schema in oracle 9i.For example the existing schema name is xyz,i want it to be renamed to abc.I dont want to do it using exp/imp.Any help will be appreciated
2)Secondly is it possible to give full rights on one schema to another schema by giving single command or any alternative.
For example
Schema A should full rights on Schema B objects (i.e insert,delete,execute,create etc)
regards
Vijay

Hi,
1) it possible to rename a particular schema in oracle 9i.For example the existing schema name is xyz,i want it to be renamed to abc.I dont want to do it using exp/imp.Any help will be appreciatedYou can't rename a schema so i think only better available way is export import
2)Secondly is it possible to give full rights on one schema to another schema by giving single command or any alternative.Yes you can create a script using following commands on sqlplus
set lines 200
spool c:\grants.sql
select 'grant '||privilege|| ' to NEW_USER;' from dba_sys_privs where grantee='ACTUEL_USER_WITH_RIGHTS'
UNION
select 'grant '||granted_role|| ' toNEW_USER;' from dba_role_privs where grantee='ACTUEL_USER_WITH_RIGHTS'
UNION
select 'grant '||privilege|| ' on '||owner||'.'||table_name||' to NEW_USER;' from dba_tab_privs where grantee='ACTUEL_USER_WITH_RIGHTS';
spool off;
@c:\grants.sqlSalman

Similar Messages

  • Need to know schema name and table name associated with a column-URGENT

    Hi folks,
    I need to know the schema name and the table name associated with a column. Though jdbc has the api to getTableName and getSchemaName, some database vendor like oracle does return empty upon call of mentioned methods. I found that oracle driver does not support that ……
    Can any one give me the solution? It is urgent. Or do you suggest any third pary jdbc driver which can provide those?
    Thanks
    Angelina

    Angelina,
    Your question has been discussed several times previously in this forum. Search this forum's archives for "getTableName". Oracle JDBC driver does not implement this (because "it is not feasible" -- according to Oracle).
    First of all, I would suggest that you could probably change your application's logic so that you would not need this functionality (but I guess that is not feasible either, right :-)
    Alternatively, you could try querying the Oracle database data dictionary.
    Good Luck,
    Avi.

  • How to Rename the technical name and description of an infocube?

    Hi,
    How to Rename the technical name and description of an infocube?
    Thanx in advance,
    Ravi.

    Ravi,
    You cant change the Technical name of the cube but you can change the description of the Cube. If you want to have a Cube with the same properties and with different Techname and Description better you do copy from the base cube and rename as per your requirement.
    Regards,
    Gattu.

  • Query to rename a Schema name

    I have the permission of DBA.
    I want the query to rename a Schema name from abc to xyz
    Please help me
    Thanks,

    Do a user-level export of user X
    create new user A
    import system/manager fromuser=X touser=A
    drop user X

  • Schema name and object name quoted together in MRU after v3 to v4 upgrade

    After upgrading from v3 to v4 an app has a system generated Multi Row Update function that is broken;
    PL/SQL : ORA-00972: identified is too long
    declare
      function x return varchar2
      is
      begin
        begin 
          for c1 in ( select "MY_SCHEMA.MY_SEQUENCE".nextval pk from dual ) loop
           return c1.pk;
          end loop;
        end;
        return null;
      end;
    begin
      dbms_output.put_line(x);
    end;Note the Schema Name and the Object Name have been quoted together!
    Is this a known issue and do you know of a fix?
    Many thanks in advance
    Craig

    Hi Craig,
    this problem is not known so far.
    I had a look at the code and that change has been made because of multi byte support for sequence names and because of security reasons.
    We try to avoid breaking changes in applications, but it looks like we haven't expected that developers are specifying sequence names prefixed by the schema name.
    Maybe the following workaround is feasible for you:
    1) Find all tabular form columns which are using a sequence with a schema prefix as primary key source
    select *
      from apex_application_page_rpt_cols
    where primary_key_column_source_type = 'S'
       and instr(primary_key_column_source, '.') > 0;2) Go to that tabular form column and remove the schema prefix
    3) If the sequence is really in a different schema than the parsing schema of your application, create a synonym for it.
    Hope that solves your problem.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Workflow with images,file names and full captions.

    I am working on my mother's memoirs, which will include a block of photo pages.  Those pages will be laid out by a friend.  I would like to use a contct sheet of some kind as a reference to what is to be included with what caption but am discovering just how difficult PE8 Organizer is to work with.
    First I tried the obvious print contact sheet and discoverd that captions are truncated if they run wider than the image itself.
    Secondly I tried a photo book and found that large images do not automatically resize to fit the picture placeholders. Seemed to pick up full caption but I have too many pictures to manually fit.
    Third I tried a web page output but then captions can't be copy and pasted for inclusion into group caption panels!
    Then it occurred to me that even just a list of file names and captions would be sufficient ... but even that is too much for an Adobe catalog to give up!
    All I want is a reference to images and captions, ideally grouped 4 at a time per page as they will be shown in those picture pages.
    Any suggestions would be welcomed.

    I can see two ways to do what you want.
    The first one is to divide you workflow in two steps. Install the free software FastStone image resizer, which can do a batch to resize and put your caption where you want. Batch process the files in a new folder while renaming them with something like 'old name'+ 'resized'. This is to avoid duplicate names. Import them into the organizer. Create an album with all those files, and put them in the correct printing order. Select all and export 'as new files' renaming them with 'common base name', in original format. That should keep the custom order of your project.
    There are also batch renaming and resizing with the affordable Elements+ add-on, but I suppose the first solution will be easier.

  • Renaming a Schema name

    Hi,
    Is it possible in oracle to rename a Schema?
    or
    Is it possible in any other SQL language like t-sql,mysql etc?
    Thanks
    Aravindh

    I think No,
    What you can do is export the schema to a different user name(your desired username)
    It all works on export and import.
    Thanks,
    Ganesh.

  • Ho to get file name and full path of a local file

    I want to be able to get the file name and it's full path of
    a local file. I was thinking of using "FileReference" but
    FileReference doesn't permint accessing the local file path. Can
    anyone suggest a way of doing this.
    Thanks

    You will have to create 2 different versions.
    See this example we have created using JSystem
    http://jsystem.flashjester.com
    Download the example file provided.
    Hope this helps.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • Rename database Schema

    Is they any method to rename database schema name apart from taking export and import uitlities.
    Eg:- Alter user rename xx to yy;

    No and it bugs the hell out of me! Like you say
    you'll either have to use the fromuser - touser
    syntax in import or the remap_schema option in
    datapump. Another annoyance are the inflexibility of
    oracle privileges. I want a simple command to say
    grant insert on all tables in a particular schema
    without having to list them out using object
    privileges or using the ANY syntax meaning that a
    user can insert into any schemas table.But this is what roles are for. You create the role and grant the role to the user.
    With a bit of pl/sql it would be quite straightforward to create a role which had all the tables in a schema.

  • How to get uploaded file name and path in BefExportToDat event script

    I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
    - The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
    - The API variable RES.PstrFilename is returning nothing
    I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
    Please let me know how this might be achieved.

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

  • Policy name and column name inside a policy function

    I have the following function associated with a policy in the employee table for SSN and SALARY columns
    FUNCTION empid_policy_fn (object_schema IN VARCHAR2, object_name VARCHAR2)
    end;
    When the policy fires, the schema name and the name of the table are passed onto this function which we can use inside this function but is there a way to get the policy name and the column name which invokes this function?. The problem here is, I'm using same function (common) for multiple policies in different tables and that's why I need to get these details.
    Thanks
    -Krishnamurthy

    Inside your policy function you can query V$VPD_POLICY along with V$SESSION, V$SQL and USER_SEC_RELEVANT_COLS
    to get the fired policy name and column_names.
    Something like
    SELECT v.POLICY, .........
                   FROM v$session ss, v$sql s, v$vpd_policy v
                  WHERE ss.SID = (SELECT SID
                                    FROM v$mystat
                                   WHERE ROWNUM = 1)
                    AND s.address = ss.sql_address
                    AND s.address = v.paraddr
                    AND s.hash_value = v.sql_hash
                    AND s.child_number = 0HTH

  • Missing schema names in sqlj generated for packages

    We are using jpub, version 8.1.6.0.0 Production to generate code for ~100 packages and objects.
    We are creating a connection other than the schema owner, and have prefixed all the lines in our input file with the schema name and a period. We AREN'T using the "omit_schema_names" option
    The generated .sqlj code for objects includes a line like:
    public static final String SQLNAME = "GHMINT.WD$DISPATCHER_CHNG_TRIP_OBJ";
    where "GHMINT" is the schema we want.
    HOWEVER, the generated .sqlj code for package methods includes code like:
    #sql [_ctx] __jPt_result = { VALUES(WD$SECURITY.USER_LOGIN(
    with no schema indication, and we would get errors complaining about undeclared identifiers.
    We have a workaround that involves a sed script that inserts the schema info in the appropriate places, but this seems like a bug in jpub.
    Comments, RTFMs, or pointers to a newer version would be appreciated.
    Thanks,
    null

    Thank you for pointing out this oversight. It will be fixed promptly.
    A. Thiesen, JPublisher development

  • Passing schema name at runtime in batch file

    I am having a batch file where i am prompting users to tell the schema name to which they wish to connect at runtime. I am calling one .sql fil within that batch file to execute where i need user to connect to the specific schema at runtime
    My batch file looks like as
    set serveroutput on;
    set linesize 500;
    set scan on;
    spool test_bat.log
    Accept a PROMPT 'Enter the schema name you wish to connect: '
    Accept a_pw PROMPT 'Enter the password?: ' HIDE
    Accept a_connstr PROMPT 'Enter the connect string : '
    conn &a/&a_pw@&a_connstr
    Now after getting connected to the specified schema i would like to call some .sql file within the batch file which seems to be as
    select count(*) from <schema entered above>.table_name
    I want to use the above schema name (a) to get data from the tables.
    Please let me know how to get this.
    Thanks

    user11200661 wrote:
    That's fine but still i want to prefix the schema name within the .sql file. My .sql should contain the name of that parameter only as i want to get that parameter replaced by the schema name at runtime. Some other users are using the same .sql file and they have access to that specific schema only. i want to make the .sql file more general so that it can be used by everyone without altering it every time.Sorry, your requirement no longer makes sense.
    If people have to access a specific schema because they need the script for general use, then you will have to hard code the schema name into it.
    If the script is to prompt for the schema name and connect to that schema and then use that schema name inside the called sql script, then people would not be able to use it generically, as it would be reliant upon the schema name being passed in.
    It sounds as if you're trying to write one generic thing that needs to do two different tasks.
    Just have two scripts and make life simple.

  • I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings?

    I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings? Please help. Thanks.

    You should have asked this before you tried: Changing username or short name- User Account and Short Name- OS X- How to change user account name or home directory name.

  • Schema name not present on filename for "Save Package Spec and Body"

    In versions previous to 3.0 EA, the filename defaulted to schema.object.sql when using the "Save Package Spec and Body" on the right click of the package/body. This appears to have disappeared. Also, it now defaults to the .PLS ext/type, which I prefer to save them as .SQL (which i can override, but it would be nice in the file type dropdown). Also, I had posted a suggestion about the actual file not including the schema name prefixing the object name when using the "Save Package Spec and Body". i.e. it does create or replace package reader_package instead of what it should be doing which is create or replace package schema.reader_package

    Would be nice indeed having the real name as default, and all supported PL/SQL types (as in the preferences) in the extensions dropdown.
    As for the schema name inside, I reckon that would do damage for more users than it would do good for others. But a preference would be best of course.
    K.

Maybe you are looking for

  • Copy financial data and documents into a new version

    Hello, Does anybody know whether is possible to copy from one version into a new one all financial data (including all posting levels) as well as all documents (including all posting levels). There is a copy task where it is possible to copy financia

  • Unable to update records in Plan

    Hi I am trying the example oracle bam integration with Oracle AQ/Database As while updating myplan in design studio I am not getting any error but data also not inserted in my grid. when I hit update after 2 mins its displaying updated(2 min 33 secon

  • Confusion about BI Publisher and Dashboards

    Hi All, I am new in BI EE. I create a report in BI publisher and after that I want to publish that report in BI Dashboards...Here my confusion is start, I create repository to the required schema,Now I need to build report again in BI answer?? and th

  • "Theme Center" installation and use.

    Hi there, I own Vibe X2 CU edition, I needed the two SIM option. I found out that the "Theme Center"is different for the CU editon and the EU edition and pobably for the AP and TO one as well. I would like to have the EU version of the application. I

  • Correction to PO release strategy

    Dear All, We have PO release strategy configured and working fine. Now there are ammendments happend in the PO release strategy i.e. the value limits are changed also new levels are introduced which will be effectivef fro a particular date. I want to