Sqlserver
 sql >> Teknologi Basis Data >  >> RDS >> Sqlserver

Daftar Cadangan Rencana Pemeliharaan SQL Server 2008

USE DatabaseName
GO

SELECT 
s.database_name,
m.physical_device_name,
CAST(CAST(s.backup_size / 1000000 AS INT) AS VARCHAR(14)) + ' ' + 'MB' AS bkSize,
CAST(DATEDIFF(second, s.backup_start_date,
s.backup_finish_date) AS VARCHAR(4)) + ' ' + 'Seconds' TimeTaken,
s.backup_start_date,
CAST(s.first_lsn AS VARCHAR(50)) AS first_lsn,
CAST(s.last_lsn AS VARCHAR(50)) AS last_lsn,
CASE s.[type]
WHEN 'D' THEN 'Full'
WHEN 'I' THEN 'Differential'
WHEN 'L' THEN 'Transaction Log'
END AS BackupType,
s.server_name,
s.recovery_model
FROM msdb.dbo.backupset s
INNER JOIN msdb.dbo.backupmediafamily m ON s.media_set_id = m.media_set_id
WHERE s.database_name = DB_NAME() -- Remove this line for all the database
ORDER BY backup_start_date DESC, backup_finish_date
GO

Oleh Pinal Dave SUMBER




  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Optimasi Sql:Xml atau Delimited String

  2. Skrip Inventaris Koleksi SQL Server -1

  3. Kueri SQL Server Passthrough sebagai dasar untuk kumpulan data DAO di Access

  4. Konfigurasikan Lingkungan StartUp di SQL Server Management Studio (SSMS) - Tutorial SQL Server / TSQL Bagian 7

  5. SQL Server - Dalam klausa dengan variabel yang dideklarasikan