Page 1 of 1

[MSSQL] Errors - some of them...

Posted: Mon Sep 26, 2005 12:21 pm
by ^rooker
[ERROR 1]

When trying to restore a backup file over a database (e.g. "newdb") which is NOT the one the backup came from (e.g. "mydb"), you might encounter this error:
The file 'c:\MSSQL7\Data\mydb_Data.MDF' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
Backup or restore operation terminating abnormally.

[SOLUTION 1]
When restoring a backup from a file, the logical names and the data/log filenames of the database are taken from the backup file.

This means, that it will DEFINITELY not fit another database.

To solve this, select the "Options" tab in the restore dialog and in the table labeled with "Restore database files as:" you will see the logical filename and the physical filenames of data- and logfiles.

Change the physical path/filename to fit the database you're trying to import to.

WARNING: Do NOT change the logical filename, as this will result in this error message:
File 'newdb_data' is not a database file for database 'newdb'. Backup or restore operation terminating abnormally.

Could not create an instance of the DTS Package

Posted: Tue Jul 25, 2006 3:47 pm
by ^rooker
[ERROR 2]
When trying to make a DTS transfer, it exited the whole enterprise manager immediately with this errormessage:
Could not create an instance of the DTS Package
[SOLUTION 2]
for some strange reason the DTS-DLLs were not properly registered anymore (seems to happen quite often if you google-groups that errormessage).

Those newsgroup entries pointed me at the problem with the DLLs and which ones needed to be re-registered (Source: http://www.sqldts.com/default.aspx?225)

Here's a simple batch-script (e.g. "dts-reregister.bat") which is to be executed in the same directory where the listed DLLs are (usually the BIN directory of the MSSQL server)

Code: Select all

@echo off
cls
@echo.
@echo re-registering DTS DLLs... 
@echo.
@pause

regsvr32 dtsffile.dll
regsvr32 dtspkg.dll	
regsvr32 dtspump.dll
regsvr32 axscphst.dll

REM SQL Server 2000 Only
regsvr32 custtask.dll