Sunday, August 7, 2016

SQL 2014 related

Fastest way to find row count of all tables in SQL
SELECT T.name AS [TABLE NAME],
       I.rows AS [ROWCOUNT]
FROM   sys.tables AS T
       INNER JOIN sys.sysindexes AS I
               ON T.object_id = I.id
                  AND I.indid < 2
ORDER  BY I.rows DESC

Access denied when backup database :
Give account used by database service (or SQL Agent?) a write access to folder used as backup destination
source: Configure File System Permissions for Database Engine Access

No comments:

Post a Comment