ORA-01031 in dynamic sql
HelloI wrote to procedures in virtue of my 'tools' of the user, one to execute dynamic sql statements, and one for disable referencial constraints of a schema.
1. -----------------------------------------------------------------------------------------------------
CREATE or REPLACE PROCEDURE TOOLS.execall (STRING IN varchar2) AS
cursor_name INTEGER;
INTEGER RET;
BEGIN
cursor_name: = DBMS_SQL. OPEN_CURSOR;
DBMS_SQL. PARSE (string, cursor_name, DBMS_SQL. NATIVE);
RET: = DBMS_SQL. Execute (cursor_name);
DBMS_SQL. CLOSE_CURSOR (cursor_name);
END;
/
2. ---------------------------------------------------------------------------------------------------------
CREATE OR REPLACE PROCEDURE TOOLS.disable_schema_ref_constraints)
SYS.dba_constraints.owner%TYPE DEFAULT schema_name 'SCOTT '.
)
IS
ddlcomd VARCHAR2 (4000);
CURSOR cur1
IS
SELECT *.
OF dba_constraints
WHERE constraint_type = 'R' and owner = upper (schema_name) and status = 'ACTIVÉ' AND R_OWNER = upper (schema_name) ORDER BY constraint_name;
BEGIN
FOR vcur IN cur1
LOOP
ddlcomd: = 'ALTER TABLE ' | vcur. Owner | '.' || vcur.table_name | "DISABLE THE CONSTRAINT ' | vcur.constraint_name;
Dbms_output.put_line (ddlcomd);
Tools.execall (ddlcomd);
Dbms_output.put_line ('forced'
|| vcur.constraint_name
|| "of the table.
|| vcur.table_name
|| '' a disabled successfully. ''
);
END LOOP;
EXCEPTION
WHILE OTHERS
THEN
ROLLBACK;
LIFT;
END disable_schema_ref_constraints;
/
I have the privilege of execute for this two procedures to my user test ex 'hr '. I also grant select it all user dictionary 'tools' (the user who is the owner of procedures) and on the user 'hr' (the user who executes the procedure). When I run the second procedure some constraints are disabled and some others generate a 01031 ora error.
What is the reason for this error?
You can try this with ALTER ANY TABLE privilege granted directly to the user TOOLS.
I think I have that privilege by the DBA role is not good enough.
You need a direct subsidy (ie. not through a role).
Tags: Database
Similar Questions
-
ORA-01031: insufficient privileges on ASM instance shutdown
Hello!
I installed oracle enterprise linux (5.4) and oracle grid 11.2 for stand-alone server on my server. After installing the database software, I created a database in my ASM instance.
My next step, that I wanted to test some crash szenarios ASM. First of all, I just wanted to stop the ASM instance:
[oracle@db11gr2 ~] $. oraenv
ORACLE_SID = [+ ASM]? + ASM
The ORACLE_HOME=/opt/oracle/product/11.2.0/grid Oracle base is/opt/oracle
[oracle@db11gr2 ~] $ sqlplus / as sysdba
SQL * more: Production release 11.2.0.1.0 on Mon Dec 28 10:29:36 2009
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the option of Automatic Storage Management
SQL > shutdown
ORA-01031: insufficient privileges
SQL >
What's not here?
[oracle@db11gr2 ~] $ id
UID = 500 (Oracle) gid = 500 (oinstall) groups = 500 (oinstall), 501 (dba), 502 (oper), 503 (asmadmin)
The oracle user has the required roles. The oracle sqlplus has the following privileges:
[oracle@db11gr2 bin] $ ls-l sqlplus
-rwxr-x---x 1 oracle oinstall 6873 15. Dec 13:55 sqlplus
For my database I can connect as sysdba and power, he...
Thank you
MarkusMarkus,
11.2, sound required for administrative tasks on ASM, you must connect using the SYSASM role. Sysdba for ASM using won't want to work more. Can you connect once more to the instance of the ASM using role Sysasm and post your comments?
HTH
Aman... -
ORA-01031: insufficient privileges, what is the solution?
[oracle@ora-lab2 ~] $ sqlplus/nolog
SQL * more: version 11.1.0.6.0 - Production on Fri Sep 18 14:01:43 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL > connect virtue sysdba;
ERROR:
ORA-01031: insufficient privileges
SQL > connect sys/test as sysdba;
Connected.
SQL > show the distance parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
remote_dependencies_mode string TIMESTAMP
remote_listener chain
Remote_login_passwordfile string EXCLUSIVE
REMOTE_OS_AUTHENT Boolean TRUE
remote_os_roles boolean FALSE
result_cache_remote_expiration integer 0
[oracle@ora-lab2 ~] $ rman
Recovery Manager: release 11.1.0.6.0 - Production on Fri Sep 18 14:02:24 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN > Connect target;
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges
RMAN > Connect target sys/test@prim01;
connected to target database: PRIM01 (DBID = 2934738896)
RMAN > exit
Complete recovery manager.
[oracle@ora-lab2 admin] $ cat sqlnet.ora
NAMES. DIRECTORY_PATH = (TNSNAMES)
SQLNET. AUTHENTICATION_SERVICE = (NONE)
#NAMES. DOMAINE_PAR_DEFAUT = EVERYONE
TRACE_LEVEL_CLIENT = OFF
SQLNET. EXPIRE_TIME = 30Pavan Kumar says:
Refer to http://www.psoug.org/reference/net_services.htmlPavan - Please note this is a library of Dan Morgan's more hosted psoug. Your reference is a copy of archive that is still available but is no longer maintained.
Please change your links to replace www.psoug.org by www.morganslibrary.com to get the latest wonderful resource of Dan thye. The correct link would be http://www.morganslibrary.com/reference/net_services.html
-
Win XP SP3 on a working group with the new installation of ora 10.2.0 cannot connect as sysdba :(
C:\Documents and Settings\T@LG4 > sqlplus
SQL * more: Release 10.2.0.1.0 - Production kills him Jun 9 17:41:29 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter the user name: sys / as sysdba
Enter the password:
ERROR:
ORA-01031: insufficient privileges
Enter the user name: sys virtue sysdba
Enter the password:
ERROR:
ORA-01031: insufficient privileges
Enter the user name: scott
Enter the password:
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
SQL > show user
The USER is 'SCOTT '.
SQL >
SQL >
SQL >
SQL > exit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Production
-----
C:\Documents and Settings\T@LG4 > sqlplus
SQL * more: Release 10.2.0.1.0 - Production on Tue 9 Jun 17:44:25 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter the user name: sys virtue sysdba
Enter the password:
ERROR:
ORA-01031: insufficient privileges
Enter the user name: sys / as sysdba
Enter the password:
ERROR:
ORA-01031: insufficient privileges
Enter the user name:
ERROR:
ORA-01017: name of user and password invalid. connection refused
SP2-0157: unable to connect to ORACLE after 3 attempts, leaving SQL * more
-----
C:\Documents and Settings\T@LG4 >
C:\Documents and Settings\T@LG4 > echo % ORACLE_SID %
ORCL
C:\Documents and Settings\T@LG4 > echo % ORACLE_HOME %
c:\oracle\product\10.2.0\db_1
C:\Documents and Settings\T@LG4 > path
PATH=c:\oracle\product\10.2.0\db_2\bin; C:\oracle\product\10.2.0\db_1\BIN; C:\WIND
OWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem%OMPATH%; C:\Program Files\Java\j
dk1.6.0_14\bin;
Marvel oca10g uses JDK 1.4? as I saw 1.4 during the installation process, but jdk 1.6 must model back with 1.4
-----
C:\Documents and Settings\T@LG4 > sqlplus/nolog
SQL * more: Release 10.2.0.1.0 - Production kills him Jun 9 17:46:16 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL > connect / as sysdba
ERROR:
ORA-01031: insufficient privileges
SQL >
changed SQLNET.ora problem remains the same
SQLNET. AUTHENTICATION_SERVICES = (NONE)
any suggestion would be appreciated...tiryakki wrote:
changed SQLNET.ora problem remains the same
SQLNET. AUTHENTICATION_SERVICES = (NONE)Have you tried to edit the sqlnet.ora to have 'SQLNET. AUTHENTICATION_SERVICES = (NTS)' in all ORACLE_HOMEs (server and client)?
-
SQL error: ORA-01031: insufficient privileges
I am trying to create a view. I logged as a DBA. Please suggest.
create or replace view tspace_vw as
SELECT tablespace_name,
Total_Size 'Total_Size (MB).
Free_space "Free_Space (MB).
(Total_size - free_space) "USED_SPACE (MB).
round (((Total_size-Free_Space)/Total_size) * 100, 2) | ' %' "% USED.
DE)
SELECT a.tablespace_name,
Round(sum(a.bytes)/1024/1024,2) Total_Size,.
Round(sum(b.free_bytes)/1024/1024,2) free_space
FROM dba_data_files a, (SELECT file_id, SUM (bytes) free_bytes
FROM dba_free_space
GROUP BY file_id
) b
WHERE a.file_id = b.file_id
and nom_tablespace not in ('SYSTEM', 'SYSAUX', 'UNDOTBS1', 'TEMP')
GROUP BY a.tablespace_name
)
ORDER BY nom_tablespace;
================================================
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
978487 wrote:
I am trying to create a view. I logged as a DBA. Please suggest.
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
You must grant the right to SELECT user views the two system.
>
Grant select on dba_data_files Scott;
Grant select on dba_free_space Scott;
>
I'm assuming that "connected is a DBA" means that you granted the DBA role to the user. But you need to grant privileges directly so that they are able to create a view.
See CREATE VIEW in the doc of the SQL language
http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_8004.htm
>
The owner of the schema containing the view must have the necessary privileges to either select, insert, update, or delete rows from all tables or views on which the opinion is based. The owner must grant these privileges directly, rather than through a role.
>
-
Nice day
I am trying to execute an interface in which data from a csv file must be loaded into a target table. I managed to debone the flat file and map all fields. But come running, I get this error message:
1031: 42000: java.sql.SQLException: ORA-01031: insufficient privileges
java.sql.SQLException: ORA-01031: insufficient privileges
I have already given modify and insert the user access.
Thanks in advanceLooks like your problem is solved. Why don't you close the message and give different points as useful for each answer and replied to the right answer to other users that have helped you.
-
Of FUNDING and dynamic SQL CREATE ANY TABLE
Hi gurus,
I have a dynamic SQL code in a procedure where a table to an existing table without data will be created.
strSQL: = "create table ' | strTemp | ' in select * from '. strArc. "where 1 = 2"; "
Execute immediate strSQL;
without GRANT CREATE ANY TABLE to user, * "ORA-01031: insufficient privileges" * error executing. "."
Is there a way to tackle this problem without providing a GRANT CREATE ANY TABLE privileged?
Thank you very much
Charles(1) why you are creating a table to run? Which seems to me very concerning. If you create a temporary table and you're accustomed to work how temporary tables in other databases, I would strongly suggest you look at how Oracle manages global temporary tables. If temporary storage is really necessary (99% of the time is not because of the consistent reading multi-version), you should be able to create global temporary tables a few during execution.
(2) the owner of the procedure should just need the CREATE TABLE privilege granted directly to the user (not granted through a role), assuming that it is in stored procedure a standard DEFINER rights.
Justin
-
Create table ORA-01031: insufficient privileges
SQL > indicate user USER is 'TEST_RPT.
SQL > CREATE TABLE mytest (id NUMBER); - it does not work
CREATE TABLE mytest (id NUMBER)
* ERROR at line 1: ORA-01031: insufficient privileges
SQL > CREATE TABLE TEST_RPT.mytest (id NUMBER).
Table created. SQL >
SQL > select * from session_privs;
PRIVILEGE
----------------------------------------
ANY PROCEDURE DEBUG
DEBUGGING SESSION CONNECT
CREATE INDEXTYPE
OPERATOR TO CREATE
CREATE THE TYPE
CREATE THE TRIGGER
CREATE PROCEDURE
CREATE SEQUENCES
CREATE VIEW
CREATE SYNONYM
CREATE THE CLUSTER
CREATE TABLE
UNLIMITED TABLESPACE
ALTER SESSION STATEMENT
CREATE SESSION
Try this:
SELECT USER, SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;
The two identical values? CURRENT_SCHEMA is what will determine the owner of the table you create, if you do not specify an owner.
This can be changed by
ALTER SESSION SET CURRENT_SCHEMA = whatever_you_want_it_to_be;
-
Error when using native dynamic SQL
Please can someone help me understand what's wrong with my code.
Code:
create or replace procedure p1 (name varchar2)
as
Start
run immediately "select * from ' |" name;
end;
/
Goal: Just to test the native dynamic SQL code using a placeholder.
COmpliation:
SQL > create or replace procedure p1 (name varchar2)
2 as
3
4 start
5 run immediately "select * from ' |" name;
6 end;
7.
Created procedure.
Error:
SQL > exec p1 ('employees');
BEGIN p1 ('employees'); END;
*
ERROR on line 1:
ORA-00923: THE KEYWORD not found where expected
ORA-06512: at "HR. "P1", line 5
ORA-06512: at line 1
SQL >
You need a space after the clause 'from', like this:
run immediately "select * from ' |" name;
-
ORA-01031: insufficient privileges when granted access privileges to a new user
Hello.
When you are connected to a SYSTEM, I'm trying to create a new user and give him all the system privileges, but do so always the following error message appears:
Cannot process the SQL command
-
Error at startup to the line: 123 to orders.
SYSDBA GRANT TestUser
Error report-
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
* Cause: An attempt was made to execute a database operation without
the necessary privileges.
* Action: Ask your database or the designated security administrator
administrator to grant you the required privileges
After clicking OK, the user is still being created, but it lacks many privileges to access.
How can I solve this problem?
I use Oracle SQL Developer version 4.1.2.20 and Oracle database 11g of the express edition.
Connect as SYS, not SYSTEM to grant this priv
Give him with extreme prejudice - it is powerful
Note in the 12 c database we have stopped a lot of the administrative bits of the SYSDBA role in less powerful. This gives you more flexibility on who can do what in your database
https://docs.Oracle.com/database/121/DBSEG/authorization.htm#DBSEG578
-
Service_name problem->; ORA-01031: insufficient privileges error!
I installed the database Oracle 11.2.0.1 on Oracle Linux 6.6, Virtualbox to test replication of the database.
I have oracle11g and grid of two users. User network is set to infrastructure grid on ASM.
When I prepare the database for duplication, I created a service_name as neworcl. When I connect to new oracle_sid with service name neworcl the following error has occurred!
[oracle11g@orcl11g dbs] $ sqlplus sys/222333@neworcl as sysdba
SQL * more: Production release 11.2.0.1.0 on Sun Oct 13 15:00:35 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
BUT WHEN I want TO CONNECT locally without service_name then it is OK as follows
Enter the user name: sys as sysdba
Enter the password:
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > select instance_name, status from v$ instance;
STATUS INSTANCE_NAME
---------------- ------------
neworcl START
My tnsnames.ora file located in oracle11g user home as below
tnsnames.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
= ORA11G
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
NEWORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = neworcl)
)
)
Listener.ora file located user to network as below
listener.ora # Network Configuration file: /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ora11g)
(ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ora11g)
)
(SID_DESC =
(GLOBAL_DBNAME = neworcl)
(ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = neworcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
)
)
ADR_BASE_LISTENER = / u01/app/grid
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = WE
QUESTION: Why I can't connect to the new database with service_name = neworcl?
Net Oracle connections as sysdba usually require a password file. Have you created a password file for your database?
You can check the content of $ORACLE_HOME/dbs and see if you have a file named "orapwneworcl". If you do not, you can create it using the orapwd utility. Change your password for SYS in sqlplus must automatically synchronize the password in the password file. The password file is necessary for remote connections, since you cannot authenticate using the OSDBA group and the database may in fact not even begin to verify your password.
For more details, see https://docs.oracle.com/cd/B28359_01/server.111/b28310/dba007.htm
BTW, when you connect AS SYSDBA using Protocol inheritance, you can use any user name and password and will always connect to the SYS schema, which case authentication is made by the OSDBA group identifier. For example, you can use any user name and password, such as "humptydumpy/blablaba sqlplus as sysdba".
-
How to pass the Record of entry to the dynamic SQL Code
Hi all
I am trying to run under Oracle applications API on the remote database using DB Link. I try to run using dynamic SQL. Part of the code is given below.
DECLARE
l_batch_info_rec wsh_picking_batches_pub.batch_info_rec;
l_rule_id NUMBER;
l_rule_name VARCHAR2 (240);
l_batch_prefix VARCHAR2 (240);
BEGIN
l_batch_info_rec.document_set_id: = v_document_set_id;
l_batch_info_rec.order_type_id: = v_order_type_id;
l_batch_info_rec. Default_Stage_Subinventory: = v_default_stage_subinventory;
l_batch_info_rec.pick_grouping_rule_id: = v_pick_grouping_rule_id;
l_batch_info_rec.pick_sequence_rule_id: = v_pick_sequence_rule_id;
l_batch_info_rec.autopack_level: = v_autopack_level;
l_batch_info_rec.autopack_flag: = v_autopack_flag;
l_batch_info_rec.ac_delivery_criteria: = v_ac_delivery_criteria;
l_batch_info_rec.backorders_only_flag: = v_backorders_only_flag;
l_batch_info_rec.existing_rsvs_only_flag: = v_existing_rsvs_only_flag;
l_batch_info_rec.customer_id: = v_customer_id;
l_batch_info_rec.order_header_id: = v_header_id;
l_batch_info_rec.from_scheduled_ship_date: = NULL;
l_batch_info_rec.organization_id: = v_organization_id;
l_batch_info_rec.include_planned_lines: = v_include_planned_lines;
l_batch_info_rec.autocreate_delivery_flag: = v_autocreate_deliveries_flag;
l_batch_info_rec.autodetail_pr_flag: = v_autodetail_pr_flag;
l_batch_info_rec.allocation_method: = 'I ';
l_batch_info_rec.pick_from_locator_id: = NULL;
l_batch_info_rec.auto_pick_confirm_flag: = 'n'; -The value manually to run Transact order
l_batch_info_rec.autopack_flag: = 'n'; -Manually configure to perform the manual packaging
l_rule_id: = NULL;
l_rule_name: = NULL;
l_batch_prefix: = NULL;
v_sqlstmt1: = ' START
wsh_picking_batches_pub.create_batch' | g_db_link | "(1.0,
fnd_api.g_true,
fnd_api.g_true,
: l_return_status,.
: l_msg_count,.
: l_msg_data,.
: l_rule_id,.
: l_rule_name,.
: l_batch_info_rec,.
: l_batch_prefix,.
: p_new_batch_id
);
END;';
--
EXECUTE IMMEDIATE V_sqlstmt1
With the HELP OF THE l_return_status,.
ON l_msg_count,.
ON l_msg_data,.
BY l_rule_id,
BY l_rule_name,
BY l_batch_info_rec,
BY l_batch_prefix,
OUT p_new_batch_id;
--
END;
After you run this script, I get below error "PLS-00457: expressions must be SQL types ' for variable l_batch_info_rec which is of type record. can someone please guide me how can I pass variable type dynamic SQL record.
Thank you
Priyanka
Food for thought:
On remote db:
SQL > create or replace
package 2 pkg
3 is
4 type r_type is (record
Number 5,
6 name varchar2 (10)
7 );
(p) 8 procedure
9 p_rec in r_type,
10 p_out out varchar2
11 );
12 end;
13.Package created.
SQL > create or replace
package 2 body pkg
3 is
4 procedure p)
5 p_rec in r_type,
6 p_out out varchar2
7 )
8 is
9 start
10 p_out: = "ID = ' |" p_rec.ID | 'Name =' | p_rec. Name;
11 end;
12 end;
13.Package body created.
SQL >
On local db:
SQL > set serveroutput on
SQL > declare
v_rec 2 pkg.r_type@pdb1sol12;
3 v_out varchar2 (50);
4 start
v_rec.ID 5: = 1;
6 v_rec.name: = 'XXX ';
7 immediate execution"
8 begin
9 pkg.p@pdb1sol12 (: 1,: 2);
10 end;'
11 using v_rec,
12 v_out;
13 dbms_output.put_line (v_out);
14 end;
15.
using v_rec;
*
ERROR on line 11:
ORA-06550: line 11, column 20:
PLS-00457: expressions must be SQL types
ORA-06550: line 7, column 5:
PL/SQL: Statement ignoredSQL > declare
2 number of v_id: = 1;
3 v_name varchar2 (10): = 'XXX ';
4 v_out varchar2 (50);
5. start
6 immediate execution"
7 report
8 v_rec pkg.r_type@pdb1sol12.
9 begin
10 v_rec.id := :1;
11 v_rec.name: =: 2;
12 pkg.p@pdb1sol12 (v_rec,: 3);
13 end;'
14 using v_id,
15 in v_name,
16 v_out;
17 dbms_output.put_line (v_out);
18 end;
19.
ID = 1 name = XXXPL/SQL procedure successfully completed.
SQL >
SY.
-
ORA-01031: insufficient privileges when connecting as SYSDBA
I am trying to connect to the database and receiving "ORA-01031: insufficient privileges". Database version is 11.2.0.3 (standalone) on Linux.
[oracle@dbserv admin] $ echo $ORACLE_HOME
/U01/app/Oracle/product/11.2.0.3/db1
[oracle@dbserv admin] $
[oracle@dbserv admin] $ which sqlplus
/U01/app/Oracle/product/11.2.0.3/db1/bin/sqlplus
[oracle@dbserv dbs] $ sqlplus sys/oracle@newdb as sysdba
SQL * more: Production release 11.2.0.3.0 Wed Aug 26 20:38:13 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter the user name:
Password file has been created and is in $ORACLE_HOME/dbs location.
[oracle@dbserv dbs] $ pwd
/U01/app/Oracle/product/11.2.0.3/db1/DBS
[oracle@dbserv dbs] $ ls - lrt * orapw *.
-rw - r - 1 oracle oinstall 1536 26 August to 20:38 orapwnewdb
To be clear, there is a version of GI 11.2.0.2 already installed with 11.2.0.2 RDBMS version on the same server (standalone).
In addition, 11.2.0.3 has been installed on the same machine and a new listening port has been created on 11.2.0.3 home for databases residing on this House.
Here are the details:
[oracle@dbserv dbs] $ ps - ef | grep tns
Oracle 4226 1 0 20:20? 00:00:00 /u01/app/oracle/product/11.2.0.2/grid/bin/tnslsnr EARPHONE-inherit
Oracle 4239 1 0 20:20? 00:00:00 /u01/app/oracle/product/11.2.0.3/db1/bin/tnslsnr LISTENER_NEWDB-inherit
Oracle 4599 3734 0 20:44 pts/2 00:00:00 grep tns
[oracle@dbserv dbs] $ lsnrctl status LISTENER_NEWDB
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on August 26, 2015 20:44:32
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=dbserv.mydomain) (PORT = 1526)))
STATUS of the LISTENER
------------------------
Alias LISTENER_NEWDB
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start date August 26, 2015 11:20:20
Uptime 0 days 0 h 24 min 21 sec
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Parameter Listener of the /u01/app/oracle/product/11.2.0.3/db1/network/admin/listener.ora file
The listener log file /U01/app/Oracle/diag/tnslsnr/dbserv/listener_newdb/alert/log.XML
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=dbserv.mydomain) (PORT = 1526)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1526)))
Summary of services...
Service 'SLAVE_PORT_NUM' has 1 instance (s).
Instance of 'SLAVE_PORT_NUM', status UNKNOWN, has 1 operation for this service...
The command completed successfully
My bad. OP has already validated the status of the listener. I just forgot.
I suspected to be an incompatibility with SID in regard to upper and lower case letters and now seem to be confident.
The listener status indicates the name of the instance as SLAVE_PORT_NUM but OP said as slave_port_num lowercase. Let's take a look in the file of the listener.
TNS ADMIN could also be a cause, but in this case, it could lift error related to the listener (TNS).
OP, please send the contents of listener.ora crossing 11.2.0.3 House.
-Jonathan Rolland
-
ORA-01031: insufficient privileges as sysdba
I can not connect as sysdba using service name
[ofssobp@ofss2311575 admin] $ sqlplus sys/welcome1@ORA2191 as sysdba
SQL * more: Production of the 11.2.0.3.0 version on Mon Jan 19 12:42:42 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
- SQLNET.ora
[ofssobp@ofss2311575 admin] $ cat sqlnet.ora
sqlnet.ora # Network Configuration file: /scratch/app/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
- NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
ADR_BASE = / scratch/app
#SQLNET. AUTHENTICATION_SERVICES = (NONE)
- Config.c
[lib ofssobp@ofss2311575] $ cat config.c
/ * SS_DBA_GRP sets the UNIX group for sqldba adminstrative access ID. */
/ * Refer to the Guide to Installation and usage for more information. */
/ * IMPORTANT: this file must be in harmony with
RDBMS/SRC/Server/OSDS/config.c, specifically as regards the
number of elements in the array ss_dba_grp.
*/
#define SS_DBA_GRP "dba".
#define SS_OPER_GRP "dba".
#define SS_ASM_GRP "dba".
char * ss_dba_grp [] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};
Hello
could you please create a password oracle.
orapwd file =... and try again
Kind regards
-
create returns user ORA-01031: insufficient privileges
Hi all
I am trying to create user on Oracle 11.2.0.4 windows db.
I get the following error
create the user one identified by a
Error in the command line column: 6:28
Error report:
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
* Cause: An attempt was made to change the user name or password
without the privilege appropriate. This error also occurs if
trying to install a database without the need for employment
access privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
If the user has been granted the privilege necessary for a higher label
that the connection is active.
* Action: Ask the database to perform the operation or grant administrator
the required privileges.
For users Trusted Oracle get this error, well that granted the
the privilege that is suitable for the top label, ask the database
administrator to grant the privilege to the appropriate label.
Please may I know how to solve.
I disabled Database Vault Account Management.
This allowed me to grant privileges as user sys.
C:\Users\rbastawa>sqlplus / as sysdba
SQL * more: Production release 11.2.0.4.0 on sea 12 Nov 09:56:40 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
With partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL > grant connect to one.
grant connect to a
*
ERROR on line 1:
ORA-47410: Violation of Kingdom for GRANT on CONNECT
SQL > grant connect to one.
Grant succeeded.
SQL >
Thanks for the help.
Maybe you are looking for
-
The noise stopped working on Satellite P100
The noise stopped working.Toshiba diagnosis explains his failure, but after all the rest is good, any ideas?
-
C6280 I can scan is no longer the file using menu scan - option isn't appearing any more
I have a C6280 all-in-one that no longer has the scan to file available in the menu option analysis.
-
Registration of 8831 with white keyboards
We received recently several conference phones 8831 who record well and will ring when it is called, but the keyboards are empty and there is no way to respond, or to use. We use this PoE. Has anyone experience this problem?
-
Application_Setup_Wizard of visual basic 5 does not work on windows 7
When you start the visual basic Application_Setup_Wizard 5 Windows 7 the message "an unexpected error has occurred."
-
In my console administration of Bc for my site in the first instance, there are very few options. Nothing on the menu dashboard for web applications, modules, etc... How do you get those? See attachment. Thank you.