Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Restore database

Author  Topic 

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-24 : 06:49:48
Hello,

in my database with no data I am not able to make a backup. Because this isn't working and do want to start using it.

Now my question is what is the most easy way to create a new database with the same tables in it. I hope in this way that I can backup this new database, so I can start using it.

How can help me?

Thanks in advance,
Sven.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-12-24 : 07:51:37
What exactly do you mean by "I am not able to make a backup"? Is it giving an error (and if so which error)? How are you trying to backup?

You could use the generate script option from management studio (assuming this is 2005/2008). In Object explorer, right click the DB, tasks-generate scripts. It starts a wizard, just go through and select the objects to script.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-24 : 09:51:07
Hello,

this is the error message ...

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Backup failed for Server 'PPBE01-133\SQLEXPRESS'.
------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: An error occurred while processing 'BackupMetadata' metadata for database id 5 file id 65537. (Microsoft.SqlServer.Express.Smo)

I am using SQL server 2005.

Best regards,
Sven.



Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-12-27 : 08:13:23
Looks like the database might be damaged. Can you run this and post the results (run it in master, msdb and the DB that you can't backup)

DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS


--
Gail Shaw
SQL Server MVP
Go to Top of Page

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-27 : 10:33:08
Hello,

because it is an empty database, I script the database and restored it. Everything works fine again.

Thanks for the help.

Sven.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-12-27 : 12:11:18
But you should find out (if it is possible) the reason why your database was damaged.
Maybe it happens to your new created database again.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-27 : 12:29:25
Hello,

I am pretty sure it has gone wrong when I updated the database from SQL 2000 to SQL 2008.

When I run the command dbcc check db I get 2 lines where I can see that there are files offline. When I restored the database on SQL server 2008 with a script there where no errors anymore.

So I think everything is OK.

Do you agree? Or do you think I have to check some more issues?

Best regards,
Sven.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-12-27 : 12:45:32
OK, when you say RESTORE then you mean in this case you have CREATED the database with a script - right?
So now there is no other Server and no other version involved.

I agree and hope that everything is ok now and in the future.

Greetings
Fred



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-27 : 13:06:14
Hello,

indeed, I have created the database with a script.
I will regular make a backup and if I have some trouble I will come back to it.

Thank you for the help.

Sven.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-12-27 : 15:50:50
quote:
Originally posted by sven2

When I run the command dbcc check db I get 2 lines where I can see that there are files offline.


Let me guess, full text? Means you didn't do the update from 2000 properly and left files behind. That's probably the reason for the backup failing. Hard to back up files that aren't there.

Without the actual messages it's hard to say anything more conclusive.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-28 : 07:07:10
Hello,

indeed, the message full text was displayed.
But I solved it already with creating a new database by script.

Best regards,
Sven.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-12-28 : 11:15:00
I meant 'full text indexing'.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2009-12-28 : 11:48:04
quote:
Originally posted by GilaMonster

I meant 'full text indexing'.

--
Gail Shaw
SQL Server MVP



What is the cost of recreating the full text indexing, if it was missed during the "upgrade"? Single user mode? Any idea how long it may take for a 2GB database?

Terry

-- Procrastinate now!
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-12-28 : 12:31:45
No idea, no idea and no idea. Sorry, am not an expert on FT. I've just seen upgrades of DBs with it, and know that there are ways to not attach/not upgrade the FT indexes.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -