Insufficient privileges in Foreing Key

I created a table in user2 schema (Oracle 8.1.5)
Create table test (company number(2));
Then i try to add a foreing key
ALTER TABLE test
ADD ( FOREIGN KEY (company)
REFERENCES otheruser.COMPANY);
I always get the ORA-01031 error (insufficient privileges)
user2 is DBA and otheruser too. I tried all the grant options...
Can anyone give me a detail script...
Thanks.
Antonio

I think you are not having alter any table privilege, Any how
here is the syntax:
Alter table test add constraint fk_test foreign key(company)
references otheruser.table_name(col_name);
Regards,
G. Rajakumar.

Similar Messages

  • Foreing key between schemas

    I'm trying to create a foreing key constraint, between tables in diferents schemas. but i get ora-01031 insufficient privileges error, which is the system privilege that i need?

    At data base level you cannot do that.
    But in the form you can create a master/detail relation ship.

  • ORA-01031: insufficient privileges and shared memory realm does not exist

    Hi all,
    I came to a dead end to start oracle 10.2 database. I have searched on google and this forum, none of these solutions work for me. PS, I have installed 11g on my machine too.
    I have set up ORACLE_SID,ORACLE_HOME to 10.2 database based on the tnsnames.ora.
    follow is error message:
    sqlplus sys as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:09:54 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:10:55 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn / as sysdba
    ERROR:
    ORA-01031: insufficient privileges
    SQL> conn scott/tiger
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    First I thought the instance has been start yet, but since I can't login with sysdba. I don't know what other options.
    For 10.2, the tnsnames.ora
    ORA102 =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = ora102)+
    +)+
    +)+
    LISTENER_ORA102 =
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /data/oracle/ora102)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    (ADDRESS = (PROTOCOL = TCP)(HOST =XXXXX)(PORT = 1523))
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )

    try do this steps on server side:
    1) sqlplus sys as sysdba
    2) select open_mode from v$database;
    show result 2 step

  • ORA-01031: insufficient privileges when connecting by SQL PLUS 8.0 with sys

    From client, I use SQL PLUS 8.0 to connect to server: sys/password@MYDB1 as sysdba
    The error always raises “ORA-01031: insufficient privileges”
    I have done:
    - Set: remote_login_passwordfile=exclusive in tnsname.ora file
    - Uncomment: SQLNET.AUTHENTICATION_SERVICES in “sqlnet.ora” file
    Also on this client:
    to use SQL PLUS 8.0 to connect to server: manager/password@MYDB1. To connect normally
    to use PLSQL Deverloper (it is the same oracle_home with SQL PLUS 8.0) to connect to database normally with user sys.
    To use Enterprise manager console (it is other oracle_home with SQL PLUS 8.0) to connect to database normally with user sys
    Please, help me to solve this trouble

    THIS IS CONTENT OF SQLNET.ora CLIENT
    # copyright (c) 1996 by the Oracle Corporation
    # NAME
    # sqlnet.ora
    # FUNCTION
    # Oracle Network Client startup parameter file example
    # NOTES
    # This file contains examples and instructions for defining all
    # Oracle Network Client parameters. It should be possible to read
    # this file and setup a Client by uncommenting parameter definitions
    # and substituting values. The comments should provide enough
    # explanation to enable a reasonable user to manage his TNS connections
    # without having to resort to 'real' documentation.
    # SECTIONS
    # ONames Client
    # Namesctl
    # Native Naming Adpaters
    # MODIFIED
    # skanjila 06/06/97 - Correct default for Automatic_IPC
    # eminer 05/15/97 - Add the relevant onrsd parameters.
    # asriniva 04/23/97 - Merge with version from doc
    # ggilchri 03/31/97 - mods
    # bvasudev 02/07/97 - Change sqlnet.authentication_services documentation
    # bvasudev 11/25/96 - Merge sqlnet.ora transport related parameters
    # asriniva 11/12/96 - Revise with new OSS parameters.
    # asriniva 11/05/96 - Add ANO parameters.
    # - ONames Client ----------------------------------------------------
    #names.default_domain = world
    #Syntax: domain-name
    #Default: NULL
    # Indicates the domain from which the client most often requests names. When
    # this parameter is set the default domain name (for example, US.ACME), the
    # domain name will be automatically appended to any unqualified name in an
    # ONAmes request (query, register, deregister, etc). Any name which contains
    # an unescaped dot ('.') will not have the default domain appended. Simple
    # names may be qualified with a trailing dot (for example 'rootserver.').
    #names.initial_retry_timeout = 30
    #Syntax: 1-600 seconds
    #Default: 15 (OSD)
    # Determines how long a client will wait for a response from a Names Server
    # before reiterating the request to the next server in the preferred_servers
    # list.
    #names.max_open_connections = 3
    #Syntax: 3-64
    #Default: ADDRS in preferred_servers
    # Determines how many connections an ONames client may have open at one time.
    # Clients will ordinarily keep connections to servers open once they are
    # established until the operation (or session in namesctl) is complete. A
    # connection will be opened whenever needed, and if the maximum would be
    # exceeded the least recently used connection will be closed.
    #names.message_pool_start_size = 10
    #Syntax: 3-256
    #Default: 10
    # Determines the initial number of messages allocated in the client's message
    # pool. This pool provides the client with pre-allocated messages to be used
    # for requests to ONames servers. Messages which are in the pool and unused
    # may be reused. If a message is needed and no free messages are available in
    # the pool more will be allocated.
    #names.preferred_servers = (address_list =
    # (address=(protocol=ipc)(key=n23))
    # (address=(protocol=tcp)(host=nineva)(port=1383))
    # (address=(protocol=tcp)(host=cicada)(port=1575))
    #Syntax: ADDR_LIST
    #Default: Well-Known (OSD)
    # Specifies a list of ONames servers in the client's region; requests will be
    # sent to each ADDRESS in the list until a response is recieved, or the list
    # (and number of retries) is exhausted.
    # Addresses of the following form specify that messages to the ONames server
    # should use Oracle Remote Operations (RPC):
    # (description =
    # (address=(protocol=tcp)(host=nineva)(port=1383))
    # (connect_data=(rpc=on))
    #names.request_retries = 2
    #Syntax: 1-5
    #Default: 1
    # Specifies the number of times the client should try each server in the list
    # of preferred_servers before allowing the operation to fail.
    #names.directory_path
    #Syntax: <adapter-name>
    #Default: TNSNAMES,ONAMES,HOSTNAME
    # Sets the (ordered) list of naming adaptors to use in resolving a name.
    # The default is as shown for 3.0.2 of sqlnet onwards. The default was
    # (TNSNAMES, ONAMES) before that. The value can be presented without
    # parentheses if only a single entry is being specified. The parameter is
    # recognized from version 2.3.2 of sqlnet onward. Acceptable values include:
    # TNSNAMES -- tnsnames.ora lookup
    # ONAMES -- Oracle Names
    # HOSTNAME -- use the hostname (or an alias of the hostname)
    # NIS -- NIS (also known as "yp")
    # CDS -- OSF DCE's Cell Directory Service
    # NDS -- Novell's Netware Directory Service
    # - Client Cache (ONRSD) ---------------------------------------------
    names.addresses = (ADDRESS=(PROTOCOL=IPC)(KEY=ONAMES))
    Syntax: ADDR
    Default: (ADDRESS=(PROTOCOL=IPC)(KEY=ONAMES))
    Address on which the client cache listens (is available to clients).
    Any valid TNS address is allowed. The default should be used if at
    all possible; clients have this entry hardwired as the first line
    of their server-list file (sdns.ora). If the address is set to a
    non-default value the client's preferred_servers parameter should
    be set to include the client-cache address first.
    names.authority_required = False
    Syntax: T/F
    Default: False
    Determines whether system querys (for the root etc) require Authoritative
    answers.
    names.auto_refresh_expire = 259200
    Syntax: Number of seconds, 60-1209600
    Default: 259200
    This is the amount of time (in seconds) the server will cache the addresses
    of servers listed in server-list file (sdns.ora). When this time expires the
    server will issue another query to the servers in those regions to refresh
    the data.
    names.auto_refresh_retry = 180
    Syntax: Number of seconds, 60-3600
    Default: sec.     180
    This set how often the server will retry when the auto_refresh query fails.
    names.cache_checkpoint_file = cache.ckp
    Syntax: filename
    Default: $ORACLE_HOME/network/names/ckpcch.ora
    Specifies the name of the operating system file to which the Names Server
    writes its foreign data cache.
    names.cache_checkpoint_interval = 7200
    Syntax: Number of seconds, 10-259200
    Default: 0 (off)
    Indicates the interval at which a Names Server writes a checkpoint of its
    data cache to the checkpoint file.
    names.default_forwarders=
    (FORWARDER_LIST=
    (FORWARDER=
    (NAME= rootserv1.world)
    (ADDRESS=(PROTOCOL=tcp)(PORT=42100)(HOST=roothost))))
    Syntax: Name-Value/address_list
    Default: NULL
    A list (in NV form) of the addresses of other servers which should be used to
    forward querys while in default_forwarder (slave) mode. NAME is the global
    names for the server to which forwards whould be directed, and ADDRESS is its
    address.
    names.default_forwarders_only = True
    Syntax: T/F
    Default: False
    When set to true this server will use the servers listed in default_forwarders
    to forward all operations which involve data in foreign regions. Otherwise it
    will use the servers defined in the server-list file (sdns.ora) in addition
    to any defined in the default_forwarders parameter.
    names.log_directory = /oracle/network/log
    Syntax: directory
    Default: $ORACLE_HOME/network/log
    Indicates the name of the directory where the log file for Names Server
    operational events are written.
    names.log_file = names.log
    Syntax: filename
    Default: names.log
    The name of the output file to which Names Server operational events are
    written.
    names.log_stats_interval = 3600
    Syntax: Number of seconds, 10-ub4max
    Default: sec.     0 (off)
    Specifies the number of seconds between statistical entries in log file.
    names.log_unique = False
    Syntax: T/F
    Default: False
    If set to true the server will guarantee that the log file will have a unique
    name which will not overwrite any existing files (note that log files are
    appended to, so log information will not be lost if log_unique is not true).
    names.max_open_connections = 10
    Syntax: 3-64
    Default: 10
    Specifies the number of connections that the Names Server can have open at any
    given time. The value is generated as the value 10 or the sum of one
    connection for listening, five for clients, plus one for each foreign domain
    defined in the local administrative region, whichever is greater. Any
    operation which requires the server to open a network connection will use
    an already open connection if it is available, or will open a connection
    if not. Higher settings will save time and cost network resources; lower
    settings save network resources, cost time.
    names.max_reforwards = 2
    Syntax: 1-15
    Default: 2
    The maximum number of times the server will attempt to forward a certain
    operation.
    names.message_pool_start_size = 24
    Syntax: 3-256
    Default: 10
    Determines the initial number of messages allocated in the server's message
    pool. This pool provides the server with pre-allocated messages to be used
    for incoming or outgoing messages (forwards). Messages which are in the pool
    and unused may be reused. If a message is needed and no free messages are
    available in the pool more will be allocated.
    names.no_modify_requests = False
    Syntax: T/F
    Default: False
    If set to true, the server will refuse any operations which modify the
    data in its region (it will still save foreign info in the cache which is
    returned from foreign querys).
    names.password = 625926683431AA55
    Syntax: encrypted string
    Default: NULL
    If set the server will require that the user provide a password in his
    namesctl session (either with sqlnet.ora:namesctl.server_password or 'set
    password') in order to do 'sensitive' operations, like stop, restart, reload.
    This parameter is generally set in encrypted form, so it can not be set
    manually.
    names.reset_stats_interval = 3600
    Syntax: 10-ub4max
    Default: 0 (off)
    Specifies the number of seconds during which the statistics collected by the
    Names Servers should accumulate. At the frequency specified, they are reset
    to zero. The default value of 0 means never reset statistics.
    names.trace_directory = /oracle/network/trace
    Syntax: directory
    Default: $ORACLE_HOME/network/trace
    Indicates the name of the directory to which trace files from a Names Server
    trace session are written.
    names.trace_file = names.trc
    Syntax: filename
    Default: names.trc
    Indicates the name of the output file from a Names Server trace session.
    names.trace_func # NA
    Syntax: T/F
    Default: False
    Internal mechanism to control tracing by function name.
    names.trace_level = ADMIN
    Syntax: T/F
    Default: False
    Syntax: {OFF,USER,ADMIN,0-16}
    Default: OFF (0)
    Indicates the level at which the Names Server is to be traced.
    Available Values:
         0 or OFF - No trace output
         4 or USER - User trace information
         10 or ADMIN - Administration trace information
         16 or SUPPORT - WorldWide Customer Support trace information
    names.trace_mask = (200,201,202,203,205,206,207)
    Syntax: list of numbers
    Default: NULL
    Internal mechanism to control trace behavior.
    names.trace_unique = True
    Syntax: T/F
    Default: False
    Indicates whether each trace file has a unique name, allowing multiple trace
    files to coexist. If the value is set to ON, a process identifier is appended
    to the name of each trace file generated.
    # - Namesctl ---------------------------------------------------------
    #namesctl.trace_directory = /oracle/network/trace
    #Syntax: directory
    #Default: $ON/trace
    # Indicates the name of the directory to which trace files from a namesctl
    # trace session are written.
    #namesctl.trace_file = namesctl.trc
    #Syntax: filename
    #Default: namesctl.trc
    # Indicates the name of the output file from a namesctl trace session.
    #namesctl.trace_func # NA
    #Syntax: word list
    #Default: NULL
    # Internal mechanism to control tracing by function name.
    #namesctl.trace_level = ADMIN
    #Syntax: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    # Indicates the level at which the namesctl is to be traced.
    # Available Values:
    #     0 or OFF - No trace output
    #     4 or USER - User trace information
    #     10 or ADMIN - Administration trace information
    #     16 or SUPPORT - WorldWide Customer Support trace information
    #namesctl.trace_mask # NA
    #Syntax: number list
    #Default: NULL
    # Internal mechanism to control trace behavior.
    #namesctl.trace_unique = True
    #Syntax: T/F
    #Default: False
    # Indicates whether each trace file has a unique name, allowing multiple trace
    # files to coexist. If the value is set to ON, a process identifier is appended
    # to the name of each trace file generated.
    #namesctl.no_initial_server = False
    #Syntax: T/F
    #Default: False
    # If set to TRUE namesctl will suppress any error messages when namesctl is
    # unable to connect to a default names server.
    #namesctl.internal_use = True
    #Syntax: T/F
    #Default: False
    # If set to true namesctl will enable a set of internal undocumented commands.
    # All internal commands are preceded by an underscore ('_') in order to
    # distinguish them as internal. Without going into details, the commands
    # enabled are:
    # adddata createname deletename
    # fullstatus ireplacedata newttlname
    # pause                 remove_data renamename
    # replacedata start                 walk*
    # There are also a set of names server variables which may be set when
    # namesctl is in internal mode:
    # authorityrequired autorefresh*
    # cachecheckpoint_interval cachedump
    # defaultautorefresh_expire defaultautorefresh_retry
    # defaultforwarders_only forwardingdesired
    # maxreforwards modifyops_enabled
    # nextcache_checkpoint nextcache_flush
    # nextstat_log nextstat_reset
    # reload                         request_delay
    # restart                        shutdown
    #namesctl.noconfirm = True
    #Syntax: T/F
    #Default: False
    # When set to TRUE namesctl will suppress the confirmation prompt when
    # sensitive operations (stop, restart, reload) are requested. This is
    # quite helpful when using namesctl scripts.
    #namesctl.server_password = mangler
    #Syntax: string
    #Default: NULL
    # Automatically sets the password for the names server in order to perform
    # sensitive operations (stop, restart, reload). The password may also be
    # set manually during a namesctl session using 'set password'.
    #namesctl.internal_encrypt_password = False
    #Syntax: T/F
    #Default: True
    # When set to TRUE namesctl will not encrypt the password when it is sent to
    # the names server. This would enable an unencrypted password to be set in
    # names.ora:names.server_password
    # - Native Naming Adpaters -------------------------------------------
    #names.dce.prefix = /.:/subsys/oracle/names
    #Syntax: DCE cell name
    #Default: /.:/subsys/oracle/names
    #Specifies the DCE cell (prefix) to use for name lookup.
    #names.nds.name_context = personnel.acme
    #Syntax: NDS name
    #Default: (OSD?)
    # Specifies the default NDS name context in which to look for the name to
    # be resolved.
    #names.nis.meta_map # NA
    # Syntax: filename
    # Default: sqlnet.maps
    # Specifies the file to be used to map NIS attributes to an NIS mapname.
    # Currently unused.
    # - Advanced Networking Option Authentication Adapters ----------------
    #sqlnet.authentication_services
    # Syntax: A single value or a list from {beq, none, all, kerberos5,
    #       cybersafe, securid, identitx}
    # Default: NONE
    # Enables one or more authentication services. To enable
    # authentication via the Oracle Security Server, use (beq, oss). If
    # the Advanced Networking Option has been installed with Kerberos5
    # support, using (beq, kerberos5) would enable authentication via
    # Kerberos.
    sqlnet.authentication_services=(beq, oss)
    ## Parmeters used with Kerberos adapter.
    #sqlnet.kerberos5_cc_name
    # Syntax: Any valid pathname.
    # Default: /tmp/krb5cc_<uid>
    # The Kerberos credential cache pathname.
    #sqlnet.kerberos5_cc_name=/tmp/mycc
    #sqlnet.kerberos5_clockskew
    # Syntax: Any positive integer.
    # Default: 300
    # The acceptable difference in the number of seconds between when a
    # credential was sent and when it was received.
    #sqlnet.kerberos5_clockskew=600
    #sqlnet.kerberos5_conf
    # Syntax: Any valid pathname.
    # Default: /krb5/krb.conf
    # The Kerberos configuration pathname.
    #sqlnet.kerberos5_conf=/tmp/mykrb.conf
    #sqlnet.kerberos5_realms
    # Syntax: Any valid pathname
    # Default: /krb5/krb.realms
    # The Kerberos host name to realm translation file.
    #sqlnet.kerberos5_realms=/tmp/mykrb.realms
    #sqlnet.kerberos5_keytab
    # Syntax: Any valid pathname.
    # Default: /etc/v5srvtab
    # The Kerberos secret key file.
    #sqlnet.kerberos5_keytab=/tmp/myv5srvtab
    #sqlnet.authentication_kerberos5_service
    # Syntax: Any string.
    # Default: A default is not provided.
    # The Kerberos service name.
    #sqlnet.authentication_kerberos5_service=acme
    ## Parmeters used with CyberSAFE adapter.
    #sqlnet.authentication_gssapi_service
    # Syntax: A correctly formatted service principal string.
    # Default: A default is not provided.
    # The CyberSAFE service principal
    #sqlnet.authentication_gssapi_service=acme/[email protected]
    ## Parmeters used with Identix adapter.
    #sqlnet.identix_fingerprint_method
    # Syntax: Must be oracle.
    # Default: A default is not provided.
    # The Identix authentication server method
    #sqlnet.identix_fingerprint_method=oracle
    #sqlnet.identix_fingerprint_database
    # Syntax: Any string.
    # Default: A default is not provided.
    # The Identix authentication server TNS alias
    #sqlnet.identix_fingerprint_database=ofm
    #sqlnet.identix_fingerprint_database_user
    # Syntax: Any string
    # Default: A default is not provided.
    # The Identix authentication service well known username.
    #sqlnet.identix_fingerprint_database_user=ofm_client
    #sqlnet.identix_fingerprint_database_password
    # Syntax: Any string
    # Default: A default is not provided.
    # The Identix authentication service well known password.
    #sqlnet.identix_fingerprint_database_password=ofm_client
    # - Advanced Networking Option Network Security -------------------------
    #sqlnet.crypto_checksum_client
    #sqlnet.crypto_checksum_server
    #sqlnet.encryption_client
    #sqlnet.encryption_server
    # These four parameters are used to specify whether a service (e.g.
    # crypto-checksumming or encryption) should be active:
    # Each of the above parameters defaults to ACCEPTED.
    # Each of the above parameters can have one of four possible values:
    # value          meaning
    # ACCEPTED     The service will be active if the other side of the
    #          connection specifies "REQUESTED" or REQUIRED" and
    #          there is a compatible algorithm available on the other
    #          side; it will be inactive otherwise.
    # REJECTED     The service must not be active, and the connection
    #          will fail if the other side specifies "REQUIRED".
    # REQUESTED     The service will be active if the other side specifies
    #          "ACCEPTED", "REQUESTED", or "REQUIRED" and there is a
    #          compatible algorithm available on the other side; it
    #          will be inactive otherwise.
    # REQUIRED     The service must be active, and the connection will
    #          fail if the other side specifies "REJECTED" or if there
    #          is no compatible algorithm on the other side.
    #sqlnet.crypto_checksum_types_client
    #sqlnet.crypto_checksum_types_server
    #sqlnet.encryption_types_client
    #sqlnet.encryption_types_server
    # These parameters control which algorithms will be made available for
    # each service on each end of a connection:
    # The value of each of these parameters can be either a parenthesized
    # list of algorithm names separated by commas or a single algorithm
    # name.
    # Encryption types can be: RC4_40, RC4_56, RC4_128, DES, DES40
    # Encryption defaults to all the algorithms.
    # Crypto checksum types can be: MD5
    # Crypto checksum defaults to MD5.
    #sqlnet.crypto_seed ="4fhfguweotcadsfdsafjkdsfqp5f201p45mxskdlfdasf"
    #sqlnet.crypto_checksum_server = required
    #sqlnet.encryption_server = required
    # - Oracle Security Server ---------------------------------------------
    #oss.source.my_wallet
    # Syntax: A properly formatted NLNV list.
    # Default: Platform specific. Unix: $HOME/oracle/oss
    # The method for retrieving and storing my identity.
    #oss.source.my_wallet
    # =(source
    # =(method=file)
    # (method_data=/dve/asriniva/oss/wallet)
    #oss.source.location
    # Syntax: A properly formatted NLNV list.
    # Default: Oracle method, oracle_security_service/oracle_security_service@oss
    # The method for retrieving encrypted private keys.
    #oss.source.location
    # =(source
    # =(method=oracle)
    # (method_data=
    # (sqlnet_address=andreoss)
    # - Sqlnet(v2.x) and Net3.0 Client ------------------------------------------
    # In the following descriptions, the term "client program" could mean
    # either sqlplus, svrmgrl or any other OCI programs written by users
    #trace_level_client = ADMIN
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #Purpose: Indicates the level at which the client program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    #     4 or USER - User trace information
    #      10 or ADMIN - Administration trace information
    #     16 or SUPPORT - Worldwide Customer Support trace information
    #Supported since: v2.0
    #trace_directory_client = /oracle/network/trace
    #Possible values: Any valid directory path with write permission
    #Default: $ORACLE_HOME/network/trace ($ORACLE_HOME=/oracle at customer
    # site)
    #Purpose: Indicates the name of the directory to which trace files from
    # the client execution are written.
    #Supported since: v2.0
    #trace_file_client = /oracle/network/trace/cli.trc
    #Possible values: Any valid file name
    #Default:     $ORACLE_HOME/network/trace/cli.trc ($ORACLE_HOME =
    #          /oracle at customer site)
    #Purpose: Indicates the name of the file to which the execution trace
    # of the client is written to.
    #Supported since: v2.0
    #trace_unique_client = ON
    #Possible values: {ON, OFF}
    #Default: OFF
    #Purpose: Used to make each client trace file have a unique name to
    #     prevent each trace file from being overwritten by successive
    #     runs of the client program
    #Supported since: v2.0
    #log_directory_client = /oracle/network/log
    #Possible values: Any valid directory pathname
    #Default: $ORACLE_HOME/network/log ($ORACLE_HOME = /oracle at customer
    #     site)
    #Purpose: Indicates the name of the directory to which the client log file
    #     is written to.
    #Supported since: v2.0
    #log_file_client = /oracle/network/log/sqlnet.log
    #Possible values: This is a default value, u cannot change this
    #Default: $ORACLE_HOME/network/log/sqlnet.log ($ORACLE_HOME=/oracle in
    # customer site)
    #Purpose: Indicates the name of the log file from a client program
    #Supported since: v2.0
    #log_directory_server = /oracle/network/trace
    #Possible values: Any valid diretcory path with write permission
    #Default: $ORACLE_HOME/network/trace ( $ORACLE_HOME=/oracle at customer
    #     site)
    #Purpose: Indicates the name of the directory to which log files from the
    #      server are written
    #Supported since: v2.0
    #trace_directory_server = /oracle/network/trace
    #Possible values: Any valid directory path with write permission
    #Default: $ORACLE_HOME/network_trace ( $ORACLE_HOME=/oracle at customer
    #     site)
    #Purpose: Indicates the name of the directory to which trace files from
    # the server are written
    #Supported since: v2.0
    #trace_file_server = /orace/network/trace/svr_<pid>.trc
    #Possible values: Any valid filename
    #Default: $ORACLE_HOME/network/trace/svr_<pid>.trc where <pid? stands for
    # the process id of the server on UNIX systems
    #Purpose: Indicates the name of the file to which the execution trace of
    # the server program is written to.
    #Supported since: v2.0
    #trace_level_server = ADMIN
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #Purpose: Indicates the level at which the server program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - Worldwide Customer Support trace information
    #Supported since: v2.0
    #use_dedicated_server = ON
    #Possible values: {OFF,ON}
    #Default:      OFF
    #Purpose: Forces the listener to spawn a dedicated server process for
    #     sessions from this client program.
    #Supported since: v2.0
    #use_cman = TRUE
    #Possible values: {TRUE, FALSE}
    #Default:     FALSE
    #Purpose:
    #Supported since: v3.0
    #tnsping.trace_directory = /oracle/network/trace
    #Possible values: Any valid directory pathname
    #Default: $ORACLE_HOME/network/trace ($ORACLE_HOME=/oracle at customer
    #     site)
    #Purpose: Indicates the directory to which the execution trace from
    #     the tnsping program is to be written to.
    #Supported since: v2.0
    #tnsping.trace_level = ADMIN
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #Purpose: Indicates the level at which the server program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - Worldwide Customer Support trace information
    #Supported since: v2.0
    #sqlnet.expire_time = 10
    #Possible values: 0-any valid positive integer! (in minutes)
    #Default: 0 minutes
    #Recommended value: 10 minutes
    #Purpose: Indicates the time interval to send a probe to verify the
    #     client session is alive (this is used to reclaim watseful
    #     resources on a dead client)
    #Supported since: v2.1
    #sqlnet.client_registration = <unique_id>
    #Possible values:
    #Default: OFF
    #Purpose: Sets a unique identifier for the client machine. This
    #     identifier is then passed to the listener with any connection
    #     request and will be included in the Audit Trail. The identifier
    #     can be any alphanumeric string up to 128 characters long.
    #Supported since: v2.3.2
    #bequeath_detach = YES
    #Possible values: {YES,NO}
    #Default: NO
    #Purpose: Turns off signal handling on UNIX systems. If signal handling
    #     were not turned off and if client programs written by users make
    #     use of signal handling they could interfere with Sqlnet/Net3.
    #Supported since: v2.3.3
    #automatic_ipc = OFF
    #Possible values: {ON,OFF}
    #Default: OFF
    #Purpose: Force a session to use or not to use IPC addresses on the
    #     client's node.
    #Supported since: v2.0
    #disable_oob = ON
    #Possible values: {ON,OFF}
    #Default: OFF
    #Purpose: If the underlying transport protocol (TCP, DECnet,...) does
    # not support Out-of-band breaks, then disable out-of-band
    #     breaks
    #Supported since: v2.0
    #

  • Found ORA-20072: insufficient privileges when run user package

    We use workspace manager
    enable version table : FEED_ADMIN.FEED_SET
    login with my username : KTEERAYUT that have dba privilege
    If we run dbms_wm in sqlplus. It work properly.
    KTEERAYUT@BKKXE > BEGIN
    2 dbms_wm.Beginresolve('D_1_1');
    3 dbms_wm.resolveconflicts('D_1_1','FEED_ADMIN.FEED_SET','','PARENT');
    4 COMMIT;
    5 dbms_wm.rollbackresolve('D_1_1');
    6 COMMIT;
    7 END;
    PL/SQL procedure successfully completed.
    Then try create as procedure with FEED_ADMIN owner.
    create procedure feed_admin.test_resolveconflicts_wm(p_workspace_name varchar2)
    as
    begin
    dbms_wm.Beginresolve(p_workspace);
    dbms_wm.resolveconflicts(p_workspace,'FEED_ADMIN.FEED_SET','','PARENT');
    COMMIT;
    dbms_wm.rollbackresolve(p_workspace);
    COMMIT;
    END;
    Then test run with KTEERAYUT
    KTEERAYUT@BKKXE > BEGIN
    2 feed_admin.test_resolveconflicts_wm('D_1_1');
    3 end;
    4 /
    begin
    ERROR at line 1:
    ORA-20072: insufficient privileges on 'FEED_ADMIN.FEED_SET'
    ORA-06512: at "WMSYS.LT", line 8615
    ORA-06512: at "FEED_ADMIN.TEST_RESOLVECONFLICTS_WM", line 5
    ORA-06512: at line 2
    I already grant all on FEED_ADMIN.FEED_SET to KTEERAYUT but it's still error.
    Anyway It work properly if connect and execute with FEED_ADMIN.
    So Can I run the package with another username? Which privilege that it's required?

    Hi Ben,
    Thanks for reply. Version of workspace manager is 10.2.0.4.4 on oracle 10.2.0.4 platform is window server 2003 sp2
    Below is more detail.
    1. Grant workspace manager privs to both user (KTEERAYUT also have dba privs)
    GRANT EXECUTE ON dbms_lock TO feed_admin;
    GRANT ROLE WM_ADMIN_ROLE TO feed_admin;
    GRANT SELECT ON DBA_WORKSPACE_SESSIONS TO feed_admin;
    begin
    dbms_wm.grantSystemPriv (
    'ACCESS_ANY_WORKSPACE, ' ||
    'MERGE_ANY_WORKSPACE, ' ||
    'CREATE_ANY_WORKSPACE, ' ||
    'REMOVE_ANY_WORKSPACE, ' ||
    'ROLLBACK_ANY_WORKSPACE',
    'feed_admin',
    'YES');
    END;
    GRANT EXECUTE ON dbms_lock TO KTEERAYUT;
    GRANT ROLE WM_ADMIN_ROLE TO KTEERAYUT;
    GRANT SELECT ON DBA_WORKSPACE_SESSIONS TO KTEERAYUT;
    begin
    dbms_wm.grantSystemPriv (
    'ACCESS_ANY_WORKSPACE, ' ||
    'MERGE_ANY_WORKSPACE, ' ||
    'CREATE_ANY_WORKSPACE, ' ||
    'REMOVE_ANY_WORKSPACE, ' ||
    'ROLLBACK_ANY_WORKSPACE',
    'apex',
    'YES');
    END;
    2. FEED_ADMIN create table FEED_SET and enable version for FEED_ADMIN.FEED_SET
    CREATE TABLE feed_admin.feed_set
    (feed_set_id NUMBER PRIMARY KEY,
    feed_set_name VARCHAR2(30)
    GRANT ALL ON feed_admin.feed_set TO kteerayut;
    BEGIN
    dbms_wm.enableversioning('feed_set','VIEW_WO_OVERWRITE');
    END;
    SELECT * FROM ALL_WM_VERSIONED_TABLES;
    INSERT INTO feed_admin.feed_set
    VALUES (1,'new feed set');
    COMMIT;
    3. KTEERAYUT create workspace name : WORK
    BEGIN
    dbms_wm.gotoworkspace('LIVE');
         COMMIT;
         dbms_wm.createworkspace('WORK_TEST');
         dbms_wm.gotoworkspace('WORK_TEST');
         COMMIT;
    END;
    SELECT * FROM feed_admin.feed_set;
    FEED_SET_ID FEED_SET_NAME
    1 new feed set
    4. FEED_ADMIN create procedure name : TEST_REFRESH and grant execute privs to KTEERAYUT
    create or replace procedure FEED_ADMIN.Test_refresh is
    BEGIN
    dbms_wm.Beginresolve('WORK');
    dbms_wm.resolveconflicts('WORK','feed_admin.feed_set','','PARENT');
    COMMIT;
    dbms_wm.Commitresolve('WORK');
    COMMIT;
    dbms_wm.refreshworkspace('WORK');
    end Test_refresh;
    GRANT EXECUTE ON Test_refresh TO KTEERAYUT;
    5. Login with KTEERAYUT.
    5.1 test directly command via sql*plus
    BEGIN
    dbms_wm.Beginresolve('WORK');
    dbms_wm.resolveconflicts('WORK','feed_admin.feed_set','','PARENT');
    COMMIT;
    dbms_wm.Commitresolve('WORK');
    COMMIT;
    dbms_wm.refreshworkspace('WORK');
    END;
    PL/SQL procedure successfully completed.
    5.2 but it will fail when call via procedure
    BEGIN
    feed_admin.Test_refresh;
    END;
    ERROR at line 1:
    ORA-20072: insufficient privileges on 'FEED_ADMIN.FEED_SET'
    ORA-06512: at "WMSYS.LT", line 8615
    ORA-06512: at "FEED_ADMIN.TEST_REFRESH", line 4
    ORA-06512: at line 2
    Regards.

  • ORA-01031 (Insufficient Privileges) after moving server to new domain

    Hello SAP/Oracle experts,
    We recently performed a 'lift & shift' to move our SAP test system (QAS) from our HQ to our hosting partner's data centre. Although SAP works fine, we've lost the ability to run database operations through DB13. We now receive ORA-01031 - Insufficient Privileges errors whenever we try anything through DB13.
    Because moving the server involved changing the Windows domain to which it belonged, we created a trust relationship between old and new domains so that we didn't have to change the details of QASADM and SAPServiceQAS. We ran the usual oradbuser.sql and sapdba_role.sql scripts. We also removed and reassigned the ORA_QAS_DBA and ORA_QAS_OPER groups to the QASADM and SAPServiceQAS users. All of which seems to have made no difference and we still get ORA-01031 errors in DB13.
    Even stranger though is the fact that at the Oracle level, user sys is able to log in 'as sysdba', whilst user system cannot. e.g.
    sqlplus “sys/<password>@qas as sysdba” – Works.
    sqlplus “sys/<password> as sysdba” – Works.
    sqlplus “/ as sysdba” – Doesn’t work
    sqlplus “system/<password>@qas as sysdba” – Doesn’t work.
    sqlplus “system/<password> as sysdba” – Doesn’t work.
    This leads me to believe that the problem is not SAP-related (i.e. sapdba_role won't fix it!), but is more likely Oracle-related and perhaps down to the fact that ths system was built in one domain, but now resides in another. I guess the easiest thing to do would be to create QASADM and SAPServiceQAS accounts in the new domain and try that, but that's clutching at straws and doesn't explain why Oracle user sys works, whilst system doesn't.
    Has anyone moved servers between domains and experienced similar problems?
    Thanks in advance of any help,
    Arwel.

    is the recommended procedure when moving SAP Systems (or the server where they installed on) from one Domain to the next one (at least if the user accounts are in the same domain as the Server).
    You have following dependencies when installing in a domain:
    1. domain groups
    2. local groups containing domain groups and/or domain accounts
    3. Domain Accounts
    4. maybe domain groups are used in Access Control Lists of local Files / Directories
    5. User rights Assignment in registry
    6. as in Oracle Database internal users reflecting Operating System users.
    In Windows Security Objects (ACLs of Files, Directories) a Windows Account is referenced by it's SID which is unique (you can have a look at those strings in Upper Keys of the Registry HKEY_USERS). This means that a Domain User XYZ in Domain A has a different SID than Domain User XYZ in Domain B. The same applies to Windows Groups.
    As a result of this c:\documents and Settings\XYZ will not be for the use with the same name if you move the computer to a diferent domain.
    Windows will create something like c:\documents and Settings\XYZ.NEW_DOMAIN. As a result of this all envrionment variables of XYZ in the old domain are not visible in the new domain, because they are stored in the users registry which resides in c:\documents and Settings\XYZ\ntuser.dat in the old domain and c:\documents and Settings\XYZ.NEW_DOMAIN\ntuser.dat in the new domain.
    Too many things to do, to many possibilities you can make mistakes  - therefore --> homogenious system copy.
    regards
    Peter

  • Sysman Insufficient Privileges

    Hi everyone,
    My Problem: I create a repository for sysman user in oracle database 10g R1, well
    now i want to connect to my database with Oracle designer but i can´t log with (for example user1), designer says something like that: you need to create a repository for user1.
    I log in Repository admin tool as sysman and i create a user (user1), click in Maintai User icon, maybe with that i can log in designer but Repository Admin Tool says:
    Message
    ORA-01031: insufficient privileges
    Message
    ORA-06512: at "SYSMAN.JR_SYS_PRIVS", line 236
    Message
    ORA-06512: at "SYSMAN.JR_SYS_PRIVS", line 120
    Message
    ORA-06512: at line 1
    Message
    RME-02124: Failed to execute SQL statement: Declare x number; begin rmmes.clear; x:= jr_sys_privs.ins ('ROGER','ROGER','ROGER', sdd_sys_priv_list('N','N','Y','N','N','Y','N','N','N','N','N','N','Y','N','Y','Y','Y','N','N')); end;
    And i don´t know undestand :(:(...What privileges i nedd as sysman to create repository to any user. i want to log in designer as user1.. thanks in atvance.

    You must use SYS when you setup your DB. Perhaps the following information will help. It is what I use when setting up a new DB. So you will need to set the proper paths and usernames:
    After you install the IDS 10G in a new oracle home on the Client windows PC you will find the intall manual under:
    start - programs- Oracle Developer Suite - Designer documentation - Repository instalation Guide
    The following are the step I use to build a new repository
    You will need to set paths and names as you desire for your local PCs and repostiory.
    -- Step 1
    Log on as SYS
    This is so you can get the path name of your datafiles:
    select file_name, tablespace_name from dba_data_files;
    -- D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\TEMP_65.DBF
    create tablespace constant_grow_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\constant_grow_indexes_01.dbf'
    size 4000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace constant_grow_TABLES
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\constant_grow_tables_01.dbf'
    size 15000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace dependency_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\dependency_indexes_01.dbf'
    size 5600k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace dependency_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\dependency_tables_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace diagram_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\diagram_indexes_01.dbf'
    size 1000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace diagram_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\diagram_tables_01.dbf'
    size 2000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace lob_data
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\lob_data_01.dbf'
    size 1200k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace rapid_grow_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\rapid_grow_indexes_01.dbf'
    size 250000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace rapid_grow_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\rapid_grow_tables_01.dbf'
    size 500000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace system_meta_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\system_meta_indexes_01.dbf'
    size 20000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace system_meta_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\system_meta_tables_01.dbf'
    size 30000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace temporary_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\temporary_indexes_01.dbf'
    size 5000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace temporary_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\temporary_tables_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace version_indexes
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\version_indexes_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace version_tables
    datafile 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\version_tables_01.dbf'
    size 12000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    -- Step 2
    Make sure you ave plenty of space in your system tablespace
    select tablespace_name, sum(bytes)/1024/1024 from dba_free_space
    group by tablespace_name;
    alter tablespace system add datafile
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\system03.dbf' size 140m;
    -- Step 3
    As SYS
    create user owner identified by owner default tablespace users
    temporary tablespace temp;
    Run this file as SYS
    @ d:\orant\repadm61\utl\ckrorole.sql
    GRANT EXECUTE ON DBMS_LOCK TO owner;
    GRANT EXECUTE ON DBMS_PIPE TO owner;
    GRANT CREATE TABLE TO owner;
    GRANT CREATE VIEW TO owner;
    GRANT CREATE PROCEDURE TO owner;
    GRANT CREATE SYNONYM TO owner;
    GRANT CREATE SEQUENCE TO owner;
    GRANT SELECT ON sys.v_$nls_parameters TO owner WITH GRANT OPTION;
    GRANT SELECT on sys.V_$PARAMETER TO owner;
    GRANT SELECT ON dba_rollback_segs TO owner;
    GRANT SELECT ON dba_segments TO owner;
    GRANT CREATE ANY SYNONYM TO owner;
    GRANT DROP ANY SYNONYM TO owner;
    GRANT CREATE PUBLIC SYNONYM TO owner;
    GRANT DROP PUBLIC SYNONYM TO owner;
    GRANT ck_oracle_repos_owner to owner;
    GRANT CONNECT, RESOURCE TO owner;
    GRANT dba TO owner;
    (If you want Row Level Security (RLS) on)
    GRANT execute on dbms_rls to owner;
    -- Step 4 Adding a user
    create user user65 identified by user65 default tablespace users
    temporary tablespace temp;
    GRANT CONNECT, RESOURCE TO user65;
    GRANT CREATE TABLE TO user65;
    GRANT CREATE VIEW TO user65;
    GRANT CREATE PROCEDURE TO user65;
    GRANT CREATE SYNONYM TO user65;
    GRANT CREATE SEQUENCE TO user65;
    GRANT SELECT ON dba_rollback_segs TO user65;
    GRANT SELECT ON dba_segments TO user65;
    -- Step 5
    The following are the recommended minimum settings.
    optimizer_mode = Choose
    compatible = 9.0.0 # for an Oracle9i database
    compatible = 8.1.7 # for an Oracle8i database
    max_enabled_roles = 30
    sort_area_size = 262144
    sort_area_retained_size = 65536
    hash_area_size = 1048576
    optimizer_index_caching = 50
    optimizer_index_cost_adj = 25
    shared_pool_size = 32000000
    db_block_buffers # comment out on an Oracle9i database
    db_block_buffers = 2000 # on an Oracle8i database
    open_cursors = 3000
    processes = 100
    db_file_multiblock_read_count=16 # for a 4K Oracle block size
    db_file_multiblock_read_count=32 # for a 2K Oracle block size
    db_file_multiblock_read_count=8 # for a 8K Oracle block size
    Step 5b - (Oracle 9i or 10.2 DB) Install Oracle 9i or 10.2 Import and Export Utilities
    Before installing Designer Repository on an Oracle 9i or 10.2 database, you need to set up the installation workstation to use the Oracle 9i or 10.2 import and export utilities. To do so, perform the following steps at the workstation from which you will be running the repository installation:
    From the Oracle 9i or 10.2 installation media, install the Oracle 9i or 10.2 import and export utilities in a dedicated Oracle home.
    In the Windows Registry, locate the key named:
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HomeName\REPOS61
    where HOMEn is the home number of the home installed into for a multiple Oracle home environment, but is not present where the default Oracle home is being used.
    Change the value of the EXECUTE_IMPORT and EXECUTE_EXPORT variables to point to the new Oracle home. Thus, if the new Oracle home is d:\des_9i, the settings would be:
    d:\des_9i\bin\exp.exe
    d:\des_9i\bin\imp.exe
    -- Step 6
    Log on to the Repository Admin Utility of Designer
    start - programs- Oracle Developer Suite - Designer - Repository Admin Utility
    Install Repository button
    Make sure both check boxes are checked(one is grayed out) Next
    Select the proper tablespace for the seletced box
    Start the install.

  • Insufficient privileges - Split Partitioned IOT

    Hi,
    Can someone help me figuring this out. I'm trying to do a SPLIT PARTITION in a stored procedure.
    SQL> select * from v$version where rownum = 1;
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    1 row selected.This is my sample table:
    SQL> CREATE TABLE tab (
             period                NUMBER(13)         NOT NULL,
             check_id              VARCHAR2(4)        NOT NULL,
             opkr_number           NUMBER(7)          NOT NULL
          ,CONSTRAINT tab_pk PRIMARY KEY (period, check_id, opkr_number)
        ORGANIZATION INDEX COMPRESS 2
        PARTITION BY LIST (period)
           PARTITION tab_p72  VALUES(72),
           PARTITION tab_p73  VALUES(73),
           PARTITION tab_rest VALUES(DEFAULT));
    Table created.And I want to do this in my procedure:
    SQL> ALTER TABLE tab SPLIT PARTITION tab_rest VALUES(74) INTO (PARTITION tab_p74, PARTITION tab_rest);
    Table altered.
    SQL> ALTER TABLE tab DROP PARTITION tab_p74;
    Table altered.This attempt won't work:
    SQL> CREATE OR REPLACE PROCEDURE myproc
    AS
    BEGIN
       EXECUTE IMMEDIATE 'ALTER TABLE tab SPLIT PARTITION tab_rest VALUES(74) INTO (PARTITION tab_p74, PARTITION tab_rest)';
    END;
    Procedure created.
    SQL> exec myproc
    ORA-01031: insufficient privileges
    ORA-06512: at "XQL_STIK.MYPROC", line 4
    ORA-06512: at line 1Only if I put in AUTHID CURRENT_USER, it will. And this what I just cannot figure out.
    SQL> CREATE OR REPLACE PROCEDURE myproc2
    AUTHID CURRENT_USER
    AS
    BEGIN
       EXECUTE IMMEDIATE 'ALTER TABLE tab SPLIT PARTITION tab_rest VALUES(74) INTO (PARTITION tab_p74, PARTITION tab_rest)';
    END;
    Procedure created.
    SQL> exec myproc2
    PL/SQL procedure successfully completed.
    SQL> ALTER TABLE tab DROP PARTITION tab_p74;
    Table altered.It cannot be the ALTER TABLE privilege.
    SQL> create or replace procedure myproc3
    as
    begin
       execute immediate 'ALTER TABLE tab ADD x NUMBER';
    end;
    Procedure created.
    SQL> exec myproc3
    PL/SQL procedure successfully completed.
    SQL> DROP TABLE tab PURGE;
    Table dropped.Can anyone see what I'm missing?
    Edit: I can even do this, so it must have to do with the SPLIT (And this being an IOT)
    SQL> CREATE OR REPLACE PROCEDURE myproc4
    AS
    BEGIN
       EXECUTE IMMEDIATE 'ALTER TABLE tab DROP PARTITION tab_rest';
       EXECUTE IMMEDIATE 'ALTER TABLE tab ADD  PARTITION tab_p74 VALUES(74)';
    END;
    Procedure created.
    SQL> exec myproc4
    PL/SQL procedure successfully completed.Best regards
    Peter
    Edited by: Peter Gjelstrup on Feb 3, 2010 4:34 AM
    - Added DROP/ADD example

    Hi Herald,
    and Centinul.
    Thanks for that metalink. Looked promising, but I'm not sure. It seems that I can use ALTER SESSION, even in a SP.
    SQL> CREATE OR REPLACE PROCEDURE myproc5
    AS
    BEGIN
       EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_LANGUAGE = american';
    END;
    Procedure created.
    SQL> select value
      from nls_session_parameters
    where parameter = 'NLS_LANGUAGE';
    VALUE                                  
    DANISH                                 
    1 row selected.
    SQL> set role none;
    Set role complete.
    SQL> exec myproc5
    PL/SQL procedure successfully completed.
    SQL> select value
      from nls_session_parameters
    where parameter = 'NLS_LANGUAGE';
    VALUE                                  
    AMERICAN                               
    1 row selected.
    SQL> select * from session_privs
    order by 1;
    PRIVILEGE                              
    CREATE MATERIALIZED VIEW               
    UNLIMITED TABLESPACE                   
    2 rows selected.
    SQL> set role all;
    Set role complete.
    SQL> select * from session_privs
    order by 1;
    PRIVILEGE                              
    ALTER SESSION                          
    CREATE CLUSTER                         
    CREATE INDEXTYPE                       
    CREATE MATERIALIZED VIEW               
    CREATE OPERATOR                        
    CREATE PROCEDURE                       
    CREATE SEQUENCE                        
    CREATE SESSION                         
    CREATE SYNONYM                         
    CREATE TABLE                           
    CREATE TRIGGER                         
    CREATE TYPE                            
    CREATE VIEW                            
    UNLIMITED TABLESPACE                   
    14 rows selected.Hmm..
    Edit:
    [Bug:1548539|https://support.oracle.com/CSP/main/article?cmd=show&type=BUG&id=1548539]
    Seems to indicate that CREATE TABLE is the thing I'm looking for.
    This seems to be consistent with what Bartek has.
    Can anyone confirm, by running some of my original test case with and without CREATE TABLE privilege?
    I'm sorry for asking for this final confirmation, unfortunately it would be quite painful for me to have some privileged user do that for me.
    Regards
    Peter
    Edited by: Peter on Feb 3, 2010 8:50 AM
    - Maybe CREATE TABLE?

  • 01031. 00000 -  "insufficient privileges"

    Dear Friends,
    I am getting below error while running a procedure.
    Error starting at line 32 in command:
    BEGIN ADDTABLEIFNOTEXISTS(); END;
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "BOP.ADDTABLEIFNOTEXISTS", line 6
    ORA-06512: at line 1
    01031. 00000 -  "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
               without the appropriate privilege. This error also occurs if
               attempting to install a database without the necessary operating
               system privileges.
               When Trusted Oracle is configure in DBMS MAC, this error may occur
               if the user was granted the necessary privilege at a higher label
               than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
               the required privileges.
               For Trusted Oracle users getting this error although granted the
               the appropriate privilege at a higher label, ask the database
               administrator to regrant the privilege at the appropriate label.
    the User contain DBA ROLE, And i tried to provide  EXECUTE ANY PROCEDURE to that user, But still i am getting the same error.
    I tried with "GRANT EXECUTE ANY PROCEDURE TO BOP WITH ADMIN OPTION;"
    "GRANT EXECUTE ANY PROCEDURE TO BOP;" but no use
    Do i need to give any other permissions?

    Hi Karthick,
    Thank you for the reply,
    In line 6 we have "EXECUTE IMMEDIATE"
    Please check the procedure
    CREATE OR REPLACE PROCEDURE ADDTABLEIFNOTEXISTS AS
    tableCount NUMERIC (10);
    BEGIN
      SELECT COUNT(TABLE_NAME) INTO tableCount FROM USER_TABLES WHERE TABLE_NAME = 'MY_TABLE';
      IF tableCount = 0 THEN
      EXECUTE IMMEDIATE 'CREATE TABLE MY_TABLE ( SYNCHUP_IDENTIFIER   VARCHAR2 (300) NOT NULL , SYNCHUP_CONFIGURATION CLOB  NOT NULL , LASTUPDATED   NUMBER   (16)  NOT NULL , PRIMARY KEY (SYNCHUP_IDENTIFIER))';
      END IF;
    END;

  • CREATE INDEX fails with "insufficient privilege"

    Hello. I've never used TEXT before and frankly my first experience isn't going well. The long and the short of it is that when I ask 11g to make an index (authenticated to the schema) I get an error stack suggesting privilege problems:
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drvxtabc.create_indexes:TC
    ORA-01031: insufficient privileges
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CATINDEXMETHODS", line 97
    I've concocted this simple case so you can see my work:
    create table a_ctxtest
         mykey int not null,
         mytext varchar2(200),     
         constraint px_testkey primary key ( mykey )
    create index itx_test on a_ctxtest( mytext ) indextype is ctxsys.ctxcat PARAMETERS ('STORAGE mystore');
    This code, found in this forum, had been run earlier in the session:
    begin
    ctx_ddl.create_preference('mystore', 'BASIC_STORAGE');
    ctx_ddl.set_attribute('mystore', 'I_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    ctx_ddl.set_attribute('mystore', 'K_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    ctx_ddl.set_attribute('mystore', 'R_TABLE_CLAUSE', 'tablespace users storage (initial 32k) lob (data) store as (disable storage in row cache)');
    ctx_ddl.set_attribute('mystore', 'N_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    ctx_ddl.set_attribute('mystore', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 32k) compress 2');
    ctx_ddl.set_attribute('mystore', 'P_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    ctx_ddl.set_attribute('mystore', 'S_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    end;
    Hints or even outright commands back toward something that works as expected would certainly be welcome.

    I am going to guess that you are probably missing the create trigger privilege. I have provided a reproduction of your error, followed by granting of create trigger, followed by successful creation of the index. The required privileges can either be granted individually or through roles such as resource and ctxapp.
    SCOTT@orcl_11g> create user test identified by test
      2  /
    User created.
    SCOTT@orcl_11g> alter user test quota 100m on users
      2  /
    User altered.
    SCOTT@orcl_11g> grant connect to test
      2  /
    Grant succeeded.
    SCOTT@orcl_11g> grant create table to test
      2  /
    Grant succeeded.
    SCOTT@orcl_11g> grant execute on ctx_ddl to test
      2  /
    Grant succeeded.
    SCOTT@orcl_11g> connect test/test
    Connected.
    TEST@orcl_11g>
    TEST@orcl_11g> create table a_ctxtest
      2  (
      3  mykey int not null,
      4  mytext varchar2(200),
      5  constraint px_testkey primary key ( mykey )
      6  )
      7  /
    Table created.
    TEST@orcl_11g> begin
      2  ctx_ddl.create_preference('mystore', 'BASIC_STORAGE');
      3  ctx_ddl.set_attribute('mystore', 'I_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
      4  ctx_ddl.set_attribute('mystore', 'K_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
      5  ctx_ddl.set_attribute('mystore', 'R_TABLE_CLAUSE', 'tablespace users storage (initial 32k) lob (data) store as (disable storage in row cache)');
      6  ctx_ddl.set_attribute('mystore', 'N_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
      7  ctx_ddl.set_attribute('mystore', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 32k) compress 2');
      8  ctx_ddl.set_attribute('mystore', 'P_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
      9  ctx_ddl.set_attribute('mystore', 'S_TABLE_CLAUSE', 'tablespace users storage (initial 32k)');
    10  end;
    11  /
    PL/SQL procedure successfully completed.
    TEST@orcl_11g> create index itx_test on a_ctxtest( mytext ) indextype is ctxsys.ctxcat PARAMETERS ('STORAGE mystore')
      2  /
    create index itx_test on a_ctxtest( mytext ) indextype is ctxsys.ctxcat PARAMETERS ('STORAGE mystore')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drvxtabc.create_indexes:TC
    ORA-01031: insufficient privileges
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CATINDEXMETHODS", line 97
    TEST@orcl_11g> drop index itx_test
      2  /
    Index dropped.
    TEST@orcl_11g> connect scott/tiger
    Connected.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> grant create trigger to test
      2  /
    Grant succeeded.
    SCOTT@orcl_11g> connect test/test
    Connected.
    TEST@orcl_11g>
    TEST@orcl_11g> create index itx_test on a_ctxtest( mytext ) indextype is ctxsys.ctxcat PARAMETERS ('STORAGE mystore')
      2  /
    Index created.
    TEST@orcl_11g>

  • File sharing between two computers;  reg. user has insufficient privileges

    I am trying to transfer a file between a FP iMac and a new iMac, the former running 10.4.11 and the latter 10.5.5. File sharing is enabled on both. I can connect over our AirPort network as a registered user to my user account (which has the same name on both machines.) When I try to copy a folder from one to the other, I get an error message that I have insufficient privileges. When I check ownership for the file to be transferred and the destination folder (Desktop), I have read/write privileges for both.
    What am I doing wrong?

    Pardon my ignorance, but what is "FP?"
    On each computer, one at a time, could you afp mount the other computer and then, in Terminal.app, type
    ls -Talkes (and leave a space after that final "s"),
    then drag-and-drop from the Finder your source folder and and your destination folder (that will contain the copy of the source folder), then hit return?
    As an example, after typing ls -Talkes and dragging the source and destination folders into the Terminal window one at a time and just before striking the return key, the command line in Terminal would read
    ls -Talkes Desktop/Source_folder /Volumes/jv/Desktop 
    the first time on the source computer and
    ls -Talkes /Volumes/jv/Desktop/Source_folder Desktop 
    the second time on the destination computer.
    Please post the results for both cases, "sanitizing" as you see fit any personal identifying information and removing reported data from extraneous files and folders. I am mostly interested in seeing the permissions and ACLs for the entire path going from / (root) to source folder and the files contained therein, and from /Volumes/afpmountpoint to destination directory, relative to one computer, and from /Volumes/afpmountpoint to source folder and the files contained therein, and from / to destination directory, relative to the other computer.

  • Getting Insufficient Privileges Error while running Pages in Jdeveloper

    Hi,
    When I am running my pages in JDeveloper, I am getting the Error:
    "You have insufficient privileges for the current operation." and the Application login page is being shown.
    Looking at the log window, I see that the system expects my page to be shown correctly. However the login screen gets displayed.
    I suspected that my login/password is incorrect in Jdeveloper Project settings. But I tried that. It is finw. Any suggestions as to what the problem might be would be great.
    Please find excerpts from the Jdev log window:
    [328] Connected to Oracle JBO Server - Version: 9.0.3.13.88
    [329] Loading from /lalith/oracle/apps/xxtmg/graph/server/server.xml file
    [330] Loading from indvidual XML files
    [331] Loading the Containees for the Package 'lalith.oracle.apps.xxtmg.graph.server.server'.
    [332] Loading from /lalith/oracle/apps/xxtmg/graph/server/GraphAM.xml file
    [333] Created root application module: 'lalith.oracle.apps.xxtmg.graph.server.GraphAM'
    [334] Locale is: 'en_US'
    [335] DefaultConnectionStrategy is establishing an application module connection
    [336] mUsePersColl is false
    [337] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    [338] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    [339] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [340] Successfully logged in
    [341] JDBCDriverVersion: 9.2.0.5.0
    [342] DatabaseProductName: Oracle
    [343] DatabaseProductVersion: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
    [344] Root application module, lalith.oracle.apps.xxtmg.graph.server.GraphAM, was created at 2007-01-02 14:08:08.391
    [345] setConnectionReleaseLevel - Set connection release level to 0
    [346] OAApplicationPoolImpl.setConnectionReleaseLevel was called with isReleased = false, isReserved = false
    [347] setConnectionReleaseLevel - Set connection release level to 0
    [348]
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>: WebRequestUtil.validateContext is called.
    [349]
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>: WebRequestUtil.validateContext returned status = VALID.
    ICX Session Values after WebRequestUtil.validateContext:
    ============================================================
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>:
    Current ICX Session (Oracle Applications User Session) Values:
    1. User ID (DB, ICX_SESSIONS) = 6
    2. Responsibility ID (DB, ICX_SESSIONS) = -1
    3. Responsibility Application ID (DB, ICX_SESSIONS) = -1
    4. Org ID (DB, ICX_SESSIONS) = 132
    5. Org ID (DB, CLIENT_INFO) = 132
    6. Org ID (ProfileStore.getProfile) = 132
    7. Org ID (ProfileStore.getSpecificProfile with new ICX_SESSIONS values) = 132
    8. Employee ID (DB, FND_GLOBAL.EMPLOYEE_ID) = -1
    9. Employee ID (AppsContext.getFNDGlobal) = -1
    10. Function ID (DB, ICX_SESSIONS) = -1
    11. Security Group ID (DB, ICX_SESSIONS) = -1
    ===========================================================
    [350] New Language Code = null
    [351] Current Language Code = US
    [352] ViewDefImpl_1_2>#q computed SQLStmtBufLen: 64, actual=24, storing=54
    [353] select sysdate from dual
    [354] **********oracle.jdbc.driver.OraclePreparedStatement@11abd68
    [355] Column count: 1
    [356] Column count: 1
    [357] ViewObject : Created new QUERY statement
    [358] ViewDefImpl_1_2>#q old SQLStmtBufLen: 54, actual=24, storing=54
    [359] select sysdate from dual
    [360] ViewObject close prepared statements...
    [361] Loading from /oracle/apps/ak/region/server/server.xml file
    [362] Loading from indvidual XML files
    [363] Loading the Containees for the Package 'oracle.apps.ak.region.server.server'.
    [364] Loading from /oracle/apps/ak/region/server/AkAmParameterRegistryVO.xml file
    [365] ViewDef: oracle.apps.ak.region.server.AkAmParameterRegistryVO using glue class
    [366] Column count: 2
    [367] ViewObject : Created new QUERY statement
    [368] AkAmParameterRegistryVO>#q computed SQLStmtBufLen: 140, actual=100, storing=130
    [369] select PARAM_NAME, PARAM_SOURCE
    from AK_AM_PARAMETER_REGISTRY
    where APPLICATIONMODULE_DEFN_NAME = :1
    [370] Binding param 1: lalith.oracle.apps.xxtmg.graph.server.GraphAM
    [371] OAApplicationPoolImpl.setConnectionReleaseLevel was called with isReleased = true, isReserved = true
    JRAD_PERF : /lalith/oracle/apps/xxtmg/graphs/webui/GraphPG - processRequest : 1313ms
    We have recently migrated our 9i database to 10G database. Is it something related to that?
    Thanks

    Check whether the following thread helps.
    Re: Error: You have insufficient privileges for the current Operation.

  • ORA-01031: insufficient privileges in PL/SQL but not in SQL

    I have problem with following situation.
    I switched current schema to another one "ban", and selected 4 rows from "ed"
    alter session set current_schema=ban;
    SELECT * FROM ed.PS WHERE ROWNUM < 5;
    the output is OK, and I get 4 rows like
    ID_S ID_Z
    1000152 1
    1000153 1
    1000154 1
    1000155 1
    but following procedure is compiled with warning
    create or replace
    procedure proc1
    as
    rowcnt int;
    begin
    select count(*) into rowcnt from ed.PS where rownum < 5;
    end;
    "Create procedure, executed in 0.031 sec."
    5,29,PL/SQL: ORA-01031: insufficient privileges
    5,2,PL/SQL: SQL Statement ignored
    ,,Total execution time 0.047 sec.
    Could you help me why SELECT does work in SQL but not in PL/SQL procedure?
    Thanks.
    Message was edited by:
    MattSk

    Privs granted via a role are only valid from SQL - and not from/within stored PL/SQL code.
    Quoting Tom's (from http://asktom.oracle.com) response to this:I did address this role thing in my book Expert one on one Oracle:
    <quote>
    What happens when we compile a Definer rights procedure
    When we compile the procedure into the database, a couple of things happen with regards to
    privileges.  We will list them here briefly and then go into more detail:
    q    All of the objects the procedure statically accesses (anything not accessed via dynamic SQL)
    are verified for existence. Names are resolved via the standard scoping rules as they apply to the
    definer of the procedure.
    q    All of the objects it accesses are verified to ensure that the required access mode will be
    available. That is, if an attempt to UPDATE T is made - Oracle will verify the definer or PUBLIC
    has the ability to UPDATE T without use of any ROLES.
    q    A dependency between this procedure and the referenced objects is setup and maintained. If
    this procedure SELECTS FROM T, then a dependency between T and this procedure is recorded
    If, for example, I have a procedure P that attempted to 'SELECT * FROM T', the compiler will first
    resolve T into a fully qualified referenced.  T is an ambiguous name in the database - there may be
    many T's to choose from. Oracle will follow its scoping rules to figure out what T really is, any
    synonyms will be resolved to their base objects and the schema name will be associated with the
    object as well. It does this name resolution using the rules for the currently logged in user (the
    definer). That is, it will look for an object owned by this user called T and use that first (this
    includes private synonyms), then it will look at public synonyms and try to find T and so on.
    Once it determines exactly what T refers to - Oracle will determine if the mode in which we are
    attempting to access T is permitted.   In this case, if we as the definer of the procedure either
    owns the object T or has been granted SELECT on T directly or PUBLIC was granted SELECT, the
    procedure will compile.  If we do not have access to an object called T by a direct grant - the
    procedure P will fail compilation.  So, when the object (the stored procedure that references T) is
    compiled into the database, Oracle will do these checks - and if they "pass", Oracle will compile
    the procedure, store the binary code for the procedure and set up a dependency between this
    procedure and this object T.  This dependency is used to invalidate the procedure later - in the
    event something happens to T that necessitates the stored procedures recompilation.  For example,
    if at a later date - we REVOKE SELECT ON T from the owner of this stored procedure - Oracle will
    mark all stored procedures this user has that are dependent on T, that refer to T, as INVALID. If
    we ALTER T ADD  some column, Oracle can invalidate all of the dependent procedures. This will cause
    them to be recompiled automatically upon their next execution.
    What is interesting to note is not only what is stored but what is not stored when we compile the
    object. Oracle does not store the exact privilege that was used to get access to T. We only know
    that procedure P is dependent on T. We do not know if the reason we were allowed to see T was due
    to:
    q    A grant given to the definer of the procedure (grant select on T to user)
    q    A grant to public on T (grant select on T to public)
    q    The user having the SELECT ANY TABLE privilege
    The reason it is interesting to note what is not stored is that a REVOKE of any of the above will
    cause the procedure P to become invalid. If all three privileges were in place when the procedure
    was compiled, a revoke of ANY of them will invalidate the procedure - forcing it to be recompiled
    before it is executed again. Since all three privileges were in place when we created the procedure
    - it will compile successfully (until we revoke all three that is). This recompilation will happen
    automatically the next time that the procedure is executed.
    Now that the procedure is compiled into the database and the dependencies are all setup, we can
    execute the procedure and be assured that it knows what T is and that T is accessible. If something
    happens to either the table T or to the set of base privileges available to the definer of this
    procedure that might affect our ability to access T -- our procedure will become invalid and will
    need to be recompiled.
    This leads into why ROLES are not enabled during the compilation and execution of a stored
    procedure in Definer rights mode. Oracle is not storing exactly WHY you are allowed to access T -
    only that you are. Any change to your privileges that might cause access to T to go away will cause
    the procedure to become invalid and necessitate its recompilation. Without roles - that means only
    'REVOKE SELECT ANY TABLE' or 'REVOKE SELECT ON T' from the Definer account or from PUBLIC. With
    roles - it greatly expands the number of times we would invalidate this procedure. If some role
    that was granted to some role that was granted to this user was modified, this procedure might go
    invalid, even if we did not rely on that privilege from that role. ROLES are designed to be very
    fluid when compared to GRANTS given to users as far as privilege sets go. For a minute, let's say
    that roles did give us privileges in stored objects. Now, most any time anything was revoked from
    ANY ROLE we had, or any role any role we have has (and so on -- roles can and are granted to roles)
    -- many of our objects would become invalid. Think about that, REVOKE some privilege from a ROLE
    and suddenly your entire database must be recompiled! Consider the impact of revoking some system
    privilege from a ROLE, it would be like doing that to PUBLIC is now, don't do it, just think about
    it (if you do revoke some powerful system privilege from PUBLIC, do it on a test database). If
    PUBLIC had been granted SELECT ANY TABLE, revoking that privilege would cause virtually every
    procedure in the database to go invalid. If procedures relied on roles, virtually every procedure
    in the database would constantly become invalid due to small changes in permissions. Since one of
    the major benefits of procedures is the 'compile once, run many' model - this would be disastrous
    for performance.
    Also consider that roles may be
    q    Non-default: If I have a non-default role and I enable it and I compile a procedure that
    relies on those privileges, when I log out I no longer have that role -- should my procedure become
    invalid -- why? Why not? I could easily argue both sides.
    q    Password Protected: if someone changes the password on a ROLE, should everything that might
    need that role be recompiled?  I might be granted that role but not knowing the new password - I
    can no longer enable it. Should the privileges still be available?  Why or Why not?  Again, arguing
    either side of this is easy. There are cases for and against each.
    The bottom line with respect to roles in procedures with Definer rights are:
    q    You have thousands or tens of thousands of end users. They don't create stored objects (they
    should not). We need roles to manage these people. Roles are designed for these people (end users).
    q    You have far fewer application schema's (things that hold stored objects). For these we want
    to be explicit as to exactly what privileges we need and why. In security terms this is called the
    concept of 'least privileges', you want to specifically say what privilege you need and why you
    need it. If you inherit lots of privileges from roles you cannot do that effectively. We can manage
    to be explicit since the number of development schemas is SMALL (but the number of end users is
    large)...
    q    Having the direct relationship between the definer and the procedure makes for a much more
    efficient database. We recompile objects only when we need to, not when we might need to. It is a
    large efficiency enhancement.
    </quote>

  • ORA-00604 error occured at recursive level1,ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,ORA-06512

    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad

    26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad
    ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
    I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Unable to schedule a workbook - Insufficient Privileges

    I'm trying to set up a user so that they can schedule workbooks.
    After the user goes through the workbook wizard, a Database Error - ORA-01031: insufficient privilege is displayed.
    The following privileges have been granted to the user:
    CREATE PROCEDURE
    CREATE TABLE
    CREATE VIEW
    EXECUTE ANY PROCEDURE
    UNLIMITED TABLESPACE
    EXECUTE ON SYS.DBMS_JOB
    SELECT ON SYS.V_$PARAMETER
    The scheduled reports are supposed to be created in the user's schema.
    The version of Discoverer that I am using is 10g (10.1.2.3)
    I've verified that the DBMS_JOB package is already installed on the database.

    Hi
    These is the script I normally use:
    accept username prompt'Enter Username: '
    accept pword prompt'Enter Password: '
    create user &username identified by &password;
    grant connect, resource to &&username;
    grant analyze any to &&username;
    grant create procedure, create sequence to &&username;
    grant create session, create table, create view to &&username;
    grant execute any procedure to &&username;
    grant global query rewrite to &&username;
    grant select any table, unlimited tablespace to &&username;
    grant execute on sys.dbms_job to &&username;
    grant select on sys.v_$parameter to &&username;
    There are several grants in my list that aren't in yours.
    For a start, the user needs CREATE ANY PROCEDURE not CREATE PROCEDURE as the procedure they will be creating will exist in the EUL owner's schema, not their own.
    Try this one first and see what happens. If you still don't get success do the other grants from my script. I'm sure scheduling will then work.
    Best wishes
    Michael

Maybe you are looking for