Quantcast
Channel: sqlish.com » T-SQL Scripts
Browsing latest articles
Browse All 10 View Live

Read SQL Server error Log and SQL agent log

Often DBA’s need to quickly look at sql server error log and agent logs to find something speicific, and it takes awful lot of time to go through a huge error log file; and you want to get the...

View Article



SQL Server configurations List

Was just checking sql server configuration of my sql installation via t-sql and found a way of listing which sql server configurations can be changed dynamically. Here is the list of SQL Server...

View Article

Script to find when a table was last modified

I have had a question from one of my collegues, how to find when was a table last modified. Here is what I suggest to use to find when was tables schema changed and when was the last user update/delete...

View Article

Split a string using a table Variable

Was just playing around with Table variables and thought of a practical problem lot of people approached to me with. Thought its worth documenting on how I do it so somebody can reuse the trick. Given...

View Article

SQL Server Health Checks

I have been working on automating SQL Server Health checks for a while now and use this post to share my work with the community. You will find me constantly updating this post and adding more checks...

View Article


Database Migration Automated

Its been a while since I posted anything here… Phew… Finishing a very tight deadline and critical Database Migration Project today. I have done myself some justification by automating the Database...

View Article

Merge Statement for a SQL Server 2000 compatible Database

I have recently been asked if we can write a Merge T-sql to handle inserts and updates in the same statement for a Database on SQL Server 2008 at SQL 2000 compatibility level. The answer is YES and NO;...

View Article

Script to get All database file sizes, used and unused space

View Article


Script to check Job history of a particular job.

View Article


Add a table to an Existing Transactional Replication using T-SQL and Generate...

Replace the PublishedDB with your published database and TableName with the table name you want to replicate The next step is to start the snapshot agent to pick up the new tables added to replication...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images