문서의 이전 판입니다!
git clone https://github.com/kwon37xi/vagrant-mssql-express.git cd vagrant-mssql-express vagrant up
192.168.50.4
localhost
로 포트포워딩해서 접속 가능sa
password12!
install-sql-server.cmd
수정해서 변경가능apt-get install rdesktop
vagrant rdp
실행vagrant
vagrant
READ_UNCOMMITTED
로 하거나 모든 FROM절의 테이블 명 뒤에 WITH (NOLOCK)
을 지정한다. 붙여쓰지 말것.SELECT id FROM table_a WITH (NOLOCK) SELECT a.id, b.id FROM table_a a WITH (NOLOCK), table_b b WITH (NOLOCK) WHERE a.id=b.id
현재 DB에서 실행된 실제 SQL 문을 보고 싶다면 Logging all queries executed on MSSQL database | ..:: JOCHEN HEBBRECHT ::..
SELECT SQLTEXT.text, STATS.last_execution_time FROM sys.dm_exec_query_stats STATS CROSS APPLY sys.dm_exec_sql_text(STATS.sql_handle) AS SQLTEXT WHERE STATS.last_execution_time > GETDATE()-1 ORDER BY STATS.last_execution_time DESC
IF EXISTS (SELECT * FROM [CATALOG_NAME].INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='[TABLE_NAME]' AND TABLE_SCHEMA='dbo') DROP TABLE [CATALOG_NAME].dbo.[TABLE_NAME];
DROP TABLE IF EXISTS [CATALOG_NAME].dbo.[TABLE_NAME];