IT/DB(6)
-
[oracle] DB 이관하기(Windows to Ubuntu)
기존 환경: Windows 2008 Std 변경: Ubuntu 20.04, docker 1. 전체 백업 진행 > exp userid=유저명/비밀번호 file='C:\full.dmp' full=y 2. 컨테이너 구성 $ sudo docker pull jaspeen/oracle-xe-11g $ sudo docker run --name oracle11g -d -p 1521:1521 jaspeen/oracle-xe-11g 📌 이미지 'jaspeen/oracle-xe-11g'의 DB 계정 정보는 system/oracle 이다. 3. 백업본 복사 및 복원 진행 $ sudo docker cp /tmp/full.dmp /home/ oracle11g $ sudo docker exec -it oracle11g imp us..
2021.10.18 -
MSSQL 네트워크 드라이브 연결
Connect only. EXEC sp_configure 'how advanced options',1 RECONFIGURE EXEC sp_configure 'xp_cmdshell',1 RECONFIGURE EXEC XP_CMDSHELL 'net use Z: \\10.0.0.1\m$ password /user:administrator' EXEC XP_CMDSHELL 'dir Z:' Connect 및 Disconnect -- 고급 옵션 활성 EXEC sp_configure 'how advanced options',1 RECONFIGURE -- xp_cmdshell 활성 EXEC sp_configure 'xp_cmdshell',1 RECONFIGURE -- 네트워크 드라이브 연결 EXEC XP_CMDSHELL..
2020.12.04 -
[mssql] 네트워크 드라이브 연결 하기.
2020/12/04 - [IT/DB] - MSSQL 네트워크 드라이브 연결 mssql은 기본적으로 네트워크 드라이브를 조회할 수 없게 구성 되어있다. 그래서 아무리 Windows에서 네트워크 드라이브를 구성해서 mssql에서는 조회할 수 없다. 하지만 mssql에서 네트워크를 사용할 수 있게 구성하면, DB를 백업하거나 복원할 때 네트워크 드라이브를 연결하여 효율적으로 작업할 수 있다. 0) 먼저, 기존에 구성된 네트워크 드라이브와 동일한 구성을 사용하려면 연결을 끊어두고 시작하자. > net use /delete [문자열|네트워크 경로] > net use /delete Z: 1) mssql에서 Windows 명령어를 사용할 수 있게 설정한다. -- 고급 옵션 EXEC sp_configure 'how a..
2020.11.14 -
[mssql] Transact-SQL, DB 파일 경로 이동(DB detach, attach)
version: Microsoft SQL Server 2012 (SP3) ! 사용 중인 프로시저가 있을 경우 detach가 진행 되지 않는다. ! 운영 서비스에 영향이 있는지 확인해보고 오프라인 전환 후 진행. ! If the procedure is running or using DB, you can't detach the Database. ! First, you have to check the Service in operation. After that, switching the database offline. use master; GO EXEC sp_detach_db @dbname = N'mydb'; GO ! detach 후, mdf 및 ldf 파일 복사 진행. ! After detach the dat..
2020.10.14 -
[mssql] Transact-SQL, DB detach attach
version: Microsoft SQL Server 2012 (SP3) ! If the procedure is running or using DB, you can't detach the Database. ! First, you have to check the Service in operation. After that, switching the database offline. use master; GO EXEC sp_detach_db @dbname = N'mydb'; GO ! After detach the databse, you can copy the mdf and ldf file. ! if the file copy is finished normally, you can attach the DB with ..
2020.10.14 -
[MariaDB] DB 이관하기 | mariadb 백업, 복원
기존 DB 백업하기 // 전체 DB 백업 # mysqldump -u[유저명] -p -A > [파일명] # mysqldump -uuser1 -p -A > Backup_DB_`date +%y%m%d`.sql // 특정 DB 백업 # mysqldump -u[유저명] -p [DB명] > [파일명] # mysqldump -uuser1 -p Service1 > Backup_DB_Service1_`date +%y%m%d`.sql DB 구성하기 더보기 MariaDB 설치 및 서비스 등록 // 관련 패키지 설치 # yum install mariadb mariadb-server -y // 패키지 설치 여부 확인 # mysql --version # systemctl status mariadb // 서비스 시작 # syste..
2020.08.20