Backup Plan For A SQL2005 Mirrored Database.
Sep 7, 2007
Heya all,
Sorry if this has been posted elsewhere, etc., please point me in the right direction if it has 'cos I couldn't find it!
Right, we have a mirrored database with full safety and a witness for automatic fail over, all works fine, very impressed with it. Now I need to backup the database involved and this is where I could do with some help and answers and/or tips.
As the mirror database is off-line/recovering it seems you can't back that one up, but I'd like to have something that tries to back it up for if/when it fails over and becomes the primary. The solution I've used for now is to write a small .Net application that uses the client side fail over connection string (Data Source=Server1;Failover Partner=Server2) so that it connects to whatever system is currently the primary, and then issues the relevant 'BACKUP xxx' statements to backup the database.
This applications is launched from a windows scheduled task job on the hour (or near to it), every hour. At 06:00 it does a full backup, at 12:00, 18:00 and 00:00 it does a differential backup, and all other times it does a transaction log backup.
This all seems to work fine so far, and generates all the relevant backup files to a share on another server.
So, my main question is; does this look like a good plan? Am I missing some really simple wizard or button that would backup the relevant database from whatever server is up?
Secondly, are the backups from each server interchangeable as they're in a mirrored configuration? That is, for example, the backup application (on the hour) connects to Server1 does a full back up, followed later by a log backup. Server1 then dies, so the next time the backup application runs it connects to Server2 and because of the current time does a log backup from Server2. If we had to restore from backups, could we use the full backup and log from Server1, followed by the log from Server2? Otherwise I'll guess I'll need to modify the logic for the backup application to detect it's failed over, and maybe do a full backup on Server2, or something like that.
Anyway, thanks for any help/advice/tips,
Gareth/OhGod
View 5 Replies
ADVERTISEMENT
Dec 15, 2005
hi
i try to restore a bak file from another sql2005 server to my sql2005 server, but it show the error message as below :
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Cannot open backup device 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackupackup.bak'. Operating system error 5(error not found).
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3201&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
pls some one can help me ???
thanks
chaus
View 62 Replies
View Related
Nov 15, 2007
We replicate a SQL2000 database (DataBaseA) to a SQL2000 database (DataBaseB) by using the Restore function and hasn't change its logical name but only the physical data path and file name. It is running fine for a year. We use the same way to migrate the DataBaseB to a new SQL2005 server with the Restore function and the daily operation is running perfect. However, when we do the Backup of DatabaseB in the SQL2005, it just prompt the error message
System.Data.SqlClient.SqlError: The backup of full-text catalog 'DataBaseA' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online. Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data. (Microsoft.SqlServer.Smo)
Please note we left the DataBaseA in the old SQL2000 server.
Please help on how we can delete the Full-text catalog from DatabaseB so we can do a backup
Many Thanks
View 1 Replies
View Related
Jun 2, 2008
Hi Guys!
I am trying to create a 'scheduled back up database task'maintenance plan which has an option to 'overwrite backups' but with also the "Create a backup file for every database" option checked. Does anyone know how to do this?
Thanks Guys.
View 6 Replies
View Related
Jan 8, 2008
Hi everyone,
I am running SQL 2000 SP3. I have one maintenence plan that is backing up one database and that is working fine. I am trying to create another maintenence plan for another database but the job does not execute and it gives me errors. Both SQL server and the agent uses 'local system account' to run the service. I have tried changing this to a domain account to see if it fixes anything. Also on the jobs, the job owner is a domain account. Below are two erros I am getting when running the jobs.
Error1:
BackupDiskFile::CreateMedia: Backup device 'D:SQL Backups....mybackupfile.bak' failed to create. Operating system error = 3(The system cannot find the path specified.).
Error2:
BACKUP failed to complete the command BACKUP DATABASE [Database_Name] TO DISK = N'D:SQL Backups....mybackupfile.bak' WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
Any help would be appreciated.
Thanks.
View 1 Replies
View Related
Dec 3, 2001
The database is SQL Server 2000. Recover Plan = 'Simple'. Maintenance Plan always fails when DBCC tries to put database in single-user mode so it can do the backup, if there is a user has a connection to it from EssBase. No queries running - just a connection. How can I get SQL Server to automatically kill the connections so it can do the backup?
View 2 Replies
View Related
Nov 30, 2006
Hi,
I currently have 2 mirrored servers and would like to implement a backup solution using an existing TSM server. The first thing that comes to mind is using the TSM client or Litespeed by Quest, but I'd like to know the effects of performing backups on principal and mirrored servers first.
Will using one of these products cause errors or problems should the backup client try to backup a mirrored database? Can anyone make any recommendations on the effects of using TSM client or Litespeed for a mirrored environment?
Thanks.
View 4 Replies
View Related
Aug 23, 2007
Anyone come across this problem:
When adding a backup database task to a maintenance plan and selecting backup type Differential or Transaction Log, then selecting a Specific database. Once you then close down the Backup Database Task window and re-open it, your selected database, is no longer selected? This doesn't happen if you choose a Full Backup
Is this a known problem? What is the workaround? This occurs on SQL 2005 Version 9.0.3159.
Any advice gratefully appreciated.
View 1 Replies
View Related
Mar 11, 2008
Hello, everyone:
I just heard that for restore purpose, ths full backup and transaction log backup should be from one maintenance plan. Otherwise transaction log backup files cannot be restored after restoring full backup files.
Is it true? Can anyone offer official documents?
In my system, full and transaction backups are from one maintenance plan. Restores are doing fine. I am not sure that ideal is true or not.
Thanks
ZYT
View 2 Replies
View Related
Sep 4, 2007
We have a Prinicipal, a Mirror and a Witness server. We have automatic failover configured between the Prinicipal and Mirrored server. When we stop MMSQL service on Prinicipal, not all the databases failover to the Mirrored instance.
Any suggestions would be welcomed as we have a tight deadline to get this in Production.
View 5 Replies
View Related
Oct 12, 2007
Can you open/use a database created in SQL2005 in SQL2005 Express?
Thanks for the help!
Max
View 4 Replies
View Related
Oct 11, 2006
I'm having a problem with SQL2005 Database mirroring.
I have an ASP application that loops for a certain amount of interations and in each iteration I create a SQL Connection object and use the failover partner in the connection string. The object then writes a simple record and then the connection is closed and the process starts again.
About half way through my loop I force a failover to the server mentioned as the failover partner in the connection string. At this point my application encounters a SQL Exception error and the application fails.
I read in this article, http://msdn2.microsoft.com/en-us/library/ms366199.aspx, that this is expected and that you shoud request a new connection using the same connection string but this isn't working for me and unfortunately no examples are given anywhere.
I would appreciate any help. Thanks
Luis Bonilla
Here is a sample of my code:
Dim k As Integer = 1
Dim constring As String = "Server=SVR01.XXX.XXX.comInstanceName;Failover Partner=SVR02.XXX.XXX.comInstanceName;" _
& "Database=test;" _
& "Integrated Security=SSPI;"
Do Until k = 60
Using con As New SqlConnection(constring)
Dim cmd As New SqlCommand()
Try
con.Open() '<--------This is where the exception occurs
Catch ex As SqlException
Dim en As String = ex.ErrorCode
Dim em As String = ex.Message
Dim emm As String = ex.Number
Dim enn As Integer = ex.State
End Try
lblprimary.Text = "Current Primary Database = " & con.DataSource
cmd.Connection = con
cmd.CommandText = "INSERT INTO SystemsTest (FirstName, LastName)VALUES ('SQLWriter" & CStr(k) & "','" & con.DataSource & "')"
Try
cmd.ExecuteNonQuery()
Catch
lblresult.Text = "Results = Error with record number " & CStr(k)
End Try
con.Close()
cont:
End Using
Sleep(1000) 'For testing
k = k + 1 'For testing
Loop
View 3 Replies
View Related
Aug 8, 2007
Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?
Thanks,
View 6 Replies
View Related
Feb 28, 2008
I have a mirred database and have snapshot created from the mirroed database. I can do data selecting from the snapshot. But when the pricipal server is down , I can re-active the mirroed database.( I did succesfully upto this). Then I need to restore the database from snapshot and which failing with following error message.
Code Snippet
Msg 5123, Level 16, State 1, Line 3
CREATE FILE encountered operating system error 3(error not found) while attempting to open or create the physical file 'E:sql_datadevitst_mirrorlog st_mirror_log.ldf'.
Msg 5024, Level 16, State 2, Line 3
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 3
The system could not activate enough of the database to rebuild the log.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
View 3 Replies
View Related
Jul 9, 2007
I am trying to connect to a failover partner using ADO (non .Net) and Visual C++. ADO is throwing the following exception:
Caught: Unspecified error - Invalid connection string attribute(Microsoft OLE DB Provider for SQL Server)
Connection String:
Provider=SQLOLEDB.1;Data Source=EdwardsvilleSQLSERVER;Failover Partner=Mirror2SQLSERVER;Initial Catalog=SomeCatalog;User Id=SomeId;Password=SomePassword
Any ideas?
View 4 Replies
View Related
Feb 29, 2008
Hi all,
I am struggling with configuring SSB network routes to a mirror database. What I want to accomplish is to configure a SSB application to work in a database mirroring setup but I am not looking for a load balancing solution.
According to SQL Server 2005 Books Online (http://msdn2.microsoft.com/en-us/library/ms166090.aspx) the typical routing configuration for a service hosted by a mirrored database is set by specifying the 'mirror_address' field but leaving the 'broker_instance' field empty (i.e. NULL) in the sys.routes table (see Example 3 in link above). I haven't seen how this is possible because if you specify the MIRROR_ADDRESS parameter in the CREATE/ALTER ROUTE command then you must also specify the BROKER_INSTANCE parameter.
I haven't found a way to set the mirror_address field to a valid value and the broker_instance field as NULL, is this possible? If not I must set the broker_instance as the guid of my broker instance but my understanding is that it should primarily be used for load balancing configuration. My preference would be to not set the BROKER_INSTANCE parameter, is this possible?
Best regards,
Oli
View 1 Replies
View Related
Apr 14, 2015
I need to increase the file size for a mirrored database. I am new to using mirroring for replication. Will increasing the file size break the mirror?
View 2 Replies
View Related
Jul 12, 2007
Hello,
I am a C++/C# developer my SQL skills are very limited.
I have a database set up for mirroring and I would like to get an e-mail notification whenever an Automatic Failover occurs. Can anyone show me how to do this using SQLServer 2005? Please provide T-SQL script sample if possible!
Thanks,
-Agustin
View 7 Replies
View Related
Oct 23, 2015
I have a database I need to copy from a Prod server to a Dev server. There is not enough space on the Dev server. In looking at the size of the files on the Prod server, the Initial Size property for the transaction log on the Prod server is set to 100,000 MB though the log is using nowhere near that.
This is a mirrored database so the recovery model is "full". I know that to change the initial log size, I have to put the database in 'simple" recovery model. Is this possible? Can I just:
1. Pause the mirror
2. Switch recovery model to simple
3. Change the initial size property to something smaller.
4. Shrink the transaction log
5. Change the recovery model back to full and resume the mirror?
I honestly don't know if the transaction log is needed on the Dev server. Meaning I may just be able to restore the transaction log to a different location on the server and delete it so that new one is created.
View 2 Replies
View Related
Mar 6, 2008
I have set up mirroring in high availability mode (principal, mirror, and witness).
After setting up mirroring, I needed to adjust the size of a column in one of my tables. I did so with the following command
ALTER TABLE OrderOptimizer.dbo.rCodes ALTER COLUMN CodeDescription VARCHAR(8000).
The column was initially VARCHAR(128)
When I look at the table structure it shows that the column is now VARCHAR(8000), however I can only enter 128 characters into the field.
I forced a failover to look at the table on the mirrored version. It too showed that the column was VARCHAR(8000).
If I open the table I can enter more than 128 characters into the field, however when I refresh, it is truncated to 128 characters,
Any help would be appreciated
View 4 Replies
View Related
Oct 19, 2015
Every once in a while a scheduled restore of a production database backup to a development server will fail with the following error.
RESTORE cannot operate on database 'XXX' because it is configured for database mirroring or has joined an availability group
While it is true the production database is involved in database mirroring, the development server does not have database mirroring enabled. This error tells me something within the backup is telling the development server the database is configured for database mirroring.
However the perplexing part for me is that we only receive this error maybe 5% of the time, if that, and only on a couple of our databases. We have numerous other restores of mirrored production databases to development servers that have never produced this error. So my question is what is causing this error to occur, and why is it not happening all of the time? We get around this error by deleting the DEV database and re-running the restore job.
View 0 Replies
View Related
Aug 13, 2006
I am having a hard time setting up a backup plan for my sql server databases. Right now I create a copy of each database on another machine on the network once a day. Once a week I upload a MSAccess version to a remote site. Obviously there are huge amounts of potential data loss if a crash of some sort would occur locally.
My new plan is looking like this:
1) Run a complete database backup once a day
2) Run Transaction Log backups every hour
My questions are as follows:
1) What role does a "Backup Device" play in this process (I currently do everything through the Enterprise Manager interface)?
2) I am having a hard time scheduling mydatabase_complete.bak and mydatabase_trans.TRN at all. I get several errors.
3) I would like to run these backups on another network machine but am not seeing how to access "My Network Places" from the "Backup Database" utility in Enterprise Manager.
Any help in the form of answers or pointing me towards a useful resource for this process would be much appreciated!
Thanks in advance~
View 1 Replies
View Related
Feb 7, 2004
Hi all,
I am new to SQL and was given a SQL server to administer. There are lots of databases on the server and no one seems to know which one is used and which one is not. I try to do some cleanning.
1. Can I find out if there is any activity on a database so I can delete them off and how?
2. There are backup jobs that run every night which do a full backup. I am thinking of changing it to do full backup once a week and differential every night. These databases are updated daily. Some have lots of activities, some have less. Does that sound reasonable? and if I do differential backup, should I create separate back up file or should I add on to the full backup file?
Any comments or suggestions are greatly appreciated.
View 2 Replies
View Related
Jan 6, 2008
I would like to implement the following backup strategy in SQL Server 2000:
full backup is done once a week
diff backup daily
tran backup every hour
How should I approach this. Should I use a backup device linked to a hard disk file? Should I create a backup device for each type of backup (full, diff, tran) and schedule it. If I use a backup device how do I distinguish each backup for old backups.
thanks
View 4 Replies
View Related
Jan 24, 2002
Are there any known issues using Maintenance Plans to backup DBs in SQL Server 7.0
Thanks
View 1 Replies
View Related
Apr 17, 2000
I made a backup maintenace plan in sql7.0, but it doesn´t work. The message included on the event logger is:
SQLServerAgent
SQL Server Scheduled Job
'DB Backup Job for DB Maintenance Plan 'Teste''
(0x219C5CB03C11D4119D8F0020188D7311) -
Status: Failed - Invoked on: 4/17/00 3:25:00 PM - Message:
The job failed. The Job was invoked by Schedule 12 (Schedule 1).
The last step to run was step 1 (Step 1).
And before this message there is another one that can be making something goes wrong:
SQLServerProfiler
Executable: C:WINNTsystem32mmc.exe
Description: Unable_To_Set_RegKey_Val
Source: ........srceventlog.c
Line: 315
Someone can help me telling me the reason that is generating this kind of error and doesn´t work. I have do the same think in others two server and there it works ok.
Thanks in regards
Sandra Lino
View 1 Replies
View Related
Feb 23, 2000
I am doing full backups on 25 databases nightly using the SQL maintenance plan. Recently I have started getting the backup process hung on one database, so the whole plan does not finish. The job shows as executing, but nothing is being done, and nothing has been written to disk for this database. The SQL logs show a DBCC TRACEON 208, but the process it refers to is using another database. The NT logs do not show anything going on either. Additionally the backup process will not die when it is killed. They only way to make it go away is to stop and start the SQL Server. The system is a quad Pentium 450, 2Gig of ram, and plenty of disk space. It is NT SP5, SQL7 SP1. The DB is about 8.2 Gig. There are no other jobs scheduled to run at the time the backups run. Does anyone have any ideas what would be causeing the process to hang? Also what is a trace flag 208, it is not listed in BOL. Thanks for your help.
View 1 Replies
View Related
Feb 7, 2003
I have a maintenance plan that I use to backup some of my databases and transaction logs. I have "Check Database Integrity" checked. If the database is being used by anyone when the backups are being performed, the check issues an error because the DB cannot be put into single user mode and then skips the backup. In the Plan, I have unchecked the box for "Perform these checks before backing up the database or transaction file" and apply the change. When I go back into the plan, the option is checked again. How can I get around this problem?
Thanks,
Ken
View 1 Replies
View Related
Mar 21, 2002
I have a maintenance plan where I backup the system databases and my application databases every night. Once a week I do a Check Database Integrity. For the Master and MSDB databases, it errors out telling me that the database must be in single user mode. I thought that the maintenance plan would switch the DB to single user mode when it needed to perform its checks. Any suggestions on how to get this to work successfully?
Thanks,
Ken Nicholson
View 1 Replies
View Related
Sep 6, 2001
I'm running sql server 2000. All the backups created through the Maintenance Plan failed (no specific error code), whereas backups created by itself (through database name => All Tasks => Backup database...) run fine. Does anybody have a clue why the Maintenance backup failed or how to trouble shout the problem?
The reason I want to make the backups from maintenance plan to work is that each backup will have a unique name and I can schedule to remove the old backup files from the system.
View 5 Replies
View Related
Jun 21, 2006
Hi,
I have made a maintenance plan to backup a database.
The file name is like this: name_db_200606211209.BAK
isn 't it possible to get the filename to be always the same
(without 200606211209)
I have unchecked the checkbox to remove files older than x-days
but it still appends 2006... to it
View 3 Replies
View Related
Oct 17, 2006
Our database is more than 20,000,000 bytes and increase largely everyday
who can give me some advise about stable backup?
My database is sqlserver2005 and now i use files to backup including full backup and diff backup,whether is better to use device?
any ideas? thanks in advance
View 5 Replies
View Related
Aug 21, 2007
Hello all,
I would like to be able to backup our databases to a network share mapped drive. Is this possible? When every I go in to setup a maintenance plan it will only allow me to select local drive as the backup location. If my server crashes its not going to do a whole lot of good if my databases are stored locally (I do also backup up to tape every niight). I backup the databases every hour to local disk and would like to send them to one of my MS Storage Servers on the network.
Any help would be greatly appreciated.
thanks
Jason
View 3 Replies
View Related