.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Copy Database via SMO fattens up the destination database

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
I am moving SQL 2000 databases to a new SQL 2008 R2 instance. I am using the Copy Database Task, with the SQL Management Objects option. I was constantly getting the following error during the copy process: Then, I decided to remove any file growth restrictions on the source SQL server for this particular database. Monitoring the growth, I saw that on my new SQL 2008 desintation server, a database which the .mdf file was 1.5GB in size was continuing to grow past 40GB! Then I ran out of disk space, and the job failed. What in the world is causing this database to grow so fat? Is this is a bug? This also happened with another database of mine, in which the secondary .NDF file went from being 500MB to 27GB! Thanks, Reuvy

View Complete Post

More Related Resource Links

SQL Server to SQL Server Compact Edition Database Copy

I recently switched from XP to Win 7 and am getting an error when using the SQL Server to SQL Server Compact Edition Database Copy wizard from johnnycantcode.com (link). I suspect that the problem is with the configuration of the path for the DQL CE dll. 1) Does anyone know where the configuration is set? It isn't in the GLT.SqlCopy.exe.config file in the local directory. 2) Has anyone got the program to run under Win 7? Thanks marc  

How to copy table data from test to production database

I'm using SQL Server 2008 R2 and I'd like to copy all data rows from one table of a test database to the identical table in a production database. The primary key of the table is referred to by other tables so a DELETE followed by a number of INSERTs won't do it because of referential integrity issues. What is the best method to replace the data rows in the destination database with the values from the source database? Thanks, Guido

SSIS 2005 - XML Source no data loading to sql server database destination

Hello I am trying to load data from xml source to sql server destination, but the task executes with no data loaded to destination. i really appreciate any guidance in working and troubleshooting xml sources. Regards Harris

Can't copy LDF file after detaching database.

Hello, I'm attempting to move an LDF file from one drive to another with more space.  I've detached the database in question, but when I go to copy the file I get the error, "Cannot copy [filename].  It is being used by another person or program." Is there another SQL Server process that is keeping this file locked?  How would I check? Thanks for your help.

SQLServer2008 job created by Copy DataBase Wizard fails - cannot determine if job owner has server a


Trying to copy a SQL2000 database on server TUNA to destination server MOJITO which runs default instance of SQL2008 (at ServicePack1) via the CD Wizard. Resulting job fails on MOJITO with this in application log:

SQL Server Scheduled Job 'CopyDatabaseWizard_TUNA_MOJITO_1' (0x64AB69F2880A7E4DA3708546C33DFF40) - Status: Failed - Invoked on: 2010-09-23 17:05:04 - Message: The job failed. Unable to determine if the owner (CBMIWEB\johna) of job CopyDatabaseWizard_TUNA_MOJITO_1 has server access (reason: Could not obtain information about Windows NT group/user 'CBMIWEB\johna', error code 0x5. [SQLSTATE 42000] (Error 15404)).

There is a credential on MOJITO defined for CBMIWEB\johna. There is a proxy on MOJITO that uses that credential. The job has one step and in the properties I have set the RUN AS value for the job to be the name of the Proxy. The proxy is established for SSIS jobs.

The "owner" of the job is also CBMIWEB\johna which is a domain userid in the local Administrators group of each machine (both TUNA and MOJITO). This userid has been granted the permission to Logon as a Batch Job on both servers.

TUNA is a Windows 2000 standalone server; MOJITO is Windows 2003. I can logon to each server as CBMIWEB\johna.

I don't know what else to do.

"Version90 database compatibility level is not supported." After SSIS Destination Upgraded from 2005


We have a moderately complex SSIS package that uses a script task to dynamically create a Transfer SQL Server Object task, which then moves data and schema of a varying definition from source to destination.  The SSIS package was written in BIDS 2005.  The source system is still SQL 2005 (with latest updates) and the destination system is now 2008r2 (with latest updates).  When the package run, we get the following error when we try to execute the dynamically created transfer task: Description: Execution failed with the following error: "Version90 database compatibility level is not supported.".  sp_dbcmptlevel for the source and destination databases returns "The current compatibility level is 90.".  Master on the target system is predictably at level 100.

This leads to several questions:


