Gather Database Stats Gather Dictionary Stats Gather FIX OBJECTS STATS Gather Schema Stats Gather Table Stats […]
Category: Databases
Database Related Topics
How to search all objects in all databases with specific word phrase in SQL Server
When migrating SQL databases to new server, one of the challenge is to identify all the hard-coded references to old servers or services. Here is a small piece of code that I wrote to search all databases to identify all objects with references to specific keywords or phases. […]
Find missing indices using dynamic management views in SQL Server
For SQL Server performance tuning, besides rebuild index and update statistics, often we also need to identify missing indexes. This can be done from SQL Tuning Advisor, but I personally feel it’s quicker to directly query the dynamic management views. Here is a sample query I normally use to identify and generate index creation scripts […]
Looking for Locking / Blocking Sessions in ORACLE
There are many ways to find locking /blocking sessions in Oracle, this is what I normally use. If Blocker is identified, in certain case you many need to kill the blocker session with below command: […]
Step by step instruction to setup an Oracle Active Standby Instance using RMAN
This instruction is created for Oracle on Windows, it also applies to Unix/Linux installations. The difference will be mainly the folder path locations. Master Instance: ProdServer:1521/DB1 Target Active Standby Instance: StandbyServer:1521/DB1STANDBY (new installation) Preparation: Run below query to check if ARCHIVING LOG, FORCE LOGGING is enabled on the Primary database, if not enable them. On […]
Download all RDL report files from SSRS server
Following code has been tested on SSRS 2010 to 2016 Install the Reporting Service Powershell Module 2. Code to download RDLs […]
Cascade Delete in MS SQL Server
Different from ORACLE and MySQL, MS SQL Server does not provide Cascade delete function natively. This maybe considered as a safety feature to prevent unintentional data deletion, however, there are situations, that need Cascade Delete to quickly clean up data in complex referenced tables. To easy my life, this is what I wrote. It’s been […]