DBA

How to send E-mail/E-mail with Attachments in SQL Server TIP #97

  In last post, TIP#96 We have configured Database E-mail. Now in this post we will see how to send mail in SQL SERVER. Sometimes we need to send mail for different requirements like 1) Notification mails like  data inserted /updated/deleted successfully 2)Send data reports like no of amount earned, failed transaction  etc. for this …

How easy to determine table dependencies ? TIP # 86

  Determine the table dependencies is challenging sometime but we can easily resolve this by using a simple stored procedure which  SQL Server provides. By using this stored procedure we can easily determine all the dependencies of particular table. The stored procedure is sp_msdependencies We can use this stored procedure as shown below Execute sp_msdependencies …

“sp_helptext“ – Useful command to view detail TIP #85

  It might be already known to you but I thought for sharing because I frequently use this command and it is very useful command. When someone wants to determine detail of a function or stored procedure he/she can use this useful command. The syntax is very simple. Just write sp_helptext Storedprocedure/ functionname For example …

Easy way to diagnose SQL Server “sp_Who2” TIP #84

  Why the SQL Server is running slow ? What are the processes running currently on SQL SERVER instance ? Many other like the above which might help us to understand our current SQL Server instance health can be answered by a simple command “sp_who2”. “sp_Who2”  is an Undocumented command. You can utilize this command …

Contained Database–A new feature in SQL SERVER 2012 TIP #81

While working on a project sometimes it happened that we need to shift the database from one server to another due to various reason (sometimes it is only money ). We are aware that this easy step take backup and restore another machine but glitch is what about the users which have access to the …

Change Data Capture (CDC)–An easy way to track data changes of a database–TIP #79

  In last TIP #78  we have discussed Change tracker (CT) which was introduced in SQL SERVER 2008. CT feature only tracks which row is changes means on which row Insert/update/delete operation is performed but it does not track what exact value is changed. If we want an audit of database means whatever changes occurred …

How to determine free space on each fixed drive of server machine using SQL SERVER ? TIP #75

  When you do  SQL Server maintenance one of important aspect is available space on server drive because your SQL SERVER data is dependent on space . Now what you need to do to get free space from each drive ? Just create a simple job which run on daily basis which send you space …