getting a copy of the database by scripting it.



I am getting my database copies as sql script every week. I want the copies as it is on the server.

but there are a lot of option on the scripting. which ones do I need to choose for a proper copy.


SQL Server 2005/2008 COPY Database Through Wizard



Let's start a very intresting thread here:

As you all know moving the database from one server(2000, 2005, 2008) to (2000, 20005, 20008) is not a big deal and can be done in many ways  like backup-restore, attcah-detach, and most easy (some time very complex:-)).

Here i wanna discuss an issue which i have faced.

I have two instances of SQL server 2008, i have created a new database Test in one instance, created few logins and mapped to  Test database with some permissions for this Test database.

Now i used copy database wizard to copy this test database to other instance, i sucessfully went through the wizard and selected SQL server object method to copy the Test database in other instance then i followed the remaing wizard, i selected the logins which i have created for the Test database and finnaly i reached the finish button i clicked finished and the copy of database completed sucessfully. I verified that Test dabase was there in other instance with the logins which i have created. So easy i was happy:-)

Problem: Some other day i wanted to copy AdventureWork database to the other instance of SQl server i was happy that its a very easy task i followed the same steps above(to copy the Test database ) and every thing went in the same way and i clicked finish to complete the wizard it took some time

Copy table values from one database to another


Dear All,

I am stuck with an issue. I have around 200 rows in a table with a particular database. I want to copy those values to another table in a different database.

Pls support

Copy from one database to another on the same server.



I have a sql server 2005 express edition.(Windoes 7 PC)

I have a database TrManager.
Now i created a new database named TrManagerTest. i  want to copy the data from the TrManager to TrManagerTest
What are teh steps to be followed for this?
Can i do it from a backup file or is there any other way to do it?


Copy Tables From 1DataBase to Another DataBase



I have a Table in SQL Server DataBase with 200 + Rows

OriginDest(OID, DID)

I want to Copy all the row from OriginDest Table, DataBase1. To OrginDest, DataBase2 with Same Name

Can any tell me Query For that Thanks...

how to copy one table from one database to another on different servers?




In above convention can we use IP address instead of ServerName?




I am using copy wizard in sql server 2008 machine to copy a database to another sql server 2008 machine. Here is the log file.


#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPreValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,CDW_NL-DEVXP95_MSSQL2008_NL-DEVXP95_MSSQL2008R2_3,{65EB1D9A-DC17-4649-90B7-B3292DFE1ADE},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPreValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,192_168_3_144_MSSQL2008_192_168_3_144_MSSQL2008R2_Transfer Objects Task,{5231CE89-011F-4E2F-8B23-3DC5809CCB86},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPostValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,192_168_3_144_MSSQL2008_192_168_3_144_MSSQL2008R2_Transfer Objects Task,{5231CE89-011F-4E2F-8B23-3DC5809CCB86},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPostValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,CDW_NL-DEVXP95_MSSQL2008_NL-DEVXP95_MSSQL2008R2_3,{65EB1D9A-DC17-4649-90B7-B3292DFE1ADE},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)

How to copy database?


I have sqlserver 2008 installed in my pc, I'm trying to use MS SQL Server Management Studio to copy one of my databases to another sqlserver installed in other pc, I already know there's a copy wizard but i haven't been able to start it, whenever I check in tasks for the option copy it is not visible. The profile I'm using to copy has sysadmin permission, I don't know what I'm missing perhaps I didn't install or configured something I need in order to use the copy wizard. Could you please help me?

As you can notice I'm not able to find the copy option. Thanks in advance for your help!

Copy Database Wizard: Cannot choose databases, checkboxes are missing



I try to move databases from one SQL 2008 R2 to another SQL 2008 R2 Server with the copy database wizard.
On the page where I should choose the databases to move or copy the checkboxes are missing. The databases are listed but no way to choose one of them.

I searched a lot but did not find out what the reason could be for this.
Any hints are appreciated, thank you!

copy user database from one windows domain to another windows domain


Dear All,

We have one production sql server running three user databases. for future safety and space constraints we made clustering enviroment but that is on different domain e.g. abc.com and the production sql server running with xyz.com domain.





Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend