Microsoft MVP성태의 닷넷 이야기
오류 유형: 872. Oracle - ORA-01031: insufficient privileges [링크 복사], [링크+제목 복사]
조회: 3451
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 2개 있습니다.)

Oracle - ORA-01031: insufficient privileges

오라클에서 특정 계정에 권한 부여를 해볼까요? ^^ 우선, 지난 글에 설명한 컨테이너 환경의 경우,

docker - OracleXE 컨테이너 실행
; https://www.sysnet.pe.kr/2/0/12191

sqlplus를 찾아 들어가,

# find / -name sqlplus
...[생략]...
/u01/app/oracle/product/11.2.0/xe/bin/sqlplus
/u01/app/oracle/product/11.2.0/xe/sqlplus


# cd /u01/app/oracle/product/11.2.0/xe/bin
# ./sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 12 04:21:10 2023

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: system
Enter password: 

Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

("docker - OracleXE 컨테이너 실행" 글에서 예를 든 container는 system 계정에 oracle 비밀번호입니다.)

이렇게 로그인하고 권한 부여 명령을 내렸더니,

SQL> grant execute on SYS.DBMS_LOCK to hr;
                          *
ERROR at line 1:
ORA-01031: insufficient privileges

권한 부족이라고 오류가 발생하는군요. ^^;

01031. 00000 -  "insufficient privileges"
*Cause:    An attempt was made to perform a database operation without
           the necessary privileges.
*Action:   Ask your database administrator or designated security
           administrator to grant you the necessary privileges

관리자한테 필요한 특권을 요청하라고 하는데... system 사용자에게 저런 메시지는 도움이 되지는 않습니다. ^^; 혹시나 다른 sys 권한으로 로그인을 해볼까요?

Enter user-name: sys   
Enter password: 
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

(sys도 system과 동일하게 oracle 비밀번호인데,) 다행히 이번에는 다소 다른 메시지가 나옵니다. 그리고 이 힌트를 기반으로 검색해,

How to Resolve ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
; https://logic.edchen.org/how-to-resolve-ora-28009-connection-as-sys-should-be-as-sysdba-or-sysoper/

답을 찾았군요. ^^ 그러니까, system 계정으로 로그인 후 명시적으로 sysdba로 연결하는 명령을 내려야 하는 것입니다.

SQL> conn sys/oracle@xe as sysdba
Connected.

이후, 권한 변경 명령어가 이렇게 잘 수행됩니다. ^^

SQL> grant execute on SYS.DBMS_LOCK to hr;

Grant succeeded.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 7/16/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 16  17  18  19  20  21  22  23  [24]  25  26  27  28  29  30  ...
NoWriterDateCnt.TitleFile(s)
13030정성태4/15/20226492오류 유형: 804. 정규 표현식 오류 - Quantifier {x,y} following nothing.
13029정성태4/14/20226896Windows: 203. iisreset 후에도 이전에 설정한 전역 환경 변수가 w3wp.exe에 적용되는 문제
13028정성태4/13/20226806.NET Framework: 1193. (appsettings.json처럼) web.config의 Debug/Release에 따른 설정 적용
13027정성태4/12/20227102.NET Framework: 1192. C# - 환경 변수의 변화를 알리는 WM_SETTINGCHANGE Win32 메시지 사용법파일 다운로드1
13026정성태4/11/20228628.NET Framework: 1191. C 언어로 작성된 FFmpeg Examples의 C# 포팅 전체 소스 코드 [3]
13025정성태4/11/20227961.NET Framework: 1190. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 vaapi_encode.c, vaapi_transcode.c 예제 포팅
13024정성태4/7/20226455.NET Framework: 1189. C# - 런타임 환경에 따라 달라진 AppDomain.GetCurrentThreadId 메서드
13023정성태4/6/20226760.NET Framework: 1188. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 transcoding.c 예제 포팅 [3]
13022정성태3/31/20226663Windows: 202. 윈도우 11 업그레이드 - "PC Health Check"를 통과했지만 여전히 업그레이드가 안 되는 경우 해결책
13021정성태3/31/20226834Windows: 201. Windows - INF 파일을 이용한 장치 제거 방법
13020정성태3/30/20226572.NET Framework: 1187. RDP 접속 시 WPF UserControl의 Unloaded 이벤트 발생파일 다운로드1
13019정성태3/30/20226571.NET Framework: 1186. Win32 Message를 Code로부터 메시지 이름 자체를 구하고 싶다면?파일 다운로드1
13018정성태3/29/20227108.NET Framework: 1185. C# - Unsafe.AsPointer가 반환한 포인터는 pinning 상태일까요? [5]
13017정성태3/28/20226910.NET Framework: 1184. C# - GC Heap에 위치한 참조 개체의 주소를 알아내는 방법 - 두 번째 이야기 [3]
13016정성태3/27/20227768.NET Framework: 1183. C# 11에 추가된 ref 필드의 (우회) 구현 방법파일 다운로드1
13015정성태3/26/20229120.NET Framework: 1182. C# 11 - ref struct에 ref 필드를 허용 [1]
13014정성태3/23/20227693VC++: 155. CComPtr/CComQIPtr과 Conformance mode 옵션의 충돌 [1]
13013정성태3/22/20226024개발 환경 구성: 641. WSL 우분투 인스턴스에 파이썬 2.7 개발 환경 구성하는 방법
13012정성태3/21/20225348오류 유형: 803. C# - Local '...' or its members cannot have their address taken and be used inside an anonymous method or lambda expression
13011정성태3/21/20226826오류 유형: 802. 윈도우 운영체제에서 웹캠 카메라 인식이 안 되는 경우
13010정성태3/21/20225751오류 유형: 801. Oracle.ManagedDataAccess.Core - GetTypes 호출 시 "Could not load file or assembly 'System.DirectoryServices.Protocols...'" 오류
13009정성태3/20/20227379개발 환경 구성: 640. docker - ibmcom/db2 컨테이너 실행
13008정성태3/19/20226673VS.NET IDE: 176. 비주얼 스튜디오 - 솔루션 탐색기에서 프로젝트를 선택할 때 csproj 파일이 열리지 않도록 만드는 방법
13007정성태3/18/20226259.NET Framework: 1181. C# - Oracle.ManagedDataAccess의 Pool 및 그것의 연결 개체 수를 알아내는 방법파일 다운로드1
13006정성태3/17/20227335.NET Framework: 1180. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 remuxing.c 예제 포팅
13005정성태3/17/20226199오류 유형: 800. C# - System.InvalidOperationException: Late bound operations cannot be performed on fields with types for which Type.ContainsGenericParameters is true.
... 16  17  18  19  20  21  22  23  [24]  25  26  27  28  29  30  ...