Database, Programming, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2012, SQL Tips, Technology, Transact-SQL, tSQL

TSQL Query to Compare Row Counts of Tables in a Local and a Remote Database

This is a fun thought exercise…. in MS SQL Server, use a linked server to compare how many rows are in each table of a backup development server with how many rows are in the actual production server. This would be especially relevant if you just did a database backup from prod into development and now want to see a few hours later on what tables the most growth is happening on…

Continue reading “TSQL Query to Compare Row Counts of Tables in a Local and a Remote Database”
Advertisement
Database, Programming, SQL, SQL Server 2005, SQL Server 2008, SQL Server 2012, SQL Tips, Technology, Transact-SQL, tSQL

TSQL How to Query the Recovery Model and Log Location of all Databases

Seeing where each database and log lives on your server and how large the file is

If you are maintaining the databases on a server, you’ll likely want a comprehensive view of what each database’s recovery model is as well as where the database and log files are stored. An added bonus is seeing how large each file has grown so you can shrink them if necessary. You can see this all in one place using a handy query…

Continue reading “TSQL How to Query the Recovery Model and Log Location of all Databases”
Database, Programming, Software, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2012, SQL Tips, Transact-SQL, tSQL

SQL Server Error: Fixing The Transaction Log for Database is Full Due to log_backup

T-SQL
T-SQL

If you are working with SQL Server, you may see an ominous sounding error: the transaction log for database {Your Database Name} is full due to log_backup Continue reading “SQL Server Error: Fixing The Transaction Log for Database is Full Due to log_backup”