SQL 2005 Thinks A SQL 2000 Backup Is Corrupt, But SQL 2000 Restores Just Fine
Jul 19, 2007
I am attempting to move some SQL 2000 databases to SQL 2005. My main production database does not seem to want to move. When I use the SQL 2005 GUI the .bak backup file is marked 'Incomplete'. When I attempt to restore the backup file I get a 'RESTORE detected an error on page (0:0) in database' message. I saw a thread in the SQL Express forum suggesting trying to restore from the T-SQL level to get the GUI out of the picture and I get the same 'error on page (0:0)' message. However when I take the same file and use SQL 2000 Enterprise Manager it restores with no problems.
With Migrating from SQL 2000 to SQL 2005 I realise that there are a few options available.
A SQL 2000 backup is able to be restored into 2005 and is workable however there are some issues with internals that have changed. I have identified some DDL which would need to be modified to work correctly.
If the Backup is restored and left in a recoverable state does 2005 allow for 2000 TLog backups to be restored as well ? I am assuming that as you can restore a full db backup that this is allowed.
I am asking the question as i have a very short and fixed deadline of moving from 2000 to 2005. A new datacentre is being moved to and the old DC is being turned off. all new hardware is being placed in the new DC so i need to move from the old to the new with very little downtime to the DB or app.
My approach is as follows
1. Full DB Backup (2000) copied across to 2005 server and loaded being left in a recoverable state. 2. Tlog backups copied across on scheduled basis and loaded to a point in time. 3. Test new 2005 DB with app/web frontend 4. Bring both in sync again and then perform 1 final Tlog backup, copy and load bringing app online again with very little downtime.
Has anybody tried this approach ? does anybody see any issues with my approach ? all comments welcome on this.
if have a problem with a SELECT query that works very fine on SQL Server 2000 but not on 2005. I've transfered my db by creating a full backup and restoring the db on 2005. The db is working except this problem.
When i start executing it doesn't finish. I waited a couple of minutes. On 2000 it only takes about 6 seconds to run.
Here it is:
Code Snippet
SELECT * FROM PPS_TERMbesttmpwhere PPS_TermBestTmp.BestNr + CONVERT(varchar(30),CAST(REPLACE(PPS_TermBestTmp.Pos1, ',', '.') AS float),2)
NOT IN (SELECT PPS_TermBest.BestNr + CONVERT(varchar(30), PPS_TermBest.Pos1,2) FROM PPS_TermBest) Any ideas?
I have a simple update statement that is running forever in SQL 2005 but works fine in SQL 2000. We have a new server we put SQL 2005, restored db. The table in question WEEKLYSALESHISTORY I even re-indexed all the indexes and rebuilt the stats as well. But still no luck, still running extremely long. 1 hour 20 minutes.
I'll try to give you some background on these table. Weeklysalehistory has approx 30 fields. I have 11 indesxes set up weekending date being one of them. And replication control has index on lasttrandatetime as well. So I think my indexes are fine.
/* Update WeekEnding Date for current weeks WeeklySales Records */ Update WeeklySalesHistory set weekendingdate = (SELECT LastTransDateTime from ReplicationControl where TableName = 'WEEKHST') where weekendingdate is null
Weekly sales has approx 100,000,000 rows Replication control has 631,000 (Ithink I can delete some from here to bring it down to 100 or 200 records) Although I don't think this is issue since on 2000 has same thing and works fine.
I was trying to do this within SSIS and thought that was issue. I am new so SSIS but it runs long even if I just run it as a job with this simple Update statement so I think its something with tables, etc that is wrong.
One thing on noticed if I look at the statistics in SQL Server Management studio there is a ton of stats. some being statistics on indexes which makes sense then I have a ton of hind_113_9_6 and simiiar one like this. I must have 90 or so named like this. Not sure how to check on SQL 2000 all the stats to see if they moved over from there or what. I checked a few other tables and don't have all these extra stats. Could this be causing the issue do I need to delete all these extras? Any help would be greatly appreciated.
My installation of SQL 2000 is corrupt. THis occured after I uninsalled MS Business Contact Manager and then uninstalled SQL Server (Following ther advice of MS).
I then accidemtly installed an incorrect language version of the software (Dutch) instead of English. Uninstalled via the Add / Remover Programes tools and tried to reinstall the english version.
I have read artical 830477 which explains how to correct the situation however I donot know where to find the original setup files. (SQLrun01.msi) Are they hidden somewhere on the MSOffice 2003 CD or on the Business Contact Manager CD? If so where.
Also I am unable to remove the Business Contact Manager Software because the SQL installation is currupt.
Any advice as to how to solve this issue would be appreciated.
Robert writes "Is it possible to recover any data from a database that is throwing the following error in query analyzer?
select * from table1
server: msg 823, level 24, atate 2, line 1 I/O error (bad page ID) detected during read at offset 0x00000007b7e000 in file '... dbname.mdf'
I can select top n from some tables with no error, if n is too large, I get the same error. Other tables give this error even for top 1.
After setting the db in single_user mode, I tried dbcc checkdb with repair_allow_data_loss option and received the following:
msg 8966, level 16, state 1, line 1 could not read and latch page ( 1:15807 ) with latch type SH. sysindexes failed.
I tried dbcc checktable on sysindexes with repair_allow_data_loss option and received the following:
msg 8966, level 16, state 1, line 1 could not read and latch page ( 1:15807 ) with latch type SH. sysindexes failed. msg 8966, level 16, state 1, line 1 table error: object id 0, indexid 0, page ID (1:15807) the pageid in the page header = (0:0) The error has been repaired.
I get the same message each time I run the DBCC command.
I can select * from sysindexes with no problem.
If I select * from sysindexkeys, I get the following:
msg 601, level 12, state 3, line 1 could not continue scan with nolock due to data movement.
I'm wondering if sysindexkeys is corrupt and causing this problem?...
I have also tried to bcp data out of the database with no success.
my User database (DB) is on Drive E & System DB is on Drive C. going to replace Drive E due to HardDisk problem. i did DBCC CHECKDB on User DB & found no issue & errors. as i am going to move Data file from Drive E to C & then Back from Drive C, once Drive is replace. my question is as error was about TORN PAGE ERROR & if i copy back from Drive C to Drive E which NEW & CLEAN Drive does this TORN PAGE ERROR will be back. Any help is appreciated.
Hi,Good morning to All, I have SQL Server 2005 installed on my system. Recently I have formatted by computer. But I couldn't take backup of my data. Big loss. For this, I've googled also. but I couldn't get clear information. I want like the following:I could able to backup entire the Database either into my pen-drive, or some other media.And, latter I could able to put the Data back into my system. Can anyone please tell how to take backup of my Data, and Restore also. Thanks in advance,Ashok kumar.
Hi All I have a problem in transferring a 2005 backed up database to SQL Server 2000 SP3. i got an error message, crux of it is "too many backup devices specified only 64 allowed"
the i browsed MICROSOFT help, downloaded SQL 2000 SP4 - mentioned as a fix for the above error.
Now get a message,crux of it is "current version of Database in 611 and destination version is 536"
Is there a solution???? should i download any other patches or Should i tweak the SQL 2005 backup process??? ASAP Plz
I have an existing sql server 2000 installation on one server. I now need to take one 2000 DB and restore it to a new sql server 2005 installation (on a different server).
What is the best way to do this. I can not upgrade the sql server 2000 installation to 2005. Basically i hoping all i need to do is backup the 2000 db and then restore it on the new sql 2005 server.
Does anyone know if this works to where the data is viewable/usable?
I have an application that takes datasets out of the SQL database. We decommisioned our old SQL 2000 SP4 machine and brought in a SQL 2005 Server. What we did was backed up the old database and then restored it on the new Server.
Now the application does not see the old datasets but will collect new ones that are viewable. We can import older datasets but we have nearly 27 GB of data, which our DBA can see the old tables in Enterprise Manager but our applciation can't see it.
I'm thinking it might be a schema issue or the way that 2005 translate the odler 2000 SP4 database. Does anyone know, or have they run a back up on a older 2000 Server and then restored it to a 2005?
i've made a backup from a MS SQL Server 2005 database and i tried to restore this database to a MS SQL Server 2000. Unfortunately, I got following error
The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrad this database.
what can i do ? is it possible to restore the MS SQL Server 2005 DB on a MS SQL Server 2000 ?
I would like to ask you if there is better to recreate database structure on 2005 from 2000 and move data or to just load 2000 backup.
Currently I loaded the backup, but I am wondering if there might be slightly better performance on 2005 when recreating structure on 2005 to loading 2000 backup?
Does loading 2000 backup create 2005 binary structure?
I have a query which used to run fine on a rubbish SQL 2000 box in about a minute, but with SQL 2005 (SP2) it never finishes, even when left overnight. No errors in the logs or anything. It is the same database which was backed up from SQL 2000 and restored into 2005. Does anybody have any ideas?
Cheers Steve
SELECT DISTINCT R1.RowVersionId, R2.EnumID AS A, R2.EnumID AS B, R4.EnumID AS C, R6.EnumID AS D, R8.EnumID AS E, R10.EnumID AS F, R12.EnumID AS G, R14.EnumID AS H
FROM
RowRuns AS R1
INNER JOIN XRunConfigEnum AS R2 ON R1.RunVersionID = R2.RunVersionId
INNER JOIN RowRuns AS R3 ON R1.RowVersionId=R3.RowVersionId
INNER JOIN XRunConfigEnum AS R4 ON R3.RunVersionID = R4.RunVersionId
INNER JOIN RowRuns AS R5 ON R1.RowVersionId=R5.RowVersionId
INNER JOIN XRunConfigEnum AS R6 ON R5.RunVersionID = R6.RunVersionId
INNER JOIN RowRuns AS R7 ON R1.RowVersionId=R7.RowVersionId
INNER JOIN XRunConfigEnum AS R8 ON R7.RunVersionID = R8.RunVersionId
INNER JOIN RowRuns AS R9 ON R1.RowVersionId=R9.RowVersionId
INNER JOIN XRunConfigEnum AS R10 ON R9.RunVersionID = R10.RunVersionId
INNER JOIN RowRuns AS R11 ON R1.RowVersionId=R11.RowVersionId
INNER JOIN XRunConfigEnum AS R12 ON R11.RunVersionID = R12.RunVersionId
INNER JOIN RowRuns AS R13 ON R1.RowVersionId=R13.RowVersionId
INNER JOIN XRunConfigEnum AS R14 ON R13.RunVersionID = R14.RunVersionId
WHERE
((R2.ParamID='ee72510e-3bab-49f6-1ff9-4d09cbe8670a' AND (R2.EnumID = '1a2868fb-72ef-e1d3-e79d-fbb5814ab481')))
AND
((R4.ParamID='7aadb3a4-3d13-8e0d-bfa4-4243ed1fdb35' AND (R4.EnumID = '745fb00c-0b16-7b4e-bf8f-da0f46777ca0')))
AND
((R6.ParamID='8c9aee3a-df1f-6ec5-131a-8fa0309ce1ff' AND (R6.EnumID = 'c7af1456-56bc-ba9c-f1e4-95cfd5542d10')))
I have sqlexpress 2005 on my local machine - but my hoster has sql 2000 - so i used the DB publishing wizard to create the script and sent it over to them - they are now saying that they need a .bak file in 2000 to host my database - is this a bunch of horse hockey or not? if this is legit - any ideas on how I can create a .bak 2000 sql from sqlexpress 2005?
I want to restore a backup of a SQL Server 2000 database to SQL Server 2005. Would I need to do anything after running the restore to upgrade the database?
I did a backup of a SQL2000 database (named Winstis) using the 2005 management studio. I then created a blank database on my 2005 instance (named Winstis). I then tried to do a database restore to the new 2005 database. I got an error:
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'Winstis' database. (Microsoft.SqlServer.Smo)
I even tried the option to Overwrite Existing database and I got a different error:
System.Data.SqlClient.SqlError: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:Program FilesMicrosoft SQL ServerMSSQLData est.ldf'. (Microsoft.SqlServer.Smo)
Also the 2005 instance database is on C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWinstis_Data.mdf
and the 2000 instance is on D:Program FilesMicrosoft SQL ServerMSSQLDataWinstis_Data.mdf
How can I accomplish getting the database from 2000 to 2005 with all tables, store procedures, and functions?
I know it's not possible to backup a database in SQL2005, and restore to 2000. But, I've been asked if there are any 3rd party tools which can do this - such as SQL Litespeed - but I can't see anything regarding this on their website.
Does anyone know if litespeed or Redgate SQL Backup can restore to 2000 from 2005 ?
1) When I try to create a New Job/Alert/Operator, I get an error message:
Error 207: Invalid Column Name "category_id" Invalid Column Name "netsend_address" Invalid Column Name "last_netsend_date" Invalid Column Name "last_netsend_time"
.....All these are referring to columns in System Tables of the system Database MSDB.
2)In another SQL Server...say "A", in it's SQL Server Agent, using the Multi-Server Administration, I set up the SQL Server Agent of "A" as the Master (MSX) server, and set up a Target(TSX) server pointing to the Server "B" that has problems in SQL Agent....referred in 1) above. When I try to "Detach the MSX Server" from server B, i get a message Error 207: Invalid Column Name "netsend_address", and cannot detach..........This is again referrring to a System Table.
It appears that the problem is with the MSDB database being corrupt. Is there a way I can Repair a Corrupt MSDB without Re-installing SQL Server 2000 and without a Backup.
i have a backup of sql server 2000 pro sp4 database and i want to import it to a sql server 2005 developer edition sp2. i tried to import the database using RESTORE DATABASE IntEx FROM DISK = 'C:projectsackupBDIntEx.bak' and got the following error
quote: Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:Program FilesMicrosoft SQL ServerMSSQLdataIntEX_Data.MDF" failed with the operating system error 3(The system cannot find the path specified.). Msg 3156, Level 16, State 3, Line 1 File 'IntEX_Data' cannot be restored to 'C:Program FilesMicrosoft SQL ServerMSSQLdataIntEX_Data.MDF'. Use WITH MOVE to identify a valid location for the file. Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:Program FilesMicrosoft SQL ServerMSSQLdataIntEX_Log.LDF" failed with the operating system error 3(The system cannot find the path specified.). Msg 3156, Level 16, State 3, Line 1 File 'IntEX_Log' cannot be restored to 'C:Program FilesMicrosoft SQL ServerMSSQLdataIntEX_Log.LDF'. Use WITH MOVE to identify a valid location for the file. Msg 3119, Level 16, State 1, Line 1 Problems were identified while planning for the RESTORE statement. Previous messages provide details. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.
i tried then importing it with the restore function from sql manager and got the error:
quote: TITLE: Microsoft SQL Server Management Studio ------------------------------
Restore failed for Server 'AMDINSIDETESTBED'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLIntEx.MDF'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476
as i said i'm using a sql server 2005 sp2. i tried the scripted method when i did not have sp2 in sql server and it worked without a problem. after installing sp2 it seems it does not want to work anymore. i also tied making a backup of a sql server 2005 database, deleting the database and restoring it and it worked again.
Hi all,I'm having a problem restoring backup from 2000 to 2005. The actualrestore process went ok. However, the database user of the restoreddatabase is missing a Login Name. I've made sure that the Login Nameis created in 2005. Also tried deleting the user, but couldn't theuser is db owner. Is there any way that I can assign a Login Name forthis database user or maybe drop this user and assign another one?Regards,Gerd
I have a database that is in the SQL Server 2000 compatability mode on my SQL 2005 server. I am trying to restore a backup of this database on my SQL Server 2000 database on another server and keep getting strange messages. First trying Red-Gate and then plain SQL Server with no luck.
It seems as I remember that the 7.0 and 2000 compatibility issue between backups did not arise when the compatibility mode was set to 7.0.
Is this "planned" behavior or an "undocumented feature"??? Anyone else have success doing this?
I'm trying to see the differences between Backup/Restore and Attach/Detach. I backup and detach a database from SQL Server 2000 SP3 and then attach and restore it to SQL Server 2005 SP1.
The differences I noticed are:
1. The restored database has a much larger initial size (database size is same) for data and log. 2. The attached database has a last backup date 3. If the backup is restored over a database, the restored database is showing owned by the database owner of the database restored over but syslogins and sysusers do not match.
I don't understand why #1 happens.
Are there any other differences between Backup/Restore and Attach/Detach?
I created an updateable partioned view of a very large table. Now I get an error when I attempt to declare a CURSOR that SELECTs from the view, and a FOR UPDATE argument is in the declaration.
There error generated is:
Server: Msg 16957, Level 16, State 4, Line 3
FOR UPDATE cannot be specified on a READ ONLY cursor
Here is the cursor declaration:
declare some_cursor CURSOR
for
select *
from part_view
FOR UPDATE
Any ideas, guys? Thanks in advance for knocking your head against this one.
PS: Since I tested the updateability of the view there are no issues with primary keys, uniqueness, or indexes missing. Also, unfortunately, the dreaded cursor is requried, so set based alternatives are not an option - it's from within Peoplesoft.
We would like to install Sql 2005 Enterprise Edition (including database engine, reporting service, integration service and analysis service) as a sepearte instance on a server which already has Sql 2000 with reporting services and analysis services. We do not want to disturb the existing sql 2000 setup.
If we do that then what will happen to my earlier sql 2000 reporting service? Will it be upgraded to sql 2005 reporting service? I heard that reporting services are instance unaware application. Where will be the default reporting service database available?
I have a database 30 GB in size. I need to copy this entire database to laptop. I want to use backup and restore database on this laptop. I need to know how I can accomplish this wihtout copying the backup file to the destination server. Is there a way you can restore from a file over the network from a different server? I tried everything,with the security setup but was not able to do this. Any recomendations will be valuable.
Hi, I am trying to edit some data from a SQL2000-datasource in ASP.NET 2.0 and have a problem with a column that has bit-data and is used for selection. SQL2005 works fine when declaring <SelectParameters> <asp:Parameter DefaultValue="TRUE" Name="APL" Type="boolean" /> </SelectParameters>When running this code with SQL2000, there are no error-msgs, but after editing a record the "APL"-column looses its value of 1 and is set to 0. Looks like an issue with type-conversion, we've hit incompatibilities between SQL200 and 2005 with bit/boolean several times before. So, how is this done correctly with SQL2000? (I've tried setting the Type to "int16" -> err. Also setting Defval="1" gave an err) ThanksMichael
I am trying to create sql code that restores a backup of a master database to a new database on the same server. It “seems” to run correctly as no errors are produced. However, the most recent updates to the master database are not present in the new databases. All databases are using the Full recovery model. What is really strange is that if I do (what I think is) the same function in Enterprise Administrator, the restore works fine! For both methods I used the same backup file!
Any and all help is sincerely appreciated.
The master databases from which the backups are made start with “MODTRNMaster”
The databases which are created from the restores start with “M1_” and “M2_”. (We call them training room databases.)
My script for backing up the master databases:
-- Backup the master training database
backup database MODTRNMaster to disk = 'f:kupMODTRNMaster.bak'
backup database MODTRNMaster_IMG to disk = 'f:kupMODTRNMaster_IMG.bak'
backup database MODTRNMaster_MNC to disk = 'f:kupMODTRNMaster_MNC.bak'
backup database MODTRNMaster_VM to disk = 'f:kupMODTRNMaster_VM.bak'
go
This is the restore script for restoring the first training room databases. I’m hoping that there is just something simple that I’m overlooking in these restore statements! J
-- Restore the backup of the master training database into the
-- training room #1 database.
use master go
drop database M1_MSLH go
restore database M1_MSLH from disk = 'f:kupMODTRNMaster.bak' with move 'DEV5_Data' to 'f:mssqldataM1_MLSH.mdf', move 'MM' to 'f:mssqldataM1_MLSH_1.mdf', move 'AMB' to 'f:mssqldataM1_MLSH_2.mdf', move 'DM' to 'f:mssqldataM1_MLSH_3.mdf', move 'IMM' to 'f:mssqldataM1_MLSH_4.mdf', move 'ED' to 'f:mssqldataM1_MLSH_5.mdf', move 'DEV5_Log' to 'f:mssqllogM1_MLSH_log.ldf', recovery
Hi,i have SQL 2000 and 2005 on same machine(with different intance names,of course), my laptop - XP with SP2. The 2005 works fine but i can'tconnect on SQL 2000. All the the SQL services are started.Any idea? Have i to reinstall 2000?Tks,Lourival
I have to merge the data from two databases, one is in SQL Server 2005 format, one is in 2000. The merged data will then reside on a SQL Server 2000 platform. Is there an easy way to do this through Management Studio or Enterprise Manager? Or will we have to export the data from the 2005 database to a flat file and import it into a new 2000 database. And then do the merge?