Solved

Cannot generate scripts for data after table move.

Posted on 2009-07-01
4
188 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
  • 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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now