본문 바로가기
반응형

Oracle(DB관련)77

table 권한 조회 grant select, update, delete on 테이블 to 유저; revoke select, update, delete on 테이블 from 유저; oracle select * from user_tab_privs mssql select * from information_schema.table_privileges 2022. 2. 11.
Oralce rollup, cube, grouping sets Oralce rollup, cube, grouping sets 오라클 rollup, cube, grouping sets, 컬럼추출 그룹화 사용법&예제 by codecow 2020. 11. 12. 오라클의 rollup, cube 함수는 group by와 함께 사용하는 옵션입니다. rollup : 첫 번째 컬럼의 집계 결과를 추출 cube : 모든 컬럼의 집계 결과를 추출 직책별, 성별 인원수를 추출하겠습니다. select sajob, gender, count(*) from sawon group by rollup(sajob, gender); 위처럼 group by에 rollup을 사용하게 되면, 직책별 성별, 직책별, 전체 인원수를 집계해줍니다. 성별 인원수까지 집계하려면 cube를 사용하면 됩니다. sel.. 2022. 2. 4.
oracle 정규식 REGEXP Oracle 10g에서는 REGEXP_로 시작하는 함수를 지원합니다. 레귤러 익스프레션 지원이죠. 아래는 그 함수들의 사용방법을 공유합니다. 1. REGEXP_INSTR 함수 - 문법 : REGEXP_INSTR(소스 문자열, Pattern [, 검색 시작 위치 [, 발생 횟수 [, 반환 옵션 [, Match를 시도할 때의 옵션]]]]) - 예제 1 2 3 4 5 6 SELECT REGEXP_INSTR('Regular Expression', 'a') REG_INS FROM dual; REG_INS ---------- 6 2. REGEXP_LIKE - 문법 : REGEXP_LIKE(소스 문자열, Pattern [, Match를 시도할 때의 옵션]) - [[:digit:]] : 숫자인것 - [^[:digit:.. 2021. 11. 10.
FTP From PL/SQL FTP From PL/SQL Sometimes it's preferable to trigger FTP jobs directly from PL/SQL rather than rely on CRON or AT. This article contains a brief description of the two methods I use. Shell Script PL/SQL FTP API ACL for 11g SFTP and FTPS Shell Script The first method relies on a java stored procedure, described in Shell Commands From PL/SQL, which can be used to trigger a shell script to perform .. 2021. 7. 14.
oracle 독립 트랜잭션 pragma autonomous_transaction oracle 독립 트랜잭션 pragma autonomous_transaction www.dator.co.kr/jmlee/textyle/243351 오라클 autonomous(자율적, 자주적) 트랜잭션 추천 스크랩 URL복사 아래의 내용은 오로지 테스... www.dator.co.kr 2021. 4. 13.
Oracle table, tablespace 용량 확인 Oracle table 용량 확인 select owner, segment_name, segment_type, sum(bytes) / 1024 / 1024 as mb from dba_segments where segment_type = 'TABLE' and owner = 'SCOTT' and segment_name = 'ENP' group by owner, segment_name, segment_type order by 1, 2 Oracle tablespace 용량 확인 select tablespace_name, round(sum(a.total) / 1024 / 1024, 1) as total_mb, round(sum(a.total) / 1024 / 1024, 1) - round(sum(a.sum1) / .. 2021. 3. 19.
MSSQL to ORACLE DB LINK MSSQL to ORACLE DB LINK https://bluelicht.tistory.com/47 [DB]CentOS UnixODBC 설정 방법 수동설치 1. http://www.unixodbc.org/ odbc 설치 2. tar xzvf unixODBC-2.3.7.tar.gz 3. cd unixODBC-2.3.7/ 4. ./configure 5. make 6. make install 7. isql 자동 ===선택=== #RedHat Enterprise Server 6 curl https://packages.microsoft.com/config/rhel/6/pr bluelicht.tistory.com 출처 bae9086.tistory.com/128?category=825640 MSSQL to Orac.. 2021. 3. 19.
oracle pl/sql ftp FTP From PL/SQL oracle-base.com/articles/misc/ftp-from-plsql 2020. 11. 25.
Oralce DDL on Remote Database With Database Link Oralce DDL Command on Remote Database With Database Link 원격지db DBLINK DDL 실행 exec dbms_utility.exec_ddl_statement@dblink('truncate table tb_test'); exec dbms_utility.exec_ddl_statement@dblink('create table tb_test(id number)'); exec dbms_utility.exec_ddl_statement@dblink('drop table tb_test'); 2020. 9. 23.
dbeaver dbeaver dbeaver.io/download/ Download | DBeaver Community Download Tested and verified for MS Windows 7/8/10, Linux and Mac OS X. DBeaver requires Java 1.8 or higher. Windows and MacOS installers include OpenJDK 11 bundle. If you are on Mac OS X and you do NOT use PKG installer then you will need to setup Java. N dbeaver.io 2020. 7. 20.
반응형