분류 전체보기213 docker / SQLSERVER / MSSQL / 데이터베이스복원 / 계정생성 / 권한부여 / 백업스크립트 실행 1. docker CONTAINER ID 확인 user@PC:/$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ab11426a70ce mcr.microsoft.com/mssql/server:2019-latest "/opt/mssql/bin/perm…" 9 minutes ago Up 9 minutes 0.0.0.0:11433->1433/tcp, :::11433->1433/tcp sql-server-container user@PC:/$ 2. sqlcmd 실행 2.1 docker 내부 Container console 실행 user@PC:/$ docker exec -it ab11426a70ce /opt/mssql-tools/bin/sqlcmd.. 2024. 2. 29. docker / SQLSERVER / MSSQL / 데이터베이스생성 / 계정생성 / 권한부여 1. docker CONTAINER ID 확인 user@PC:/$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7c226918297a mcr.microsoft.com/mssql/server:2019-latest "/opt/mssql/bin/perm…" 9 minutes ago Up 9 minutes 0.0.0.0:11433->1433/tcp, :::11433->1433/tcp sql-server-container user@PC:/$ 2. sqlcmd 실행 2.1 docker 내부 Container console 실행 user@PC:/$ docker exec -it 7c226918297a /opt/mssql-tools/bin/sqlcmd.. 2024. 2. 29. docker / SQLServer 2019 / 설치 / 백업 docker-compose.yaml version: '3.8' services: sql-server: image: mcr.microsoft.com/mssql/server:2019-latest container_name: sql-server-container environment: SA_PASSWORD: YourPassword123! ACCEPT_EULA: Y ports: - "11433:1433" networks: - sql-net volumes: - sql-data:/var/opt/mssql ### 백업파일저장을위해 호스트의 저장위치(/BACKUP/mssql) 와 컨터이너 내부의 경로(/var/opt/mssql/backup) 연결 ######## ### 호스트 저장위치의 저장권한확인필요( chmod 7.. 2024. 2. 27. MSSQL / column comment / add , update, delete - 조회 SELECT obj.name AS TableName, col.name AS ColumnName, ep.value AS ColumnComment FROM sys.extended_properties AS ep INNER JOIN sys.objects AS obj ON ep.major_id = obj.object_id INNER JOIN sys.columns AS col ON ep.major_id = col.object_id AND ep.minor_id = col.column_id WHERE obj.type_desc = 'USER_TABLE' AND ep.class_desc = 'OBJECT_OR_COLUMN' AND ep.name = 'MS_Description'; - 주석 추가 EXEC sp_ad.. 2024. 2. 26. 이전 1 2 3 4 5 6 7 ··· 54 다음 반응형