Skip to content

Commit 07ff288

Browse files
Update troubleshoot-a-full-transaction-log-sql-server-error-9002.md (#32324)
Co-authored-by: Randolph West MSFT <97149825+rwestMSFT@users.noreply.github.com>
1 parent 066c07f commit 07ff288

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/relational-databases/logs/troubleshoot-a-full-transaction-log-sql-server-error-9002.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ BEGIN
112112
used_log_space_in_bytes,
113113
used_log_space_in_percent,
114114
log_space_in_bytes_since_last_backup
115-
from ' + @dbname +'.sys.dm_db_log_space_usage'
115+
from [' + @dbname +'].sys.dm_db_log_space_usage'
116116

117117
BEGIN TRY
118118
exec (@SQL)
@@ -173,7 +173,7 @@ BEGIN
173173
if (@log_reuse_wait = 1)
174174
BEGIN
175175
select 'Consider running the checkpoint command to attempt resolving this issue or further t-shooting may be required on the checkpoint process. Also, examine the log for active VLFs at the end of file' as Recommendation
176-
select 'USE ''' + @dbname+ '''; CHECKPOINT' as CheckpointCommand
176+
select 'USE ' + QUOTENAME(@dbname) + '; CHECKPOINT' as CheckpointCommand
177177
select 'select * from sys.dm_db_log_info(' + CONVERT(varchar,@database_id)+ ')' as VLF_LogInfo
178178
END
179179
else if (@log_reuse_wait = 2)
@@ -232,7 +232,7 @@ BEGIN
232232
BEGIN
233233
select 'For memory-optimized tables, an automatic checkpoint is taken when transaction log file becomes bigger than 1.5 GB since the last checkpoint (includes both disk-based and memory-optimized tables)' as Finding
234234
select 'Review https://blogs.msdn.microsoft.com/sqlcat/2016/05/20/logging-and-checkpoint-process-for-memory-optimized-tables-2/' as ReviewBlog
235-
select 'use ' +@dbname+ ' CHECKPOINT' as RunCheckpoint
235+
select 'use [' +@dbname+ '] CHECKPOINT' as RunCheckpoint
236236
END
237237
238238
FETCH NEXT FROM no_truncate_db into @log_reuse_wait, @log_reuse_wait_desc, @dbname, @database_id, @recovery_model_desc

0 commit comments

Comments
 (0)