You want to quickly find out what the recovery model is for your database but you don’t want to start clicking and right-clicking in SSMS/Enterprise Manager to get that information. This is what you can do, you can use databasepropertyex to get that info. Replace ‘msdb’ with your database name
SELECT DATABASEPROPERTYEX(‘msdb’,‘Recovery’)
What if you want it for all databases in one shot? No problem here is how, this will work on SQL Server version 2000
SELECT name,DATABASEPROPERTYEX(name,‘Recovery’)
FROM sysdatabases
For SQL Server 2005 and up, you should use the following command
SELECT name,recovery_model_desc
FROM sys.databases
Performance of the SQL MERGE vs. INSERT/UPDATE
-
MERGE is designed to apply both UPDATE and INSERTs into a target table from
a source table. The statement can do both at once, or simply do INSERTs or
on...
No comments:
Post a Comment