MSSQL Backup History Query
To see MSSQL history Query, run this SQL query. It will show all backups between the 1 january 2021 and 1 february 2021, order by Database and then Last backup time. It will also...
Kenneth Qvistgaard Dalbjerg, IT Konsulent i århus
To see MSSQL history Query, run this SQL query. It will show all backups between the 1 january 2021 and 1 february 2021, order by Database and then Last backup time. It will also...
You can check which statements are blocked by running this
Here are a Script, that you can use to extract the SQL Agent Job History This will also tell you the job steps Thanks to Chad Churchwell – https://www.mssqltips.com/sqlservertip/2850/querying-sql-server-agent-job-history-data/
The function I use fn_hadr_group_is_primary from this post is a UDF (User Defined Function) that we create in the master database. The function gets an Availability Group name as an input parameter and returns a Boolean value indicating...
Run this command to see if any database on the SQL Server is using enterprise features
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
IF OBJECT_ID('tempdb.dbo.##enterprise_features') IS NOT NULL DROP TABLE ##enterprise_features CREATE TABLE ##enterprise_features ( dbname SYSNAME, feature_name VARCHAR(100), feature_id INT ) EXEC sp_msforeachdb N' USE [?] IF (SELECT COUNT(*) FROM sys.dm_db_persisted_sku_features) >0 BEGIN INSERT INTO ##enterprise_features SELECT dbname=DB_NAME(),feature_name,feature_id FROM sys.dm_db_persisted_sku_features END ' SELECT * FROM ##enterprise_features |
If you got an error about compression, when trying to attach the database from an enterprise version to a standard version. You will have to attach the database to an enterprise database, and remove...
USE [TestDb] GO ALTER DATABASE [TestDb] SET RECOVERY SIMPLE WITH NO_WAIT DBCC SHRINKFILE([TestDb_Log], 1) ALTER DATABASE [TestDb] SET RECOVERY FULL WITH NO_WAIT GO Where TestDB, is the database name, and TestDB_Log is the SQL Log file name.
Today i have this problems on one of the Citrix XenApp servers, that the service IMA won’t connect to the Data store. It failed with this events: 1. Citrix XenApp failed to connect to...
Steps for chaning Collation: Take backup of Databases and logins. Detach all databases execpt system databases. (All users databases) Find the SQL server installation path (Root of the CD) Run this command: Setup /QUIET...
SQL Query: SELECT @@version as ‘server version’ Select SERVERPROPERTY(‘COLLATION’) as ‘server collation’
Sidste kommentar