I have a backup of a SQL database, and it is 409 MB.
When I try to restore it says:
Restore failed for Server 'SPLYF-R3K8G8JL2\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
(1) it seems like you are trying to restore a SQL Server 2008 R2 database on an instance of SQL Server 2005. You can't go backwards like that.
(2) SQL Server 2005 Express had a limit of 4GB per database. With 2008 R2, the limit is 10GB.
(Note that the size of the backup file is not necessarily the size of the database. The backup file does not include empty space, so if your MDF is >4GB (and mostly empty) the limitation is still enforced, since the limitation is on data file size, and not on backup size or actual data.)
So, the solution is: install SQL Server 2008 R2 Express Edition, and you should be able to restore your database there (assuming it is < 10GB).
If your data file is currently > 10GB but there is < 10GB of data in it, you can:
in the source instance (or after attaching to a different edition without this limitation), since it seems like there is far less data than 10GB, reduce the data file size using DBCC SHRINKFILE to something less than 10GB.
take another backup
proceed with the attach to Express
Are you sure you are running SQL Server 2008 R2 Express?
Database backups are often compressed: it's not a surprise that this backup would create a database larger than 4 GB, the limit for SQL Server 2008 Express and SQL Server 2005 Express.
Try upgrading to SQL Server 2008 R2 Express.
Related
I have a 19 GB .sql file which is a dump of a MySQL database.
How could I go about mounting that to MS SQL server? Is it just a matter of loading the 19 GB file into management studio and hitting F5?
I don't have access to the original MySQL databases or the server they were running on.
Thank you.
I would go about it like this.
Restore the MySQL databases to a MySQL server.
Setup a linked server from MS SQL to MySQL
Do a SELECT * INTO destinationtable FROM linkedserver.dbo.sourcetable
The only problem here is that you will need to make sure that index definitions etc are recreated.
Youre MySQL backup file will not run in MSSQL without a LOT of work.
I'm attempting to extract data from a SQL Server backup provided by vendors with whom we no longer work.
I only need data from some tables, but I need to examine the database structure to determine exactly what I need.
This is the only use I have for SQL Server and I don't what to buy in big.
I tried SQL Server Express to restore the .bak file locally and received the error:
Restore failed...
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 1827)
I am having difficulty determining what alternative approach or minimum license I need to purchase to get me past this database size limit. The database seems to be only marginally over the limit.
I used RESTORE FILELISTONLY, HEADERONLY and LABELONLY commands to extract what metadata I could.
HEADERONLY
BackupSize: 4958099456
I'm running SQL Server Express 2008 on a Win XP 32 bit platform, which could be part of my problem.
The version I'm running:
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (Intel X86)
Sep 22 2011 00:28:06
Copyright (c) 1988-2008 Microsoft Corporation
Express Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
Can anyone tell me the least expensive and most efficient way out of this problem?
Thanks,
Neale
SQL Server 2008 R2 or 2012 Express have a 10GB limit so you can use one of those.
I receive the following error when I try to restore a database to SQL Server 2008 from SQL Server 2008 Express R2:
The database was backed up on a server running version 10.50.2500.
That version is incompatible with this server, which is running 10.00.4064.
Either restore the database on a server that supports the backup, or use a backup
that is compatible with this server.
Is there anything that I can do to fix this or am I stuck using SQL Server Express?
You cannot go "back" in SQL Server versions - if your database is on 2008 R2 (v10.50) - you cannot back it up and restore it onto a 2008 (v10.00) version.
There's no trick, no workaround, no hack - it just cannot be done - period.
So you either need to upgrade your target system to 2008 R2 as well (Express will do, as long as the size is below 10 GB), or you need to script out structure and data to .sql files to run those on your "old" 2008 system (possibly using third-party tools like Red-Gate SQL Compare / SQL Data Compare to create those scripts and possibly run them against the target server directly).
Our company is getting ready to move next week and we currently use SQL Server 2000 for all our databases, hosted in our own building. They've decided to move the data to a local company for several reasons, but they are running SQL Server 2008.
I'd like advice on a few things:
We are trying to setup a test for just a few of our databases to see what breaks with our apps (connection strings, etc.). What is the best way to get a database from our SQL Server 2000 box to the new box without losing data or having to recreate the table, etc. I tried the DB Copy Wizard but restrictions within our network don't allow it. If I create a DB on SQL Server 2008 and perform a RESTORE from the SQL Server 2000 .bak file, I will lose all the transactions, correct? What if I replace the transaction files later? I'm thinking that won't work though.
How to properly upgrade a SQL Server 2000 database to SQL Server 2008? I've run the wizard against most of our databases and it came up clean with the exception of a few minor issues that I can resolve.
Our SQL Server 2000 is our production server so it can't go down at any point to copy files.... not until the move. Our customers have been notified that there will be a short outage period between certain dates so that's ok, but I guess what I'm saying is I can't stop the SQL Server Agent right now just to copy log files and such for testing purposes.
Any help/advice is greatly appreciated!
Create a database backup of the SQL Server 2000 and restore it to the SQL Server 2008.
Setup replication making the SQL Server 2000 as the Publisher and the SQL Server 2008 as the Subscriber.
Not sure which would be the best approach. I think a DB backup and restore would be a good idea. You will loose some data in the mean time, though.
If you were migrating between 2 versions of 2005 or 2008 I would advise a log backup to reduce the data lost but I don't think that this option is available on 2000
One piece of advice I can give you is to take a look at the discontinued features from 2000 and 2005 and from 2005 and 2008 on these links:
2005
2008
Just back up 2000, and then restore it. You won't lose transactions, no difefrent to doing a full backup on your current server.
You'll need to add any SQl logins and set the permissions etc.
You'll need to to do fix users for them as well.
If you only use integrated access then you don't need to.
e.g.
Use MyDataBase
EXEC sp_change_users_login Auto_Fix, 'MyUser'
And you'll need to set the compatibility level
Use
exec sp_bcp_dbcmptlevel 'model'
to get it
and then
EXEC sp_dbcmptlevel 'MyDatabase', ??
to set it.
Another option, would be to install 2000 on your new machine restore a back from the old one and then do an inplace upgrade through the 2008 installation wizard. That sort of thing tends to give my sphincters palpitations though.
I have a database working on SQL Server 2000. We are now migrating to a new server with SQL Server 2008 r2. Can anyone please point me to some resource or howto?
I'm not really finding my way around SQL 2000.
Thank you!
Basically, what you need to do is:
backup your database in SQL Server 2000 to a .bak file
move that *.bak file to your new server
restore that database onto your new server
You're done! There's really nothing more to it..... just backup (on your old system) and restore (on your new system).
So where exactly is your problem ??
Update: as #Péter correctly mentions: this leaves your database in the SQL Server 2000 compatibility mode. This means: even though you've "migrated" to SQL Server 2008 R2, you can still only use the 2000 features.
In order to see what compatibility mode your database is in, check the sys.databases catalog view:
SELECT * FROM sys.databases WHERE name = 'YourDatabaseName'
One column is called compatibility_level and contains an INT; 80 = SQL Server 2000, 90 = SQL Server 2005, 100 = SQL Server 2008 / 2008 R2 and 110 = SQL Server 2012
In order to change your database to a different compatibility level, use this command:
ALTER DATABASE YourDatabaseNameHere
SET COMPATIBILITY_LEVEL = 100;
This will put your database into the "native" SQL Server 2008 (and 2008 R2) mode and now your migration is complete, you can use all the new SQL Server 2008 R2 features.
I would start by running the Upgrade Advisor against the 2000 server (during low utilization or off hours) to see what recommendations it makes and fully address each: http://msdn.microsoft.com/en-us/library/ms144256.aspx
Here too is a white paper from MS on the topic: http://download.microsoft.com/download/2/0/B/20B90384-F3FE-4331-AA12-FD58E6AB66C2/SQL%20Server%202000%20to%202008%20Upgrade%20White%20Paper.docx
A lot could go wrong...too much to cover in a forum setting. But then again nothing could go wrong...the best plan, test, and then test some more.
The others answers are correct from a technical perspective but not from a support point of view.
I don't think Microsoft support a direct upgrade from SQL Server 2000 to SQL Server 2008 R2. That doesn't mean it is hard, just that it is not supported. (Which may or may not be significant for your scenario)
You can upgrade your SQL Server 2000 instance to SQL Server 2008 R1 and then perform a subsequent upgrade to SQL Server 2008 R2. (Or even SQL Server 2012 if you are so inclined)
I am currently doing the same thing.
Creating your SQL 2008 database from a 2000 restore bak is a good first step. Most of the work for me was dealing with the user permissions, and making sure that the users were in sync with the database login, and that we didn't have a database schema generated by the backup tied to that user that would cause problems if we tried to recreate that database user.
What we ended up doing was:
1) Create a script. We had a script that would dynamically write a script to do the following: drop login, drop db user, drop schema, recreate login, recreate user, grant user permissions.
2) Restore database.
4) Run the generated script
Edited Apr 2012 because original link changed to latest version, SQL Server 2012
For an "in-situ" upgrade (MSDN links):
... to SQL Server 2008 R2
You can upgrade instances of SQL Server 2000, SQL Server 2005 or SQL Server 2008 to SQL Server 2008 R2.
... to SQL Server 1012
You can upgrade from SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2 to SQL Server 2012.
yet another option is to try to connect database (files) of sql2k to sql2k8 directly.
The simpliest way is to back up your database in SQL 2000 to a .bak file and move it. Do a restore and everything should be fine. Run a sp_Users_Loging to identify the users in the orphan server.