-- Database encoding 확인 쿼리 SHOW VARIABLES LIKE 'c%'; @ 방법1) 아래와 같이 db url에 옵션 추가 "?useUniCode=yes&characterEncoding=UTF-8" - globals.properties 예) App.db.Url=jdbc:mysql://127.0.0.1:3306/mysql?useUniCode=yes&characterEncoding=UTF-8 @ 방법2) my.cnf or my.ini 편집 1. 파일 위치 탐색 find / | grep my.cnf 2. 편집 2-1. 방법1) vi로 편집 2-2. 방법2) docker cp 이용 a. docker cp mysql:/etc/my.cnf ./my.cnf b. 아래 내용 편집 c. docker..
PostgreSQL column 값 자동증가(auto increment) 1. SEQUENCE -- 시퀀스 생성 create sequence seq_id; -- 테이블 생성 create table user ( id int not null default nextval('seq_id'), name varchar(10) ); -- 시퀀스 매핑 alter sequence seq_id OWNED BY user.id; -- 테스트 insert into user (name) values ('test1'); insert into user (id, name) values (default, 'test2'); ===================== 2. SERIAL -- 테이블 생성 create table user ( id..
oracle11g dual table - ORA-00942: table or view does not exist -- ORA-00942: table or view does not exist select * from dual; -- 조회 확인 select * from sys.dual; -- dual table 확인 select * from all_objects where object_name = 'DUAL'; -- dual synonym 확인 select synonym_name from dba_synonyms where synonym_name='DUAL'; -- dual sylnonym 없으면 실행 create public synonym dual for sys.dual; -- dual table 테스트 s..
-- PASSWORD_LIFE_TIME 확인 select * from dba_profiles; -- PASSWORD_LIFE_TIME: unlimited 설정 alter profile default limit PASSWORD_LIFE_TIME unlimited; --dba user 상태 확인 select * from dba_users WHERE username='[user]'; -- password 변경 (기존 비번으로 재설정 가능) alter user [user] identified by 1234; 요청한 작업을 수행하는 중 데이터베이스 경고 발생: ORA-28002: the password will expire within 6 days 28002. 00000 - "the password will ex..
-- 물리 저장 경로 & tablespace 정보 SELECT * FROM dba_data_files; -- tablespace 정보 select * from dba_tablespaces; -- 사용자 default tablespace 확인 SELECT * FROM user_users; -- tablespace 생성 CREATE TABLESPACE DHUB datafile '/u01/app/oracle/product/11.2.0/xe/dbs/DHUB' SIZE 10M autoextend ON NEXT 10M maxsize unlimited; -- tablespace 변경 ALTER USER dhub DEFAULT TABLESPACE DHUB ;
-- 계정 상태 확인 -- select * from dba_users where username='계정]; -- DB 설정 확인 -- select * from dba_profiles where profile = 'DEFAULT'; -- password 만료 무제한 설정 -- alter profile default limit password_life_time unlimited; -- 계정 비전 변경 -- alter user 계정 identified by 비번;
============================== @ 계정 생성 -- Table Space를 생성 create tablespace ts_[계정] datafile 'C:\oradata\[계정].DBF' size 1g autoextend on next 512m maxsize unlimited; -- DB계정을 생성 create user [계정] identified by [비밀번호] default tablespace ts_[계정] temporary tablespace temp; -- 생성한 계정에 권한을 부여 grant connect, resource, create view to [계정]; -- 계정에 Table Space에 관련한 권한을 부여 alter user [계정] account unlock; g..
1. select * from [Table Name] where [Date Column] > '2018-03-01' and [Date Column] < '2018-03-02'2. select * from [Table Name] where [Date Column] between '2018-03-01' and '2018-03-02'3. CONVERT( varchar(10), [Date Column], 23 ) = '2018-03-01'23 : Date Format
DECLARE @변수 INTSELECT @변수 = COUNT(*) FROM TABLE
안드로이드 초창기 개발에 쓰던 SQLite고맙지만 갈아탄다 렐름 로컬 DB 아래와 같이 기본 샘플을 테스트 한 결과 GetInstance()에 오류가 있어 고생 조금 했다.테스트 결과 .net core에서는 문제가 없었으나 .net framework에서는 GetInstance()에서 오류를 출력한다. RealmConfiguration을 만들고 file full path를 넣어주니 문제는 해결됬다.========================================== public class Dog : RealmObject { public string Name { get; set; } public int Age { get; set; } } private static ulong REALM_SCHEMA_V..