T-SQL: check replication backlog
You can use the code below on your distributor in order to check the backlog of the replication
I.T. minded
You can use the code below on your distributor in order to check the backlog of the replication
You can use the t-sql code to resume/suspend all databases from the always on group.The code below will resume SQL data movement for all databases: The code below will suspend SQL data movement for all databases:
In a SQL Always On setup, the SQL agent jobs are not synced between the different nodes. This means you need to manually create them on the other nodes. For read-write jobs, you can only run them on the active node of course. You should modify the SQL agent job…
If you have upgraded your old Commvault agent,or you still use an old Commvault agent on your linux ‘systemd’ system, there won’t be any start/stop script for the agent. You can use the workaround below for creating a systemd file for it.
In order to optimize all databases & tables within your mysql instance, you can use the code below. You can also use a more specific script, where only the tables are optimized which have 10MB free space and 10% free space.
If your SQL Always On having a delay? Use the T-SQL code below to find out the performance of the SQL Always on.
In SLES you can search & install specific CVE patches using the commands below.
In SSMS you have the “schema changes history” report. You can have the same (or even more) details from T-SQL. You can use the t-sql statement below in order find schema changes the last day, in a particular database.
The T-SQL code below will give you an idea of the memory used by your reporting service. This query should be executed on the “reportserver ” database. Please be aware executing this statement can take some time.
It’s possible that you want to change routes on a system which point to a certain gateway, and replace them with a new gateway. The only thing this silly powershell is doing, is getting the list of routes, filter out the ‘old gateway’, replace that gateway, and put the deletes/add…
You can check the status of SAP Hana using the following command line:
You can use the T-SQL code below within your database to give permissions to ‘MYUSER’ for viewing all stored procedures. (of course, replace “MYUSER” with your own user) Once executed, you can copy and paste the output to a new query window an execute it.
Doing a dbcc checkdb can take a lot of time, and in case of corruption you really want to see the progress. You can use the t-sql statement below to find the progress. Keep in mind to replace the YOUR_DB_ID to the id of your database. (find out in sys.databases)
Step 1: If block corruption was found, first find the corrupted blocks: Step 2: Check to which table/index/etc that block belongs to. Step 3: Resolve the block corruption using RMAN (which is one of the possibilities):
If you do a df, and you compare those values with ‘du’, it is possible that those values don’t match. There are multiple reasons why this can happen, and one of those reasons if that files where deleted, but that the files are still in use by an application.In that…
The code below will list the transactions on the instance, and it will also include the size of the log which is used for that transaction.The output is ordered by log size. You can also use the below to find more info regarding a transaction