When I attempt to restore the backup (.bak 1,32GO) database into SQL Server 2008 I get the following message:
CREATE DATABASE or ALTER DATABASE failed because the cumulative size
of the resulting database will exceed the license limits of 4096 MB
per database
A backup is often significantly smaller than the space required for a live database, presumably the database the backup came from is over 4096Mb so sql cannot restore it. As per the comments, you'll need to get a new license to be able to restore this db.
Related
We have a client who has been providing us with full database backup of sql server 2016 database everyday.
We asked them to send only one initial copy of full backup followed by transaction logs(one in every 30 minutes) so that we can have more recent data.
On our side, we are using SQL Server 2017 version. We are able to restore the full backup and all subsequent T-logs only in NORECOVERY mode. But we need the database to be in STANDBY mode, so that we can do T-Log restore and also read data from the database. We cannot wait till all the T-logs restore finishes because there is no end to the T-log files, they keep on coming.
The issue is we are not able to move the database into STANDBY mode. We are able to put it in either Restoration or RECOVERY modes only.
I found from Microsoft doc. that STANDBY mode is supported only between same version of SQL Servers. Is there anyway of reading the data from Restoring database while restoring logs.
Is there anyway of reading the data from Restoring database while restoring logs [on a higher SQL Server version].
No. The database must be upgraded before it can be read, and that happens after recovery.
You can always install an additional SQL 2016 instance on the server with version downgrade rights.
I have a backup query like this:
BACKUP DATABASE #temp_baza TO DISK = #temp_bak
BACKUP LOG #temp_baza TO DISK = #temp_log
It is run by sqlcmd like this:
sqlcmd -l 120 -S %SQL_SERVER% -i %KOPIA_KATALOG%backupPELNY.sql
-o %KOPIA_KATALOG%output_PELNY.txt -v NAZWA_BAZY="%NAZWA_BAZY%"
-v KOPIA="%PELNY_KOPIA%\"
In output_PELNY.txt I have this kind of results:
BACKUP DATABASE successfully processed 645127 pages in 2819.651 seconds (**1.787 MB/sec**).
or
BACKUP DATABASE successfully processed 26338 pages in 227.348 seconds (**0.905 MB/sec**).
Main DB is on one Disc, backup is on second disk.
When I use Explorer to copy files between these two disks, I get a transfer speed of approximately 100 MB/s.
QUESTION:
Why is the backup speed so slow - I mean less than 3MB/s?
REMARKS:
Windows 2012 Essential + SQL Server 2008 R2 EXPRESS
Intel XEON E3-1270 v3 + 16GB RAM
To solve your problem, please refer to the following links:
Options to Improve SQL Server Backup Performance
Is your SQL Server backup running slow? Here’s how you can speed it up
Super-Fast Backup and Restore Throughput for SQL Server
MS SQL Server backup optimization
How to Make SQL Server Backups Go Faster
Below are some sample queries for download
To solve the problem, I suggest that the following part of the query:
backup database DBNAME to disk='C:\1\DBNAME.bak' with buffercount=16 ,maxtransfersize=4194304
SQL Server 2008 R2 Express has the following limitations:
Constrained to a single CPU (this limitation was raised in 2012 to "The lesser of one socket or four cores", so multi-threading is possible)
1GB RAM
10GB database size (per database)
So your backup is likely to be CPU bound and/or memory bound.
(Of course, it raises the obvious question: Why are you using an express version on your server? and why not a later SQL Server version?)
Ref.: SQL Server 2008 R2 Express Database Size Limit Increased to 10GB:
What about CPU and memory limits? Are any other limits changed in SQL
Server 2008 R2 Express?
No, the database size limit is the only limit we updated in SQL Server 2008 R2 Express. SQL Server 2008 R2 Express is still limited
to 1 CPU and 1 GB of RAM.
We currently have a SQL Server Standard 2014 database on one of our servers that is backed up daily to Azure Blob Storage. Those backups are working well and have restored beautifully to the original server in manual tests.
However, to ensure that our backups continue to be valid, I want to put in place some sort of automated restore testing. Due to performance/disk constraints, I'd rather not do this automated testing on our primary database server. But we can't spend the money to buy more SQL Server Standard licenses to set up another server. And we can't use SQL Server Express, because our database is too large (about 20 GB).
Given that our backups are stored in Azure, I thought the best way to test backup restoration would be to restore the backup directly into an Azure SQL database. I could do this roughly once per week, run some quick checks on the restored data, and then automatically delete the database, and pay for less than 1 hour of service/week. This would result in minimal expense. However, I'm not sure it's possible. Google searches for instructions on how to restore a SQL Server backup directly to Azure SQL haven't turned up anything so far. Is it possible for me to restore my SQL Server backups directly to Azure Managed SQL like this?
If it isn't possible, my next thought is that I could just create an SQL Server VM in Azure and activate/deactivate it as needed for my automated restore tests. That'd be a bit more complicated though, so I'm saving that approach for plan B.
Not Directly. You can only directly import a bacpac file into SQL Azure.
What you can do is use SQL Server on an Azure VM to test your backup files.
Pretty sure you can write a script to automatically pull down the latest .bak file and restore it to the SQL Server Instance on the VM.
I have one production database on SQL Server 2000 Standard Edition and would like to upgrade it to SQL Server 2005 Standard edition. How to accomplish this task in case of copying transaction log file from source and restore to destination database and making the destination database online also how can I create database user while the destination database is on NORECOVERY mode?
Any help would be appreciated.
Thanks experts
Apologize for my incomplete question and lack of SQL knowledge
I already backed up and restore the production DB on target server with NORECOVERY mode while the production server operational (still operational) what I want to do is (if applicable) prepare the target server before I cutover. Now I'm migrating DB objects to target server and once all objects are migrated to target server I'll take the database online by restoring the last log backup if log shipping is applicable in SQL2k standard edition.(my upgrade path is side-by-side)
Thanks all in advance
I'm not sure what part log shipping plays in your upgrade.
The steps you should take are:
Install SQL 2005 on a new server.
Take your production system offline.
Perform a backup.
Restore the backup to the new server.
Attach your production system to the new server.
Test..test..test.
After you've moved it over, you might consider changing the compatibility level of the database in the new server to SQL 2005. However, be aware that there are many differences between SQL 2000 and 2005. So review this: http://technet.microsoft.com/en-us/library/ms143232(v=sql.90).aspx to get an idea of what issues you might have.
I have a MS SQL Server 2005. It is very easy to backup individual databases, just right click on database then Tasks->Backup. My question is how to back up SQL server database objects outside the databases?
For example, under the Security->Logins, there are list of login users; under the SQL Server Agent->Jobs, there are list of jobs, and under the Server Objects->Linked Servers; ans so on.
Is there any way to do full-backup of SQL server? in TSQL? I tried to find out from SQL Server Management Studio but I could not find any.
Those items are stored in the system databases -- mostly master and msdb (under databases | System Databases). You can either back those up individually (like you do other databases) or, better yet, create a Maintenance plan (Management | Maintenance Plans) to do so on a regular schedule.
I recommend using this script. I spent much time looking after maint plan failures before it.
http://blog.ola.hallengren.com/
http://msdn.microsoft.com/en-us/library/ms187048.aspx
has more info on the standard procedure.
If you're responsible for these databases, I recommend to practice restoring the system databases on a new server, so when the time comes you are confident. The restore is not as simple as rightclicking restore.
database logins are stored in the user database, server logins are stored in master. msdb stores sql jobs and history. the simplest full backup you can do in T-SQL is:
BACKUP DATABASE dbname
TO DISK='C:\backupfile.bak' WITH INIT
WITH INIT means that it will overwrite the file.
Restoring the master database requires restart sql server in single user mode. You do this from the command line in the sql server directory with: sqlservr.exe -c - m
then connecting with SSMS or sqlcmd and run a restore.