USE [master]
GO
ALTER DATABASE VIPDB SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE VIPDB SET RECOVERY SIMPLE
GO
USE VIPDB
GO
--此处需要注意,并非所有数据库的日志文件名都是“数据库名”
DBCC SHRINKFILE (N'_NAVDB_VIP_Log' , 0,TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE VIPDB SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE VIPDB SET RECOVERY FULL
GO
--查询指定数据库的日志文件名称
USE VIPDB
GO
SELECT name FROM SYS.database_files WHERE type_desc='LOG'