I have a issue while trying to restore a DB. Earlier I had SQL Server 2000 on my system so I installed SQL Server 2005 and now I'm trying to upload a DB backup made on SQL Server 2005 only. While uploading that I'm getting the following:
The query is
restore database APR15THB from disk ='C:\datab\APR15MUR.bak' with replace ,
move 'Apr07Trans_dat' to 'c:\overseas\mil-data\APR15THB.mdf',
move 'Apr07Trans_log' to 'c:\overseas\mil-data\APR15THB.ldf'
The error is
Msg 3169, Level 16, State 1, Line 1
The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Can anyone please help me with this?
No, you can not restore a backup taken with a more modern version to a more outdated sql server.
SImple like that.
ALL your server versions are old, but you running 2000 is ancient. What about doing an update like every 15 years?
Check
https://support.software.dell.com/litespeed-for-sql-server/kb/30314
(yeah, google really has a lot on that stuff). Quite obviously you seem still to restore on 2000. Getting confused with multiple instances installed - i.e. you did not upgrade 2000 to 2005 but installed 2005 side by side and still use the 2000 version for restore?
Related
How open my SQLServer2008R2 database in SQLServer2012. When I open the database these problems happened:
I can't edit and open tables because this error show:
Invalid prefix and suffix characters.
When I want design tables this error show:
The backend version isn't supported to design database diagram or tables.
When you detach and attach database, the compatibility level of old database is maintained. It is one of the limitations of detach and attach method.
Reference
If we attach a database having a higher version, SQL Server maintains
the database compatibility. We can change the compatibility level once
the database is online
Once you change the compatibility level to suit SQL Server 2012, you can use the new features of the SQL Server 2012.
Read more on upgrading database
ALTER DATABASE DatabaseName SET COMPATIBILITY_LEVEL = 110
GO
when i was restore database in sql server 2012 this error happend
Msg 3241, Level 16, State 0, Line 3
The media family on device 'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\Test.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 3
RESTORE HEADERONLY is terminating abnormally.
what should i do?
What version of SQL Server did you take this backup from? Usually you get this error when you are trying to restore a backup taken on a higher version of SQL Server (Such as 2012) onto a lower version (Such as 2008 R2).
If that is the case, you will need to script out your database and recreate it on the new server rather than simply backing up and restoring.
If the file has not come from a newer version of SQL server than the one you are trying to restore it onto, it is possible that the file has simply been corrupted, at which point you should try to take a new backup if possible. If you are attempting to restore across the network, you should also check permissions to make sure that this is not causing your issue too.
I have been working on SSMS 2008 for last 1 month, I have enabled intellisense
Not sure why but it just does not work. what could be reason?
We had the same problem with Intellisense not working, in both SSMS version 17.9 and 18.0 and 18.1, when using Azure SQL DB, on accounts that were not dbmanager.
The suggestion from #sundar helps, even if it reports an error
Msg 40508, Level 16, State 1, Line 1
USE statement is not supported to switch between databases. Use a new connection to connect to a different database.
I thought that SQL Azure was built on top of SQL Server 2012, but the compatibility level when you create a new database is 100 (SQL Server 2008's compatibility level), not 110.
SELECT compatibility_level FROM sys.databases WHERE name = 'Test';
I tried changing it to 110 using the two methods that I am aware of:
ALTER DATABASE Test SET COMPATIBILITY_LEVEL = 110;
--> Incorrect syntax near 'SET'.
EXEC sp_dbcmptlevel 'Test', 110;
--> Could not find stored procedure 'sp_dbcmptlevel'.
The reason this is an issue for me is because SQL 2008 doesn't support geography shapes which cross hemispheres, so if you zoom out a map to see the world and try to store the bounds of the map it will fail. Pretty silly right?
I thought that this would not be an issue in SQL Azure, because it has been fixed in SQL Server 2012, but when I try to create a shape that crosses hemispheres I get the following error:
Microsoft.SqlServer.Types.GLArgumentException: 24205: The specified input does not represent a valid geography instance because it exceeds a single hemisphere. Each geography instance must fit inside a single hemisphere. A common reason for this error is that a polygon has the wrong ring orientation. To create a larger than hemisphere geography instance, upgrade the version of SQL Server and change the database compatibility level to at least 110.
So it is telling me to change the compatibility level, like it knows that this has been fixed already, but I can't figure out how to do that in SQL Azure. Anyone have a suggestion of something to try? Or let me know if it just is not possible right now?
It is hard to say if the current SQL Azure is based on SQL Server 2008 or 2012 however November 2011 update adds lots of new feature to it from SQL Server 2008 and 2012. More Info on Database Engine Versions:
Updated Engine Version: This release updates the underlying SQL Azure database engine version from 11.0.1477.26 to 11.0.1750.34 as it is rolled out across data centers.
The following link talks about what is and what not supported with SQL Azure comparative to SQL Server 2008 and SQL Server 2008 R2:
http://msdn.microsoft.com/en-us/library/windowsazure/ff394115
The following links adds more info about what new Programmability Enhancements are added in SQL Azure from SQL Server 2012:
http://msdn.microsoft.com/en-us/library/windowsazure/hh987034.aspx
UPDATE: August 2015
Azure Sql Database V12 has a default compatibility level of 120 with possibility to go up to 130 or down using ALTER DATABASE SET COMPATIBILITY_LEVEL syntax.
I was trying to run a script to create a DB with all the tables and data on a server, which I created using script wizard in SSMS 2008. The destination server is 2005 and since I am unable to just restore a backup, I had to go through this long process which entailed running it through sqlcmd cause it was too large to open in SSMS.
But after running for more than 5 hours, I checked on it and it had the following error:
msg 102 level 15 state 1, incorrect syntax near 'VA'
Now I tried finding the source of the error and looking in the script the only reference to 'VA' are in the data types nvarchar or varchar.
Please help, I really need to deploy this DB.
EDIT
For those who have answered, thanks for the responses. I guess I will have to rerun the script but I would like to know if anyone has any ideas on running the script in SSMS. The script is over 2GB in size since it has to recreate the data and there is no other way to deploy this 2008 DB to a 2005 sql server edition.
Either: you have scripted a SQL Server 2008 only option which can be changed in SSMS (tools..options somewhere)
Or (assuming no other VA strings) the word VARCHAR has truncated to VA. I've had this happen with dynamic SQL: can be a real pain to track down
in SSMS if you double click on the error message in the results pane, it will usually change focus and highlight that line of code. Now, how close that line of code is to the actual error depends on the actual problem, but you should be able to find the line of code it is complaining about.
Really tricky to track these down, but you could either try to generate the script setting the compatibility level for SQL 2005 or use the SQL 2005 tools to generate the script.