[MSSQL] Errors - some of them...

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

[MSSQL] Errors - some of them...

Post 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.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Could not create an instance of the DTS Package

Post 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
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply