Quantcast
Channel: Marc Valk dot NetMarc Valk dot Net » SQL
Browsing latest articles
Browse All 3 View Live

SQL: getting column information

To retrieve a list of column information for a table using T-SQL, use the following method: SELECT ORDINAL_POSITION ,COLUMN_NAME ,DATA_TYPE ,CHARACTER_MAXIMUM_LENGTH ,IS_NULLABLE ,COLUMN_DEFAULT FROM...

View Article


See backup chain SQL Server

See the backup chain in SQL Server SELECT TOP 100 s.database_name, CASE s.type WHEN 'D' THEN 'Full' WHEN 'I' THEN 'Differential' WHEN 'L' THEN 'Transaction Log' END AS BackupType, CAST(DATEDIFF(second,...

View Article


SQL: backup / restore DB status

A nice script I found to use when you are backing up /  restoring a SQL database and you want to see the progress.SELECT r.session_id,r.command,CONVERT(NUMERIC(6,2),r.percent_complete) AS [Percent...

View Article
Browsing latest articles
Browse All 3 View Live