Insufficient privileges when creating MV with alter session set current_sch

I am getting Insufficient privileges when creating MV with alter session set current_schema=Application schema name. User running the alter session is DBA user. If run as SYSDBA, MV is created successfully. DB Version is 10.2.0.3
I observed similiar issue with regular View also in 9.2.0.6 also.
Any advice is greatly appreciated.
Thanks,
Siva

Sounds like your management needs a stern lecture on the concept of change management. <g>
I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
A. Is more in line with good change management practices.
B. Works.

Similar Messages

  • 4.0 EA2 - Insufficient Privileges When Creating Object With Proxy

    When I have connected by proxying to another user, I receive the following message when trying to create a new object:
    The database user has insufficient privileges for the given operation.
    Steps to reproduce:
    Connect by proxying to another user
    Right Click on Views
    Select New View
    I noticed this under EA1, though, not sure if reported.  This worked under 3.2.2

    Sounds like your management needs a stern lecture on the concept of change management. <g>
    I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
    A. Is more in line with good change management practices.
    B. Works.

  • Insufficient Privileges when create materialized view as user system

    If I login as system (connect sys/****@DevDB) and try to create a materialized view for another schema (e.g. XDCONTROLDB), I get the insufficient privileges error. If I login as sys as sysdba then I can create successfully.
    I have searched some ariticles in Google and grant create any snapshot, create any table, create any view, global query rewrite, select any table system privileges to system but still get the same error.
    Any other privileges I need to grant to system?
    Cheers
    below is a sample script to create the view which get the error:
    CREATE MATERIALIZED VIEW XDControlDB."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT * From XDControlDB.RiskInstance;
    Message was edited by:
    user500168
    Message was edited by:
    user500168

    Thanks for your reply. After I grant privileges to system, I login as system and try to create the view as below which I get the insufficient privileges error:
    CREATE MATERIALIZED VIEW XDControlDB."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT 1 From XDControlDB.RiskInstance;
    As you can see, I try to create the view under a schema called 'XDCONTROLDB'. If I login as sys as sysdba, then it create successfully.
    After I create UserA, and grant the privileges I mentioned in the ealier post, I login as UserA, and run the statement above I get the same privileges error. But if I change the stament to below which will create the view under UserA's schema, then it create successfully:
    CREATE MATERIALIZED VIEW UserA."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT 1 From XDControlDB.RiskInstance;
    Looking for your suggestions,
    Cheers

  • ORA-01031: insufficient privileges when creating a table in other schema

    Dear all,
    I appreciate your help please in this issue :
    when i try to issue the below statement to create a table in an another schema than the user i am connected in
    CREATE TABLE SCHEMA_NAME_B.HST_ARCH nologging AS
    SELECT *
    FROM HST
    WHERE 1 = 0;
    I always get ORA-01031: insufficient privileges error, even if i have granted the create table privilege to the user i am connected in.
    What other privileges should i grant also,
    Please if you have any idea.

    user562674 wrote:
    Dear all,
    I appreciate your help please in this issue :
    when i try to issue the below statement to create a table in an another schema than the user i am connected in
    CREATE TABLE SCHEMA_NAME_B.HST_ARCH nologging AS
    SELECT *
    FROM HST
    WHERE 1 = 0;
    I always get ORA-01031: insufficient privileges error, even if i have granted the create table privilege to the user i am connected in.
    What other privileges should i grant also,
    Can you show us a cut/paste from the sql*plus of session of yours which should show that you have given the privilege directly to this user and after that the command fails?
    Aman....

  • Insufficient privileges when creating user logged in as SYS

    Hi,
    I'm working on 11.1.0.6.0 Enterprise Edition, Advanced Security options, Label Security a and Database Vault installed. (for testing purposes)
    I'm creating a new user being logged as SYS using this sentence:
    CREATE USER "HR_DIRECTOR" PROFILE "DEFAULT" IDENTIFIED BY "*******" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
    However, the command fails with the message "Failed to commit: ORA-01031: insufficient privileges . You do not have enough privileges to perform this operation. You must have the appropriate system and object privileges to create, edit, or drop database objects or objects outside of your schema."
    Please note that I'm working on a fresh DB install and I have also installed Database Vault in this instance for testing purposes, but still haven't configured any realm or command rules on it.
    Is it possible Vault is the reason why I am not able to create a new user?
    Thanks and Regards,
    Leandro

    Hi, It seems I've found it.
    After you install Database Vault and associate it with your SID, SYS user is revoked the CREATE USER system privilege.
    Only a user with the DV_ACCTMGR role may create, alter or drop a user. This is done in order to separate responsabilities in your database. A SYS user cannot grant himself this role or the DV_OWNER role.
    (If interested, check page 10-4 from http://www.oracle.com/pls/db111/to_toc?pathname=server.111/b31222/toc.htm)
    Regards,
    Leandro

  • Insufficient privileges while creating EUL

    Hi All,
    I am trying to create a new EUL in Discoverer 9.0.4. Option "Select an existing user" is selected and "Grant access to Public" is unchecked.
    I am connected as user A. The tables are in schema for user B. So I selected the user B and entered the password. When I click "Finish", I get the following error:
    Insufficient privileges to create a new user or grant the necessary privileges to an existing user. You must have CREATE USER, ALTER USER and GRANT ANY PRIVILEGE privileges.
    Now user A does have privileges to create role, view, table, session, sequence, procedure. User B too has these privileges plus a few more.
    Can somebody help me with what privileges am I lacking? For which user, A or B?
    Thanks.

    If you want to create an EUL the user you select (B in your case) must be the following privilegies:
    CREATE SESSION
    CREATE USER
    GRANT ANY PRIVILEGE
    ALTER USER
    It doesn't matter the user you are connected in Discoverer.
    Hope this helps.

  • Create view and alter Session gets 0RA-01031

    I can't create a view after using ALTER SESSION set current_schema without using an explicit schema. I get ORA-01031. Is this a known bug? Here are the details:
    1. Log on as SYSTEM
    2. ALTER SESSION set current_schema=FRED;
    3. CREATE VIEW vFoo as select * from Foo;     -- ORA-01031: insufficient privileges
    4. CREATE VIEW FRED.vFoo as select * from Foo;     -- this works!
    I've read where some privileges need to be granted directly. In fact, if Fred grants select privilege on Foo to SYSTEM, the statement in #3 above works. However, something doesn't seem right because why does #4 succeed without the GRANT?
    In case you're wondering why I don't just use #4 above, which does work, it's because I've got a script that will be run by customers to create tables, views, etc. in an arbitrary schema and the schema is associated with a user with limited permissions. Hence, the use of the ALTER SESSION.

    See, You looged as SYSTEM (Scheme = SYSTEM)
    Now you alter your session to another schema FRED.
    Now if you want to access SCHEMA of FRED, You need to connect first.
    SQL > connect user/password@host
    Then
    SQL > CREATE VIEW vFoo as select * from Foo;
    View created.

  • Insufficient privilege when Activating an attribute view (person responsible for package = SYSTEM)

    Insufficient privilege when Activating an attribute view (person responsible for package = SYSTEM)
    SAP HANA Studio
    Version: 1.0.33
    Build id: 201206301604 (363996)
    Playing with the efashion tutorial with HANA Studio.
    I am SYSTEM user by default when starting the studio.
    -Schema created
    -DDL created
    -Data loaded
    -Attribute views created
    Below an extract of the error log:
    <info>Create Attribute View failed: SQL: transaction rolled back by an internal error: insufficient privilege: Not authorized

    Hello Anooj and Sri,
    Thank you for your answers, I really appreciate your inputs.
    So I executed this:
    "GRANT SELECT ON SCHEMA SYSTEM TO _SYS_REPO WITH GRANT OPTION;"
    Under the Studio SQL GUI and I still have the same error when activating my very simple attribute view.
    I have installed a recent HANA + Studio + Client release on my laptop:
      SAP HANA Studio
    Version: 1.0.33
    Build id: 201207050531 (364183)
    And yes, this is a demo and yes I am logged as the SYSTEM user (default user when stating the studio). For now, I dont know how to connect to another user with the studio and I will search the doumentation.
    Below a copy/past of the error msg.
    Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Attribute View: SQL: transaction rolled back by an internal error: insufficient privilege: Not authorized (ptime/query/plan_executor/ddl/qx_cube.cc:1514) n
    Create view DDL statement: CREATE COLUMN VIEW "_SYS_BIC"."efashion/ATV_OUTLET_LOOKUP" TYPE JOIN WITH PARAMETERS ( joinIndex = "EFASHION_TUTORIAL"."OUTLET_LOOKUP", joinIndexType = 0, viewAttribute = ('SHOP_ID', "EFASHION_TUTORIAL"."OUTLET_LOOKUP", "SHOP_ID", '', 'default', 'attribute', '', 'efashion/ATV_OUTLET_LOOKUP$SHOP_ID'), viewAttribute = ('SHOP_NAME', "EFASHION_TUTORIAL"."OUTLET_LOOKUP", "SHOP_NAME", '', 'default', 'attribute', '', 'efashion/ATV_OUTLET_LOOKUP$SHOP_NAME'), viewAttribute = ('MANAGER', "EFASHION_TUTORIAL"."OUTLET_LOOKUP", "MANAGER", '', 'default', 'attribute', '', 'efashion/ATV_OUTLET_LOOKUP$MANAGER'), viewAttribute = ('ZIP_CODE', "EFASHION_TUTORIAL"."OUTLET_LOOKUP", "ZIP_CODE", '', 'default', 'attribute', '', 'efashion/ATV_OUTLET_LOOKUP$ZIP_CODE'), viewAttribute = ('CITY', "EFASHION_TUTORIAL"."OUTLET_LOOKUP", "CITY", '', 'default', 'attribute', '', 'efashion/ATV_OUTLET_LOOKUP$CITY'), view = ('V_OUTLET_LOOKUP', "EFASHION_TUTORIAL"."OUTLET_LOOKUP"), defaultView = 'V_OUTLET_LOOKUP', 'REGISTERVIEWFORAPCHECK' = '1' )nVersion: 48n
    Thank you.
    Patrick

  • Insufficient privileges to create the RDF NETWORK

    Hi,
    I am using user scott to test a rdf database using oracle 11.2.0.2 contained in oracle developer days. I granted resource, create session, create table, and create tablespace to scott. I am able to create a tablespace under scott. I also used the OEM panel to grant many privileges in roles, system privileges and object privileges to scott. However, I am still not able to create the rdf network under scott. The error says insufficient privileges to create the RDF NETWORK. How can I grant a priviledge to scott to create a rdf network? Thanks a lot.
    hong

    Hi Hong,
    Yes. This is the correct order. You must first create the semantic network as a user with DBA privileges. After that, you can create semantic models with a less privileged user.
    You can find more information in the Quick Start Section of the user guide:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25609/sdo_rdf_concepts.htm#CHDEDFFA
    Hope this helps,
    Matt

  • Getting ORA-01031: Insufficient privileges when connecting as sys as sysdba

    Hi There,
    I am running Linux AS version 4, oracle 102.0.1, and logginging as oracle user which belongs to dba group. I got error "ORA-01031: Insufficient privileges" when trying to connect as sys user to bring up database. I wondered what is causing the error. Here is an example
    oracle-dev>sqlplus /nolog
    SQL>conn as sys/oracle@dev as sysdba
    ERROR:
    ORA-01031: Insufficient privileges
    Any suggestions would be greatly appreciated. Thanks again.
    Rich,

    Did you create a password file ?
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b15658/admin_ora.htm#sthref142
    Message was edited by:
    Paul M.
    BTW, the syntax is
    SQL>conn sys/oracle@dev as sysdba

  • Problem when creating Database with Database, OS and hardware Configuraiton

    Problem when creating Database:
    There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    user563502 wrote:
    I am working on Solaris 8. What is Alert_SID.log? where can I find it?
    ThanksFor the responsible of the upgrade of Oracle database, not even know what Alert log is?
    to be honest with you, this is not your work.

  • Error when creating PO with reference to PR

    Hello Expert,
    When creating PO with reference to PR I encountered with one error i.e. system is taking into consideration one to one relation of PR line item to PO line item. For example: I have created PR with one line item for XYZ value and with reference to PR line item I am creating one PO but with two line items in PO that means I am splitting PR value into two line items in PO, 1st line item with zero tax and second one is with tax.
    So there is one PR line item but in PO I am creating two line items with reference to single PR item. In this case system is giving error saying Item 001 WBS element XXXXXXXXXX budget exceeded. message no: BP604. However if I create single line item in PO then it wont give any error.
    Please suggest any customization setting is done for such kind of behavior of the system.
    Thanks
    Shyam

    Hi,
    SAP creates the requisition with item category "U" even in case of cross-company (intercompany) purchase requisition.
    When converting it to PO the item category becomes blank - as I tried and I got no error message.
    Please check your settings under SPRO > MM > Purchasing > Purchase Order > Define Document Types (V_T161). You will see (if standard settings have not been changed) that NB requisition type with "U" item category is allowed for NB purchase order type with " " (empty) item category.
    Regards,
    Csaba

  • Primary key when creating reports with forms

    I'm new to APEX and I'm creating a report with forms using the wizard. I've checked the 'Include Analysis Pages' checkbox. When I select the 'add pages' button I get the following message:
    Table has no primary keys defined. A primary key is required when creating reports with forms.
    I know that the table does have a primary key because I defined it and also it is visible in the Sql workshop / Object browser and Toad.
    Am I missing something or is this some sort of bug?
    thanks
    sb

    You're missing something. This message means you've not told APEX what the primary key is. You shouldn't have been able to get passed the page in the wizard that asks for it though. Can't describe where it prompts for it from memory, but it shouldn't be hard to find.
    HTH
    Chris.

  • Why many sessions with alter session statements?

    Currently we are using Oracle 8.1.7 on Tru64Unix and connect with this database via OC4J904. We find many inactive sessions indicated with the SQL statement:
    ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
    But nobody explicitly issues this statement. How does this occur?

    What is your NLS_DATABASE_PARAMETER 'NLS_LANGUAGE'?
    For example:
    SQL> SELECT * FROM NLS_DATABASE_PARAMETERS
    2 WHERE PARAMETER = 'NLS_LANGUAGE';
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    What is the value of the environment variable 'NLS_LANG' for your session?
    On my computer it is:
    AMERICAN_AMERICA.WE8MSWIN1252
    You can find some useful information here:
    http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10749/ch3globe.htm#1006332

  • Date format with alter session -- very urgent !!!!

    The default format of date is DD-MON-YY.
    I like to change as DD/MM/YYYY. So I tried to do so by going
    through my login in SQLPlus and wrote
    ALTER SESSION
    SET NLS_DATE_FORMAT = 'DD/MM/YYYY'.
    The format got changed and there after every query displayed
    date in dd/mm/yyyy format. But once I exit sqlplus and reenter
    in sqlplus, the format goes away and the default date format i.e
    dd-mon-yy comes in existence.
    I want to know, how can i make my date format permanent and too
    for all users.
    null

    hello Khan,
    You can set this format in 2 ways, one is
    local setting and the other one is on server setting.
    Edit your c:\windows\oracle.ini (local setting)
    or your init.ora (oracle server setting)
    and add this script
    SET NLS_DATE_FORMAT = 'DD/MM/YYYY'
    note: if there's no nls_date_format in oracle.ini, the server
    nls_date_format in init.ora will be the current setting
    on your PC
    Hope this will help
    NEC PHIl.
    Shamsad Khan (guest) wrote:
    : The default format of date is DD-MON-YY.
    : I like to change as DD/MM/YYYY. So I tried to do so by going
    : through my login in SQLPlus and wrote
    : ALTER SESSION
    : SET NLS_DATE_FORMAT = 'DD/MM/YYYY'.
    : The format got changed and there after every query displayed
    : date in dd/mm/yyyy format. But once I exit sqlplus and reenter
    : in sqlplus, the format goes away and the default date format
    i.e
    : dd-mon-yy comes in existence.
    : I want to know, how can i make my date format permanent and
    too
    : for all users.
    null

Maybe you are looking for

  • Can´t download photos to my iPOD

    I bought recently an iPOD 5th gen. of 30 gyg, and successfully download the music from my i-tunes (around 6gyg of music) into the iPOD, BUTTTT... whe try to download my photos (dirctly from my image, and recently with adobe photoalbum 3.0), the iPOD

  • Precalculation of WebTemplates

    Hi all,    We have a BI 7.0 Web Template with two variables. I want to use Precalculation for it with all the Variable Values and then Publish it into Portal. I have few gaps and doubts about the procedure to carry it out. 1. Is it necessary to insta

  • Replacement battery from recall worse than old one

    I received my replacement battery, which I assumed would be new, but it is not doing a very good job of keeping a long charge. Whereas my old battery could give me over 3 hours if I optimized my settings, my new one barely gives me 2. Anyone else get

  • XP Home edition

    Hi, I have XP Home edition and have tried to setup a testing server to no avail. Do I need to purchase XP Professional before this will work? I have also installed Apache and that still did not allow Dreamweaver to find the testing server. I would re

  • Reading ibook's with no wifi access?

    can i read an book on ibooks once i've downloaded it in an area where I have no Wifi access?