Category Archives: Windows

Database AutoGrowth

SQL Server Database AutoGrowth

Leaving the default settings for SQL Server AutoGrowth is an unhealthy practice.  As many will agree, the default growth rates should be changed .

OK.  So using percentage settings is a bad practice.  I don’t want to grow the database in 1 MB increments, and not touching it is bad too.  What am I supposed to do?  How can I best configure my SQL Server AutoGrowth settings?  Are there any best practices or recommendations for database autogrowth?   Aggghhhhhh!

Before I pull out my hair, let me digress…

Over the course of time, colleagues and experience have helped me draw up some general guidelines:

  • If the file size is less than 1 GB , then set the File Growth Rate for the data file to 200 MB .
  • If the file size is between 1 GB and 200 GB , then set the File Growth Rate for the data file to 1 GB .
  • If the file size is greater than 200 GB , then set the File Growth Rate for the data file to 10 GB .

The conditions in your environment may vary, but this is a good place to start.  Consider whether your database is a data warehouse, has a transactional focus, or very large database (VLDB).  Your goal is to minimize the number of times your database grows, but when it does, take the amount of storage you need without having to return to claim more too soon.

The final piece of advice, as any good DBA will tell you, is interview your users, measure your workload, monitor your database growth, and adjust settings for your specific situation.

Unix tail -f equivalent in Windows PowerShell

One of my favorite ways of monitoring jobs from the Unix command line was to tail an output file using the -f switch.  This way I could see updates to my screen as they were written to the file.  It is a good progress indicator for jobs that are active:

tail -f filename.txt

I always wanted an equivalent command in Windows PowerShell, but I was unable to find it until a colleague of mine pointed me in the right direction this week.  The PowerShell syntax is:

get-content -Path “C:\filename.txt” -Wait

Now I monitor jobs just as well in Windows!  Thanks Will!

Find Failed Files in Robocopy

I copied 123 GB of data between two drives using Robocopy; over thirty-seven thousand files, with one failure.  My output log was over 2 MB!  Great!  How do I find this needle in the haystack?  All I want to do is find one failed file in my Robocopy output file.

Total    Copied   Skipped Mismatch  FAILED    Extras
Dirs :        2620         4         0        0       0         0
Files :      37646     24518     13127        0       1         0
Bytes :  123.116 g  99.967 g  23.148 g        0       0         0
Times :    0:03:13   0:00:46                     0:00:30  0:01:57


Speed : 2329557600 Bytes/sec.
Speed : 133298.355 MegaBytes/min.
Ended : Friday, September 28, 2012 10:53:51 AM

I determined that searching for the word ERROR in the output file will find the rows in the log file indicating the reason for the failure.


New File           0 c:\Data\.lock 2012/09/28 10:50:37 ERROR 32 (0x00000020) Copying File c:\Data\.lock The process cannot access the file because it is being used by another process.


Waiting 30 seconds… Retrying…      New File           0 c:\Data\.lock 2012/09/28 10:51:07 ERROR 32 (0x00000020) Copying File c:\Data\.lock The process cannot access the file because it is being used by another process.


ERROR: RETRY LIMIT EXCEEDED.

Print Screen with MacBook Pro

I run Windows 8 on my MacBook Pro, however there is no Print Screen key.  How do I take a screen shot (Print Screen) running Windows on MacBook Pro?

Take a screen shot (Print Screen) with: fn + Shift + F11

You can also capture the active window with: fn + Shift + Alt + F11

Don’t forget, you can also use the Snipping Tool .

Windows 8 – Windows Can’t Be Activated Right Now

I installed Windows 8 on my computer, but when I went to activate it, I got the error message “Windows Can’t Be Activated Right Now”.  How do I activate Windows 8?  Follow these steps to activate Windows 8.

To resolve activating Windows 8:
1. Hit the START key.  Alternatively, select SEARCH from the right hand side of the screen.
2. Type RUN
3. Type slui 3 and ENTER .  This opens the Windows Activation window where you can enter a product key to activate Windows.  SLUI 3 is the change product key window.
4. Type in your product key and click Activate .