Mirrored Backups
Jul 14, 2007
Just want to know if anyone knows the actual syntax to do a Mirrored Backup
in SQL Server 2005 Ent Ed.
With Overwrite
with Verification
Disk to Disk
Also want to know if what their experience with Mirrored Backups.
Things to watch for etc.
Thanks in advance for you help on this.
Larry :-)
View 1 Replies
ADVERTISEMENT
Nov 15, 2015
The space allocated to the Log in question is 180 GB. During this time period I was running TLog backups every 5 minutes, yet the log continued to chew through to 80 GB used, even after the process was complete and a final TLog backup had been taken. It continued to stay very large until the Full backup was complete -- or something else that I'm unaware of completed. Like every other DBA I typically take a TLog backup to shrink the log, but what appeared to be the case here was the Full completed and it released the used log space. All said, will Transaction Log backups not free up the log during Full backups?
View 3 Replies
View Related
Nov 3, 2005
Hello:I have 2 MS SQL Servers 2000 Developer edition.Both have same settings and databases. I'd like to have them as mirroredservers - all transaction on one server must be performed on the otherautomatically. More than that I'd like to get possible if something happenedto one server, all transactions will be performed on another one.Please, give me a hint how to do that.Thanks,GB
View 6 Replies
View Related
Jan 2, 2008
Hi there!
I use different udls for a website which is partly asp pages and partly aspx pages.
Every database is mirrored, so each udl indicates a "failover partner". However we decided recently that one of the database would not be mirrored anymore. For this database we still use in the udl a "failover partner" to redirect the connection to the second database in case of a failover. For the asp pages the failover works fine even if the database is not mirrored, but it doesn't work for the aspx pages.
It would be great if anyone had an idea why the behaviour is not the same for the aspx pages, and if we can still use a "failover partner" in udls even if the database is not mirrored.. if not, what should we use to connect to another database?
Any help is welcome!
idel
View 3 Replies
View Related
Jan 30, 2006
SQL Configuration: Two 2003 Servers (OS Std ver) with SQL 2005 (Std ver) configured for db mirroring. (The servers aren't clustered.)
Web.config configuration string is using "ServerA".
If we fail Server A, then Server B will change roles to "primary" in about 20 seconds (we have confirmed this via SQL Mgt Console). BUT...our web app is still pointing to Server A and doesn't seem to know there is a fail over. SO - how can I make the web app aware of the failure?
Server A and Server B aren't in a cluster - and I understand a cluster's virtual server would be referenced in the connection string. Is there a way to make the web app automatically switch to Server B (without a cluster configuration)?
From what I understand, the cluster configuration would require Ent Ed. of OS and SQL and a big fat check!!
Thanks.
-Kevin
View 3 Replies
View Related
Oct 6, 2005
hi.I've seen ways to delete duplicate rows.Can someone give me some sql to do this?I have a table with varchar table_name_start, varchar column_name,varchar table_name_end;it has rows like this:table1 col1 table2table1 col2 table 3table2 col1 table1I'd lke to delete the rows if they exist with the names swappedaround, i.e. like above since the first and third share a column nameand the table_name_start/end matches the others table_name_end/start,I'd like to delete one and leave the other.I'm scratching my head trying to figure this out.thanks
View 6 Replies
View Related
Sep 25, 2007
Can I take a database snapshot of a mirrored database and restored that backup for use for reporting or production support?
Thansk in advance,
Ed
View 3 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
Sep 24, 2006
The following problem occurs when trying to mirror multiple databases using SQL Server 2005:
After mirroring about 40 databases, an error occurred concerning a lack memory availability on the mirror-server.
I added the parameter /3GB to the boot.ini file and enlarged virtual memory space.
Now I was able to mirror a total of 59 databases. When trying to add the 60th database on the principal server, it won't get through.
I don't get any error message, neither the mirror starts.
However the SQL Server Management Studio on the mirror-server doesn€™t seem to respond to any commands given until the mirror is again removed for one or more databases on the principal server.
Adding the parameter /PAE to the boot.ini file, or enlarging the virtual memory again didn't bring the solution.
Both principal- and mirror-server are dual processor servers.
The principal is a Windows 2003 Server Standard x64 Edition service Pack 1 and runs:
SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790
It has 4GB of memory.
The mirror is a 32-bit Windows 2003 Server Enterprise service Pack 1 and runs:
SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790
It has 2GB of memory.
Is there a work-around for this problem?
Thanks for any help in advance.
View 2 Replies
View Related
Apr 24, 2006
I am in the process of architecting SQL 2005 HA options and of course mirroring is at the top of the list. Does anybody know what the requirements are regarding upgrading mirrored databases, for example, applying hotfixes and service packs? Is it a requirement for the principal and mirror (and witness if applicable) to be at the same build level? Is there any requirement to upgrade one first and then the other as there is with replication topologies?
I had a look in BOL but can't find anything covering this (perhaps I missed it).
Thx, Simon.
View 5 Replies
View Related
Aug 24, 2006
I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.
But ADODB does not work. I get the error following error:
80004005 Invalid connection string attribute
When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)
What do I do wrong?
Here is the code:
ADOConn = New ADODB.Connection
ADOConn.Open(CS)
CS is my Connections-String:
"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"
Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.
Your help is very much appreciated.
Beat
View 4 Replies
View Related
Nov 17, 2006
Hello,
I'm having couple of DB that are mirrored.
my concerne is regarding the Log file size.
I'm running the following steps:
BACKUP DATABASE [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, INIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10
then
BACKUP LOG [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, NOINIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10
if I try to run a SHRINKFILE (DBName_log, 20)
I receive the following info:
Cannot shrink log file 2 (DBName_log) because all logical log files are in use
I'n a bit tense using a
BACKUP LOG [DBName] WITH TRUNCATE_ONLY
as it's part of a mirroring.
but I need to reduce the size of the log file.
thank four your suggestions
Eric
View 10 Replies
View Related
Jun 7, 2007
New to SQL. Can you reboot the principal server after running updates without causing a failover?
If not what would the correct procedure be.
View 2 Replies
View Related
Apr 30, 2008
Hi,
I am trying to setup mirrored subcriber in Transactional Replication in SQL 2005. I am not able to do so as it don't work after failover.However I am able to setup mirrored publisher with distribution property "PublisherFailoverPartner" for snapshot and log reader agent profiles and it works even after failover.
However I need to know, do we have something called "Subscriberfailoverproperty" or any other method to set up mirrored subscriber in Transactional Replication in SQL 2005.
Thanks
Kiran Patil
View 6 Replies
View Related
Oct 7, 2015
Today, I became an involuntary DBA until my company finds someone else. We have an SQL R2 DB that is mirrored that failed dur to the transaction log growing and filling up the disk. As a band aid remedy, I was able to add 20GB to the disk (it is a VM) and then I backed up the Transaction log and did select log_reuse_wait_desc from sys.databases where name = 'mydb' and the result showed that the backup was successful (NOTHING, I think was the result).
After this I was able to resume the mirror and everything has been running fine. What I need to do now is to shrink the Transaction log so that if it starts to grow again, I will get an alert and can avoid today's issue. From what I have read, I can just use DBCC SHRINKFILE [logname] after I do a backup and the changes will be reflected on the mirror as well. I have shrunk the T-log in non-mirrored servers before, just don't know if there are any key differences.
View 6 Replies
View Related
Sep 18, 2006
We have a mirror setup, with a third server that needs to be linked to this mirrored setup. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks
View 1 Replies
View Related
Jun 6, 2006
The database in Mirrored server is always in the state of restoring only.
the database in mirrored server is restored with norecovery
then we started mirroring.
the status of mirroring is successfull and is synchronized.
but the Mirrored server is always in the state of restoting
not allowing use to open the database.
could any one know why this problem is comming and give some solution for this problem so that the mirrored database can be accessible opened and queryed to really verfiy that the changes made in principal database is mirrored to Mirrored database.
View 3 Replies
View Related
Sep 18, 2006
We have a mirrored db setup, with a third server that needs to be linked to this mirrored setup as a linked server. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks
View 1 Replies
View Related
Sep 14, 2007
Hi
I'm trying to select data from a mirrored database situated on a SQL2k5 server, via a linked server on SQL2k.
I can select the data fine using SQLOLEDB but it's not aware of the mirroring so if the DB fails-over it errors.
To get around this, I installed SQLNCLI.msi to install the SQL2k5 provider and created a linked server like this:
exec sp_addlinkedserver @server=N'TEST2',@srvproduct=N'SQLNCLI',@provider=N'SQLNCLI',@provstr=N'Server=server1;failover partner=server2;'
exec master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TEST2',@useself=N'False',@locallogin=NULL,@rmtuser=N'user',@rmtpassword='password'
Executing the statement: select * from test2.database.dbo.table
gives the following error:
Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error: Column 'IsActive' (compile-time ordinal 2) of object '"database"."dbo"."table"' was reported to have changed. The exact nature of the change is unknown].
If i change the statement to
select * from openquery(test2,'select * from database.dbo.table')
It works. I don't really want to have to go and refactor all the SQL though!
I've seen similar posts related to Oracle and SQL2k5 64bit but they don't seem to be relevant to this situation.
Here's the version info:
2000 server (SP3):
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
2005 mirrored servers (SP2 3054):
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
I've also tried applying the following to the 2005 servers: sp2(3159) sp2(3161) but makes no difference.
Any ideas?
TIA
View 1 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
Jan 4, 2007
Hi,
I want to know that how is it possible to achieve mirroring for the service broker queues in the database?
View 1 Replies
View Related
Apr 15, 2008
Hello all,
We are planning to change the location of the log files from my production server. We have setup the mirroring also for those databases. I know for the databases without mirroring job i could detach the database, copy the log file to the target location and attach the database with the new logfile location. But for the mirroring databases I don't have any idea how to do that. Could some body guide me thorugh the process on how to do this task? thank you very much for all your help!
View 16 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
May 23, 2007
hello all
I am unable to read the mirrored database as it is always in the restoring state.
I have used only two servers (principal and mirror no witness server)
I tried to create the snapshot of the mirrored database but i get the following errors:
Code Snippet
Msg 1823, Level 16, State 2, Line 1
A database snapshot cannot be created because it failed to start.
Msg 5119, Level 16, State 1, Line 1
Cannot make the file "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataCRO_MASTER_data_1800.ss" a sparse file. Make sure the file system supports sparse files.
How can i get rid of this problem?
View 1 Replies
View Related
Sep 17, 2007
Hi All,
I have been struggling to make my classic ASP to call mirrored db successfully for the last few days. I am using a ODBC SQL Native Client. The front end application works perfectly untill the database is switched from principal to mirror server. I am getting the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][SQL Native Client][SQL Server]Cannot open database "testDb" requested by the login. The login failed.
I will briefly explain what I have done. I hae created a SQL Login testUser and this login has the dbowner rights to testDb. This is being done in Principal server. Till now the application works fine. Once I switch it to failover, the mirror server acts as a principal - this is what I was expecting. On database level it works. But my ASP application doesnot seem to like it. When I closely looked into the security, I found that testUser does exist in the testDb but the real problem is testUser is not associated with testUser Login. It's not possible to change as well.
Any sort of pointer is appreciated.
Many thanks.
Sincerely,
Milan G
View 4 Replies
View Related
Aug 3, 2007
I'm trying setup a proof of concept for a client but I€™m having issues with mirroring and replication.
With the help of http://technet.microsoft.com/en-us/library/ms151799.aspx I€™ve done the following..
The setup is as follows, I have several instances of SQL Server
A+B are mirrored with each other, with A being the principle and B the mirror
C is the distributor
E is subscribes to A, with parameters for PublicationFailoverPartner set to B
The mirroring between A+B works fine, I can manually fail each and the databases keep in step.
Without testing the mirroring failover, the replication between A+C+E also works.
However when I test the mirror to failover between A+B no transactions are replicated though to E. The publication moves from A to B in the Server Management Studio.
The logs state that the log reader agent can not gain access to A, however nothing is recorded regarding any attempts to contact B. In the replication monitor the error message
"The concurrent snapshot for publication ABCXYZ is not available because it has not been fully generated of the Log Reader Agent is not running to activate it. If generation of the concurrent snapshot was interrupted, the Spapshot Agent for the publica..." (cut off).
"the process could not execute 'sp_replcmds' on 'A'
I have checked that the SQL Server Agents are running on all agents,
I have checked that that server B is set at the PublisherFailoverPartner on server C agent configuration, I'm now at a lost as to what is wrong,
Any help or suggestions are greatly appreciated.
View 3 Replies
View Related
Mar 30, 2007
I have two 64bit SQL Server Std servers that will be principal and mirror. I also need to stand up a witness. I already understand that the witness can be any version of SQL Server, but can the witness server be 32bit given the principal and mirror are 64bit?
View 1 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
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
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