Have you ever tried to restore a database to an SQL server with existing connections? Unless the connections are terminated, the database restore will fail […]
Continue readingTag: SQL
Query Table Sizes from a SQL Database
I pulled apart a few stored procedures and ended up with this code. Very nice way to query the row count and size for each […]
Continue readingFinding Duplicate Rows in SQL
I used this to solve a problem today. // Finding duplicates in a table SELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING […]
Continue readingTransfer SQL Logins to Another SQL 2005 Server
After you move a database from one instance of SQL 2005 to another instance of SQL 2005, the users may not be able to log […]
Continue readingHow to Repair a MySQL Database
If a server is shutdown unexpectedly (power outage or hardware failure), one or more MySQL tables can be locked open and may need to be […]
Continue readingInactive Replication Subscriptions
If database replication has been disconnected for too long, the subscription may become inactive. The error message may read: “The subscription(s) have been marked inactive […]
Continue reading