Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Copy Database - name changing prevents successful copy

$
0
0

I have a strange problem while copying a database on SQL Server 2012.

What I want to achieve is to copy a local database. The destination is on the same server.

If I keep the suggested destination database name it works as expected but if I change it, it gives me the following error:

Event Name: OnError
 Message: An item with the same key has already been added.
StackTrace:    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.SqlServer.Management.Smo.DataTransferBase.SetupDatabaseForDestinationScripting(Nullable`1 modelSize, Dictionary`2& strAryOldDbFileNames, Dictionary`2& strAryOldLogFileNames, Dictionary`2& oldFileSizes)
   at Microsoft.SqlServer.Management.Smo.DataTransferBase.GetScriptLoadedTransferWriter()
   at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
   at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()

It looks like SQL Server remembers my previous copy although I deleted the database in Management Studio and even removed the files in SQL Server's "DATA" directory.

Is there any catalogue I have to clean up or did I forget something?

Thanks Daniel


Viewing all articles
Browse latest Browse all 24688

Trending Articles