Author: volt
-

Queries to see rapidly what your MySql is doing NOW
Those queries are useful to admin MySQL instances using mysql client. 1) Check active processes/connections running mysql> show processlist; the previous statement doesn’t show all queries text running. To see the complete statements running use: mysql> show processlist; –or– mysql> show full processlist G; the running queries statements could bee quite long. Use the “G”…
-

SQL Jobs Monitoring: check last run datetime and duration
A simple query to check rapidly your job’s status and duration. Useful for fast monitoring on many instances. No more thing s to say: this is the code based on msdb..sysjobs and msdb..sysjobhistory. It’s easy if necessary filtering a single job id or jobs durations too long. select job_id, job_name, run_datetime, SUBSTRING(run_duration, 1, 2) +…
-

How to make your databases smaller and faster: find unused indexes
It’s a boring job but sometimes a good DBA has to do it. Applications change and you have to understand what become unuseful in your databases: we are talking about unused indexes. In any SQL server database indexes take up a lot of space and have to be updated every time an application runs an…
-

Analyze SQL Server database historical growth: MONTLY size changes
The most simple way to analyze database historical growth is quering database backup catalog. SQL Server catalog stores informations about every single database backup in msdb..backupset. If you don’t have other instruments to collect historical database size this is a good point to start for a capacity planning This time we take the max size…
-

Analyze SQL Server database historical growth: DAILY size changes
The most simple way to analyze database historical growth is quering database backup catalog. SQL Server catalog stores informations about every single database backup in msdb..backupset. If you don’t have other instruments to collect historical database size this is a good point to start for a capacity planning. Remembar only this: – msdb..backupset stores historical…
-

Queries to see rapidly what your SQL Server is doing NOW
1) Blocked And Blocking queries. If this query returns no rows you have no blocked queries in this moment. Run it more then once to see any few-seconds blocking queries. NOTE: This exclude ONLY problems with long-locking running queries. Cumulative short-term locking contentions need other kinds of debug (see point 2) SELECT ‘BLOCKING STATUS’ as…
-

Massive Database Migration between SQL Server instances: the complete procedure v.2.0 *UPDATED*
(05/04/2014) Procedure Upgrades : – Added compresson to reduce bandwith,space necessary and transfer time – Reduced stat value for very large database – Added backup type parameter to choose from FULL,FULL_COPYONLY or DIFFERENTIAL backup (for bigger database migration) – Added Maxtransfersize and Buffercount parameters to improve backup performance (warning – this needs more memory!) –…
-
Achille, la Tartaruga e il dilemma di un certo Zenone…
L’Idea “…Il prode Achille e la piccola tartaruga decidono di fare una gara di velocità. Achille, sicuro di vincere decide di dare un bel vantaggio alla tartaruga. Come potrebbe mai perdere il grande guarriero contro il piccolo e lento animale? ….La tartaruga parte e Achille aspetta. Solo dopo qualche minuto il prode Achille parte…