Sunday, 29 March 2015

Error with creating maintenance plans


There are situations where a COM related error thrown while creating maintenance plan in SQL Server SSMS.

Error Message:
Creating an instance of the COM component with CLSID {17BCA6E8-A95D-497E-B2F9-
AF6AA475916F} from the IClassFactory failed due to the following error: c001f011.


Step 1:

Traverse to the C:\Program Files\Microsoft SQL Server\100\DTS\binn directory and run the
Following from the command Prompt:
REGSVR32.EXE dts.dll

Step 2: 

Once done with registering the dts.dll you will get an successful information.

Step 3: You have to close the SSMS and which will solve the problem in creating the maintenance problem.


Maintenance plan will be created without any issues once the above troubleshooting is performed.

To study more about COM Class object and CLSID's Click Here

Appreciate your suggestions. Please comment your feedback and reach me out via email

Ganapathi varma
Senior SQL Engineer, MCP

Sunday, 1 March 2015

How to change the file location of Tempdb database - SQL Server

What is tempdb?

The tempdb database is a global resource that is available to all users connected to the instance of SQL Server System. This tempdb database is maintains user defined global or local temporary tables, temporary stored procedures, table variables, cursors along with database engine defined versions of the tables for snapshot isolation and temporary sorted rowsets when rebuilding indexes.

Tempdb database information is stored in the tempdb.mdf data file and templog.ldf log file. Tempdb database size is effect on the performance of user defined database operation. Temporary stored information is dropped automatically when shut down SQL Server System and tempdb is re-created automatically when SQL Server is started so the system starts with a clean copy of the database.

More Reference URL

Why would you change tempdb file location?

Few Reasons:

1) tempdb Drive full
2) disk corrupt issue
3) client request to move the files to specified location
4) tempdb should be on a SATA drive instead of an IDE drive and should not be on the same drive as the SQL Server software or the operating system

Optimizing tempdb performance 

More Reference URL

How to change the file location of Tempdb database


By default, Tempdb is placed on the same drive that SQL Server is installed on. 

a) Open SQL server SSMS and click new query
b) Run the below T-SQL Script to find the folder location of Tempdb database files.

EXEC sp_helpfile

c) Execute the below T-SQL script to change the path of tempdb by providing new folder location for tempdb files

USE master; 
MODIFY FILE (NAME = tempdev, FILENAME = 'D:\Tempdb folder\tempdb.mdf');
MODIFY FILE (NAME = templog, FILENAME = 'D:\Tempdb folder\templog.ldf');

d) Now, Go to the SQL server configuration manager and then Select SQL Server Services.
e) Stop and restart SQL Server (MSSQLSERVER)

f)  Execute the following to verify that tempdb was moved to the desired location

Ganapathi varma
Senior SQL Engineer, MCP