Quantcast
Channel: Database Mirroring forum
Viewing all 1024 articles
Browse latest View live

SQL Copy Database

$
0
0

I have few databases which i want to copy on another sql server in same network but i want to configure copy in such way that always copy same database with different name with schedule. is this possible???.

i have tried normal copy and its working very well. just wanted to know same database with different name with schedule. is this possible???.


Akshay Pate Server Administrator


Mirrored database in Disconnected/In Recovery state

$
0
0

I am running Microsoft SQL 2008 R2 database server I have a mirrored database that shows in the following state 'databasename (Principal, Disconnected/In Recovery)'. When I look at the mirror server is shows in the same state 'databasename (mirror, Disconnected/In Recovery)'. I am not able to do anything with either DB, I cannot break the mirror, I can't take it offline, I cannot delete it. This is a Dev Database so if need be I could destroy it and re-create. But I would like to figure out what the issue is and get it working again in case I was to have this problem in production.

Thanks for any Help!

using WMI alert for mirroring in Sql server 2012

$
0
0

We are using mirroring in Sql Server 2012  and we are using WMI alerts for some of events such as Connection lost,Manual failover,...

In alert definition we have set the followings:

Type: WMI event alert

NameSpace: \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER

Query: select * from DATABASE_MIRRORING_STATE_CHANGE where State = 6

The alert is bing triggered correctly,but on email description instead of having meaningful explaination like 'Connection lost',We have the same query:

Query: select * from DATABASE_MIRRORING_STATE_CHANGE where State = 6

We have used the same implementation in our Sql Server 2008 servers and it is working fine.This mashine (Sql Server 2012) is a new mashine.

I would appreciate if someone help me on this.AlsoI checked and 'Include body of e-mail in notification message' was already set.

Thanks

Aspet


A.G

SQL Copy Database Configured need to create notification

$
0
0
I have configured Copy Database I have scheduled it to run on afternoon and evening. database size is almost 3 gb. it will take 20 min to copy on another server i have no issue with this. just wanted whenever task runs it will send email to me that copy database is successful and database coped properly. is there is any want to do that.

Akshay Pate Server Administrator

Create a user specific to a SQL Agent Job?

$
0
0

Hi All,

There is a requirement to configure a user who should only have to have access on one database out of all and also need to alter only one sql agent job among all. Verified Server and database roles but haven't seen any option like in that way, is there any possibility please suggest on this.

Regards,
Shiva


----Learners Curiosity Never Ends----

Batch script to automate mirroring fails

$
0
0

Hi

I am using SQL 2008 R2 and trying to create a script to setup database mirroring. The following steps fail with the error "The remote copy of database "XXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log." However when I run the backup, restore, and set partner script manually I can configure database mirroring, so I cannot see where this message is coming from. I've spent all morning trying to figure this out with no success. Could someone please shed some light on this issue?

Thank you

1. On principal server, run following

DECLARE @fileName VARCHAR(256)
DECLARE @filePath VARCHAR(256)
DECLARE @DBName VARCHAR(50)
DECLARE @MachineName VARCHAR(50)

SET @filePath = 'E:\SQLData\MSSQL10_50.MSSQL2008STD\MSSQL\Backup\'

DECLARE db_cursor CURSOR FOR  
SELECT name
FROM master.dbo.sysdatabases
WHERE name IN ('XXX')   

OPEN db_cursor   
FETCH NEXT FROM db_cursor INTO @DBName   

WHILE @@FETCH_STATUS = 0   
BEGIN   
        SET @fileName = @filePath + @DBName +'_' + CONVERT(VARCHAR(20),GETDATE(),112) + '.bak'

        BACKUP DATABASE @DBName TO DISK = @fileName WITH COMPRESSION
        BACKUP LOG @DBName TO DISK = @fileName WITH COMPRESSION

        FETCH NEXT FROM db_cursor INTO @DBName
END   

CLOSE db_cursor   
DEALLOCATE db_cursor
GO

2. Copy backup file to mirror server

3.On mirror server, run following script to restore full database and transaction log

DECLARE @fileName VARCHAR(256)
DECLARE @filePath VARCHAR(256)
DECLARE @DBName VARCHAR(50)
DECLARE @MachineName VARCHAR(50)

