Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cannot generate scripts for data after table move.

Posted on 2009-07-01
4
Medium Priority
?
194 Views
Last Modified: 2012-05-07
I have a database called Materials.

The table was created in a database named DB1.  We needed to move it from DB1 to DB2.
I generated scripts of the table and data and recreated it in DB2.
I took DB1 offline.

Now I am trying to script the Materials table (and data) again.  However, I am getting a "Failed" error because it is saying that the script cannot be generated becasue DB1 is offline!!
It shouldn't matter that DB1 is offline because the table exists only in DB2 now.

How do I fix this so that I can generate the scripts??
0
Comment
Question by:PIERCGG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 24754500
are you trying to script the table in DB1 or DB2?
0
 
LVL 6

Author Comment

by:PIERCGG
ID: 24754513
I am trying to script it in DB2.  DB1 is offline.
I need the one in DB2 because a lot of new data was added since it was originally moved.
0
 
LVL 35

Accepted Solution

by:
YZlat earned 1000 total points
ID: 24754518
0
 
LVL 6

Author Closing Comment

by:PIERCGG
ID: 31598775
That's it!  That's the answer!  It is a bug that occurs if the db is offline.  The bug doesn't occur if you just go ahead and detach the db.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question