Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Saturday, December 25, 2010

To Backup all the SQL Server Databases

I came across this problem of backing up all the databases on my SQL servers (and there were 70 of them). I didn't want to back them up using the SQL Server GUI. While searching on the internet I got my hands on this script.


Friday, December 24, 2010

Delete SQL Jobs

Want to get rid of the SQL Jobs in your SQL Server? All of them are stored in msdb. You would need to run the following queries to remove them. If there is a scheduled time that this job runs at, you would need to first remove that.


Tuesday, December 21, 2010

Delete multiple databases in SQL Server

I've been into positions multiple times where I've to delete the databases in my SQL Server environment to clean up the QA environment or my local machine where I accumulate these test DBs over a period of time. If you are looking for one such situation here is the script that can come as a help -

Friday, April 30, 2010

Delete and Truncate

Delete and Truncate are both commands in SQL to remove data from a table. But why do we have two commands? Are there any differences? YES! There are differences although the result is same. Both of them delete the data.

Sunday, April 18, 2010

Normalization and De-Normalization

Database normalization is a data design and organization process applied to data structures based on rules that help building relational databases.  Normalization is done to achieve the following goals:
  • eliminating redundant data (for example, storing the same data in more than one table)
  • ensuring data dependencies make sense (only storing related data in a table).

Friday, April 16, 2010

SQL Server: Varchar v/s NVarchar

VARCHAR and NVARCHAR are two datatypes that are used in SQL Server very frequently and interchangeably. We would see what is the difference if any between these two: