Tag Archives: tsql

SQL Server Management Studio scripting on TSQL commands

Scenario

With SQL Server Management Studio you have the ability to do just about everything you can do using T-SQL commands.  One problem with using the GUI is that it is difficult to remember everything you clicked on to reproduce the behavior a second time.  Another issue is that most of what you do through the GUI is done immediately which may not always be the best scenario.  How can I capture what SQL Server is doing so I can reproduce the behavior or run the commands at a later time.

Solution

A nice addition to SQL Server Management Studio is the ability to script out most of the commands and operations that you can do through the GUI.  Let’s take a look at doing a database backup as an example.  Continue reading SQL Server Management Studio scripting on TSQL commands

DATA sizing or SQL Server Rowcount without doing a table scan

Scenario Proposal

While working on different database projects I usually find it very necessary to perform a data sizing exercise on all tables focusing mostly on the number of rows in order to determine a growth factor of each table. This kind of information is useful in performing long term planning of growth and scalability of the data that we are managing.

Out of an exercise like this one we can also determine future needs for data archiving.

Continue reading DATA sizing or SQL Server Rowcount without doing a table scan