SET @filePath = 'E:\SQLData\MSSQL10_50.MSSQL2008STD\MSSQL\Backup\'

DECLARE db_cursor CURSOR FOR  
SELECT name
FROM master.dbo.sysdatabases
WHERE name IN ('XXX')   

OPEN db_cursor   
FETCH NEXT FROM db_cursor INTO @DBName   

WHILE @@FETCH_STATUS = 0   
BEGIN   
        SET @fileName = @filePath + @DBName +'_' + CONVERT(VARCHAR(20),GETDATE(),112) + '.bak'

        RESTORE DATABASE @DBName FROM DISK = @fileName WITH NORECOVERY, REPLACE
        RESTORE LOG @DBName FROM DISK = @fileName WITH NORECOVERY

        FETCH NEXT FROM db_cursor INTO @DBName
END   

CLOSE db_cursor   
DEALLOCATE db_cursor
GO


4. Set partner to principal server

ALTER DATABASE XXX SET PARTNER = 'TCP://principalserver:5022';

5. set partner to mirror server

ALTER DATABASE XXX SET PARTNER = 'TCP://mirrorserver:5023';

Msg 1412, Level 16, State 0, Line 1
The remote copy of database "XXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log.

How to stop mirroring for a mirrored database?

$
0
0
I need to stop mirroring for a single mirrored database only? How can i do that?

SQL server 2005 -> 2012 differential backups

$
0
0

We are currently running a production sql server 2005.  I want to a quasi-real time (few hours difference) synched copy of a user database in our current 2005 environment in a sql server 2012 environment.

Initially, plan to make a backup of the user db in 2005 and restore in 2012.  After that do a differential backup in 2005 and then restore it 2012 every few hours.  Or possibly some sort of SSIS package finding differences in certain tables I'm interested in and then updating.  I want to minimize the size of the updates.

In essence, I want to be able to use the upgraded tools in 2012 on our 2005 production data.  In particular, SSRS.

Does anyone have any suggestions?  Pitfalls?  Details?

Thanks.


Migration From 2008R2 to Azure

$
0
0

Hi All,

I am migrating my DB to Azure. Now the requirement is :

  • I dont want to shut down R2.
  • I want to use this as similar to <Active-Passive mode> that is when Azure is down R2 should be up and when R2 is down Azure should be up.
  • For this I want a simple audit table which records the changes done in my R2 or azure what ever is up <in required tables>, For example if an update is run on the table I need to store the PK of updated row and "Update" in Operation column. If an insert is done then PK of that row and "Insert" in Operation and Simalar others.
  • This is similar to 'Always On - HA' feature of 2012 RC0. (I cant create a new instance of RC0)
  • The audit table will be used for knowing the operations done and replicating these in the instance which is currently in down mode, so that I always get recent updated records in the tables.
  • I am using a trigger methodology for this, but knowing the performances of Triggers, I dont want to use that.

Please suggest alternative scenarios for solutions.

If I am not clear in my requirement. Please ask.

Thanks.




Himanshu Sharma

Strange performance issues after mirror failover in SQL Server 2008R2

$
0
0

I'm working on trying to resolve some performance issues that have cropped up in very strong correlation with a failover test we ran recently.  The test involved failing over to the new mirror partner, which is a VM.  After we failed back to the original server, we started seeing some issues which were not there previously.

I have a set of symptoms, but it's not clear which ones are caused by or causing the problem. For instance, one small, high activity table started seeing deadlocking frequently, where previously there was none.  A process which updates data once a day, has started reaching a timeout, where previously it had no issues.

CPU usage is up by about about 2x. Soft memory faults are up by a factor of 2-3x.

I haven't found any causes for all these things, or why failing over the server would cause this to appear.  There doesn't appear to be memory pressure in SQL(cache hit ratios are in the 99% range, and buffer page life is long). It doesn't appear to be mirror performance, sync is maintained well with 1ms or less of backlog.

Any ideas why I'm seeing these widespread changes in performance?

Thank you!

1418 Error. -- No Solutions found

$
0
0

Good Afternoon,

I am receiving the 1418 error and I'm a bit stuck on how to address this issue.

I'm running SQL Server 2012 on both servers.

