If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > SQL Server 2008 - Copy Database Bug, Looking for Resolution

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-21-10, 10:21
puffster puffster is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
SQL Server 2008 - Copy Database Bug, Looking for Resolution

Hello,

I'm trying to use the Copy Database task that SQL Server provides, and it is failing because it's trying to create the views before it creates the tables. When the view looks to verify the table exists, it is failing because it hasn't been created yet.

I've seen this talked about in multiple places, but have not seen where anybody has posted a resolution...does anybody know if one exists?
Reply With Quote
  #2 (permalink)  
Old 06-23-10, 15:35
scottb scottb is offline
Registered User
 
Join Date: Oct 2003
Posts: 60
do it in 2 steps? tables first then views?
Reply With Quote
  #3 (permalink)  
Old 06-23-10, 22:23
EngadaSQL EngadaSQL is offline
Registered User
 
Join Date: Mar 2009
Location: Australia
Posts: 113
Can you copy using the detach/reattach method which takes the source offline, copies the data and log files and re-attaches the source plus attaching a new instance of the database using the copies?

Alternatively just use a backup/restore?
Reply With Quote
  #4 (permalink)  
Old 06-25-10, 12:27
puffster puffster is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks for the great suggestions!

Scott - I looked and did not see an option to choose what to copy in terms of "just tables", views, etc. It appears to be all or nothing -- I'm doing this using Microsoft SQL Server Management Studio 2008.

Engada - I couldn't do the detach/attach method because I was trying to do it in the middle of a work day...but I ended up doing a backup/restore as you suggested, and that worked like a charm.

Again, thanks to both of you for your suggestions!!
Reply With Quote
Reply

Tags
copy database, sql server 2008

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On