반응형
반응형

[MSSQL] 트랜잭션 로그가 꽉 차서 해결할때. 로그 축소

 

DB서버가 용량 부족이라서 확인해보니 로그파일이 37기가!!!

 

바로 트랜잭션 축소 해버림. 

DBCC SHRINKFILE   
(  
    { file_name | file_id }   
    { [ , EMPTYFILE ]   
    | [ [ , target_size ] [ , { NOTRUNCATE | TRUNCATEONLY } ] ]  
    }  
)  
[ WITH NO_INFOMSGS ]  



--https://docs.microsoft.com/ko-kr/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql?view=sql-server-ver15
-- DB log 축소 
 
USE [DataBase];

ALTER DATABASE [DataBase] SET RECOVERY SIMPLE;

-- 로그파일을 10MB로 축소

DBCC SHRINKFILE ([DataBase_Log], 10);

ALTER DATABASE [DataBase] 
SET RECOVERY FULL;
-- 로그 파일을 지정한 대상 크기로 축소

USE AdventureWorks2012;  
GO  

-- Truncate the log by changing the database recovery model to SIMPLE.  
ALTER DATABASE AdventureWorks2012  
SET RECOVERY SIMPLE;  
GO  

-- Shrink the truncated log file to 1 MB.  
DBCC SHRINKFILE (AdventureWorks2012_Log, 1);  
GO  

-- Reset the database recovery model.  
ALTER DATABASE AdventureWorks2012  
SET RECOVERY FULL;  
GO  

 

https://docs.microsoft.com/ko-kr/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql?view=sql-server-ver15 

 

DBCC SHRINKFILE(Transact-SQL) - SQL Server

DBCC SHRINKFILE(Transact-SQL)

docs.microsoft.com

 

반응형
반응형

DB Browser for SQLite

 

sqlitebrowser.org/

 

DB Browser for SQLite

DB Browser for SQLite The Official home of the DB Browser for SQLite Screenshot What it is DB Browser for SQLite (DB4S) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite. DB4S is for users and dev

sqlitebrowser.org

 

반응형
반응형

 

root bin]# tbsql sys/tibero  

* sys : ID
* tibero : PW

 

tbsql id/pw

@'C:\Users\___\Desktop\sql\sql_file.sql'

반응형
반응형
반응형
반응형

오라클 아이디, 비밀번호 필요하니까 가입하자!

 

 

https://www.oracle.com/

 

Oracle | Integrated Cloud Applications and Platform Services

Autonomous Database for Dummies Find out how your Oracle Database can install, manage, secure, and upgrade itself. That’s all possible today, thanks to the power of machine learning, artificial intelligence (AI), and the cloud.

www.oracle.com

https://www.oracle.com/kr/database/technologies/appdev/sql-developer.html

 

SQL Developer | Oracle 대한민국

Oracle SQL Developer Oracle SQL Developer is a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud deployments. SQL Developer offers complete end-to-end development of you

www.oracle.com

https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

 

Oracle SQL Developer Downloads

 

www.oracle.com

 

반응형
반응형
SQL for Beginners in a Nutshell

반응형

+ Recent posts