I have verified my ports via Telnet. I have addressed the NT Authority issue and changed all services to the domain. 

I am using Restoring with NoRecovery.

Endpoints are set correctly.  

Mirroring

$
0
0

Hi,

What changes in the front end code is needed if mirroring is implemented for the high availability?


reddy.s

mirroring

$
0
0
If My mirror server fails some fraction of seconds,how can i restore data in between failure.

Database mirroring requirement design

$
0
0

Hi Everyone,

I have a plan to create High availability for my database use mirroring in my company. Mirrored database will be placed in DRC and i need to create capacity plan for this.

But i'm not able to find  :

1. How to count amount of RAM needed

2. How to count IOPS needed

3. How to count bandwidth needed for the I\O on the principal and mirror servers

4. How to count network bandwidth needed

Is there any suggestion where do i find answer for my questions? Thank you very much.

Best Regards,

Maliq


mirroring database

$
0
0

hi everyone..  after endpoints is configured  in the mirroring while executing the mirroring, I am getting the following error....if anyone knows,please share your knowledge

"

TITLE: Database Properties

An error occurred while starting mirroring.
ADDITIONAL INFORMATION:
Alter failed for Database 'AdventureWorks2008R2'.  (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The server network address "TCP://panendarrao-PC:5023" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)
BUTTONS:
OK

"


Reg :Witness Server Error 1456 & Msg 7878, Level 16, State 4, Line 11

$
0
0

Hi  All

Recently we have set up an mirroring setup, We have done this by using certificates . The servers are not in domain and we have configured the mirroring, Mirroring is happening woith put witness server and when we are trying to add wtiness server it is throwing error as 1456 "The alter databse command couldnot be sent to remote server instance tcp://<witness-instance>:<port>.
The database mirroring configuration is not changed.verify that server is connected, and try again.(Microsoft SQL Server Error:1456)
.

We have checked that all 1433 and 5022 ports are listening on all three servers and we can able to telnet the server also.

PRINCIPAL Server : SQL Version is Standard edition 2008 64 BIT

MIRROR Server :SQL Version is Standard edition 2008 64 BIT

WITNESS Server : SQL Version is EXPRESS EDITION 2008R2 with SP2 32 BIT.

Can any one help me in this case as it is very crucial for us to have this.

And moreover when we are trying to create any endpoint on WITNESS SERVER with below code :

CREATE ENDPOINT Endpoint_Mirroring<o:p></o:p>
STATE = STARTED<o:p></o:p>
AS TCP (<o:p></o:p>
LISTENER_PORT=5022<o:p></o:p>
, LISTENER_IP = ALL<o:p></o:p>
)<o:p></o:p>
FOR DATABASE_MIRRORING (<o:p></o:p>
AUTHENTICATION = CERTIFICATE HOST_B_cert<o:p></o:p>
, ENCRYPTION = REQUIRED ALGORITHM AES<o:p></o:p>
, ROLE = ALL<o:p></o:p>
);<o:p></o:p>
GO<o:p></o:p>

it is throwing error as "

Msg 7878, Level 16, State 4, Line 11
This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this edition of SQL Server.

"

When i replace the above code with ENCRYPTION = disabled and ROLE= witness able to create endpoint and giving error as 1456.

Please some one help in this scenario.

Thanks in advance.


============ Regards Mani

Automate backup on shared hosting with limited privileges

$
0
0

Hello

I’m trying to establish automated restore to the mirror base every night, on remote shared hosting server, to be backup for my production database. On my server I have full privileges, allowing me to use backup and ftp access but on the other side I have shared hosting with no SSH or RDP?

How to solve this?

log shipping transaction log backup settings

$
0
0

why during the log shipping setup if the backup folder is present on the primary server (local path) it is not taking instead of it is asking for the network path to the backup folder?

vemurudivya

Unsent logs in Database Mirroring?

$
0
0
How to troubleshoot unsent logs in Database Mirroring?

Mirroring

$
0
0

Q:

15 days back Mirroring configured... after 5 days 50 users crated . when fail over done to Mirror server.. these 50 users are not connecting to the mirror server .

what is the reason ..

Thanks in Advance .

Vijay

Viewing all 1024 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>