Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all 4532 articles
Browse latest View live

MSGS 823: The operating system returned error 1(Incorrect function.)

$
0
0

Hello folks,

We started having issues with our main application last week. Some users started getting error message 823 and a connection failure. I checked Event Viewer and found event 823. I ran DBCC CHECKDB(dbname) WITH NO_INFOMSGS and got the following output:

Msg 8921, Level 16, State 1, Line 1
Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.

Msg 823, Level 24, State 2, Line 1
The operating system returned error 1(Incorrect function.) to SQL Server during a read at offset 0x000005a4412000 in file 'E:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\dbname_data.mdf:MSSQL_DBCC15'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

TempDB.mdf and TempLog.ldf are located in a HDD with 244GB of free space.

dbname_data.mdf is stored on a RAID 5 Array with 4 hard drives of which one was in a failure state for some time (don't know for how long because I just stated working here). I replaced the hard drive with a new one and successfully rebuilt the array.

The last successful backup we have is from 9/1/14 and if I restore it we will lose the data we entered since that day. I've tried performing another backup but I get the same error 823.

I checked the status of the database and it is ONLINE.

PLEASE HELP! I don't know what else to do.

Thanks a lot! I will really appreciate any help.


Replicated transactions are waiting for next Log backup or for mirroring partner to catch up.

$
0
0

This commonly seen message on forum has been coming in my env too. 

When the networks guy fixes the issues with the networks, the issue resolves. However, I want to configure replication to not to be impacted by mirroring. 
Have already tried the following but still no go:

trace flag -T1488
sp_replicationdboption 'ProblemDatabaseName','sync with backup',false

Is there anything else that can be done to break the association between the mirroring and replication to ensure that evenif mirroring isbehind, it doesnot break replication. 

SQL Server 2005 High Availability and Disaster Recovery options

$
0
0

Hi, We are are working on a High Availability & Disaster Recovery Planning solution for an application database which is on SQL Server 2005. What different options have we got to implement this for SQL Server 2005 and after we have everything setup how do we test the failover is working?

Thanks in advance.........


Ione

transaction log shipping restore with standby failed: log file corrupted

$
0
0

Restore transaction log failed and I get this error: for only 04 no of database in same SQL server, renaming are working fine.

******************************************************************************

Date                     9/10/2014 6:09:27 AM

Log                        Job History (LSRestore_DATA_TPSSYS)

 

Step ID                1

Server                  DATADR

Job Name                           LSRestore_DATA_TPSSYS

Step Name                        Log shipping restore log job step.

Duration                             00:00:03

Sql Severity        0

Sql Message ID0

Operator Emailed           

Operator Net sent          

Operator Paged               

Retries Attempted          0

 

Message

2014-09-10 06:09:30.37  *** Error: Could not apply log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' to secondary database 'TPSSYS'.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: An error occurred while processing the log for database 'TPSSYS'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

An error occurred during recovery, preventing the database 'TPSSYS' (13:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

RESTORE LOG is terminating abnormally.

Processed 0 pages for database 'TPSSYS', file 'TPSSYS' on file 1.

Processed 1 pages for database 'TPSSYS', file 'TPSSYS_log' on file 1.(.Net SqlClient Data Provider) ***

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  Skipping log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' for secondary database 'TPSSYS' because the file could not be verified.

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  Deleting old log backup files. Primary Database: 'TPSSYS'

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  The restore operation completed with errors. Secondary ID: 'dd25135a-24dd-4642-83d2-424f29e9e04c'

2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.37  *** Error: Could not cleanup history.(Microsoft.SqlServer.Management.LogShipping) ***

2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

2014-09-10 06:09:30.38  ----- END OF TRANSACTION LOG RESTORE    -----

 

Exit Status: 1 (Error)

**********************************************************





AlwayOn Failover Cluster Instance and client connection issue

$
0
0

I've successfully set up a failover cluster SQL Server with 2 nodes (sqlserver1 and sqlserver2. However I can only connect from the node where SQL Server is running. I cannot even connect from the second node, except when I move the role to it. I cannot connect from any client machine.

Searching for solution on the web, I learnt that is a known issue with Microsoft SQL SERVER 2012 R2

The SQL cluster does not resolve to the virtual network  IP.  Instead it resolves to the IP address of the node where SQL Server is running IP

I have installed SQL Server Service pack 2 on both nodes hoping this will solve the problem but still nothing change.I opened all related ports 1433 and 1434 enabled remote connections, tried all possible solution in vain.

Is there any one who found solution for this issue and can share it with me?

Readonly routing not working in azure alwayson availability

$
0
0

Hi,

We have configured Always on availability in Azure environment within same data center along with listener configuration.

Have done below changes to direct readonly queries to secondary DB which is set to read-intent true

--SQL1 is primary and SQL2 is secondary
--Setting for SQL1
ALTER AVAILABILITY GROUP [AGName]
 MODIFY REPLICA ON
N'SQL2' WITH
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));

ALTER AVAILABILITY GROUP [AGName]
 MODIFY REPLICA ON
N'SQL2' WITH
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://SQL2.corp.contoso.com:1433'));

--Setting for SQL2
ALTER AVAILABILITY GROUP [AGName]
 MODIFY REPLICA ON
N'SQL1' WITH
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));

ALTER AVAILABILITY GROUP [AGName]
 MODIFY REPLICA ON
N'SQL1' WITH
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://SQL1.corp.contoso.com:1433'));

--Setting read only routing list for SQL1 for read only connection
ALTER AVAILABILITY GROUP [AGName]
MODIFY REPLICA ON
N'SQL1' WITH
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST = ('SQL2','SQL1')));

Connection string was appended with Read intent true:
Server=tcp:<listenername,port>;Database=<DB>;user id=<User>;password=<password>;ApplicationIntent=ReadOnly;MultiSubnetFailover=True

Able to see that priority list being reflected in sys.availability_read_only_routing_lists

But getting network instance not found error on trying to connect with above connection string.

Connection is working fine by removing "ApplicationIntent=ReadOnly"

Also, connection is working fine if i remove SQL2 from Routinglist as below,

ALTER AVAILABILITY GROUP [AGName]
MODIFY REPLICA ON
N'SQL1' WITH
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST = ('SQL1')));

We verified that SQL2 is up and running

Also, we will requiring a similar set up for multi sub net or across Datacenter setup is that possible?

Configuring AlwaysOn Availability across DataCenters (multi subnet)

$
0
0

Hi,

We are working on configuring AlwaysOn SQL availability in azure across multi subnets. Following are list of steps which we are comepleted,

Creating primary domain controller in VNet1
Established VNet to Vnet connectivity across virtual networks (http://msdn.microsoft.com/en-us/library/azure/dn690122.aspx)
Created Replica DC in other Data center
Created a VM in each Data Center and connected it to domain. Verified that these VMs are reachable via ping
Completed with required configuration relating to Failover cluster installation, DNS update as given in tutorial (http://msdn.microsoft.com/en-us/library/dn249504.aspx)

After this we are currently struck in a stage how to proceed with cluster configuration when its across Datacenters (or multi subnets). Documentation relates to creating cluster for single Data center and we would like to know what changes we need to do for multi subnet.

Refered below links relating to configuring it across data centers using powershell but couldn't get exactly sequence of steps to be followed for section, "Create the WSFC Cluster"

http://blogs.msdn.com/b/igorpag/archive/2014/07/03/deep-dive-sql-server-alwayson-availability-groups-and-cross-region-virtual-networks-in-azure.aspx
http://blogs.msdn.com/b/clustering/archive/2011/08/31/10204142.aspx

We proceed with steps creating cluster and added both VMs as nodes and got stuck.

Can someone provide with some documentation on how we can proceed for further from here.

Sorry for big post just wanted to be elaborate. Let us know if any more information is required from us.

log file space is not getting freed up even after log backup happened in log shipping

$
0
0

Log shipping is configured in my environment & sec. db is in restoring mode.

There is one db issue whose log space is not free even after log backup. everything is OK. log backup is also happend at   regular interval & log is also applied on sec databases. then why log size of database on PROD is remain same as it cause a issue, when i checked in sys.databases then log_reuse_wait _desc column shows "replication" but replication is not configured.

I fired checkpoint also but no luck.

what is the reason why log is not getting freed.


Database in Suspect Mode in SQL Server 2000 Log Shipping Environment

$
0
0

Hi All

We have movement of SQL Server 2000 at physical level. We have disable jobs and stop Agent and SQL Server services.

After moved the server we have started the server and then start SQL Server 2000 services.

All of databases in SUSPECT mode. Files are in correct folders as were before shutdown the server

What shall I do e.g. why databases come up in SUSPECT mode? what to check and how to get database live?

Pls help it is critical...

Thanks in Advance

ODBC CONNECTIVITY ON SQL 2012 FAILOVER CLUSTER

$
0
0
I have installed 2 nodes SQL 2012 FAILOVER CLUSTERS that is up and running. All nodes are up, network is up but when I try to configure dsn (odbc) from a client machine, it fails. Using Microsoft Dynamics GP 10, I must connect to the cluster through ODBC. Can any one help?

AlwaysOn & Contained Databases Collation Conflict

$
0
0

Here is my situation.

I have setup an alwaysOn availability group which is working fine.

In this AlwaysOn availability group I have converted the Adventureworks database to a contained database. I also added a Contained User.

Connecting to the secondary "Contained" database was no problem.
But here is my problem, when expanding the tables I received the following errormessage:"Cannot resolve collation conflict between "Latin1_General_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC" in add operator occurring in SELECT statement column 3."

Doing this action on the primary is no problem. Executing a select statement against the secondary is also no problem and returns a result.

After some trial and error, I’ve seem to fixed the issue by doing a failover to all my secondary databases.
After, expanding the tables to the primary & secondary worked.

Does anybody have an idea why this happened, and am I the only one experiencing this issue?

Thanks, Bram

Availability Group Transaction log issue

$
0
0

We're having an issue with an AG where the the log backup does not appear to truncate the log. symptoms

  • Run full backup
  • Run transaction log backup
  • DBCC Loginfo shows all VLFs with a status of 2
  • sys.databases.log_reuse_wait_desc says LOG_BACKUP
  • OPENTRANS indicates no open trans

All backups are being run on the primary.  Any ideas?

thanks

Log Shipping

$
0
0
How many databases can involve in Log Shipping High availability in SQL 2008R2? My Setup has one primary server & one Secondary server in same location. Is there any limitations to the no of databases that i can configure log shipping in SQL 2008R2?

Log Shipping - two secondary databases for the same primary on same instance?

$
0
0

Hi

I know it might not make too much sense, and isnt really the intended use (considering the wording on books online) - but does anyone know of a way to be able to have two logshipping secondary databases configured on the same instance of sql server (for the same primary database, that is)?

I have tried it, but when i run sp_add_log_shipping_secondary_primary, i get an error saying that i already have an entry for the primary server/database.

Msg 32024, Level 16, State 1, Procedure sp_add_log_shipping_secondary_primary, Line 95
An entry for primary server [servername], primary database [primary database name] already exists.

Alwayson Backup question

$
0
0

Hello!

I am using SQL 2014 and tying to take Copy-Only full backup every day night and transaction log backup few times during the day time. I could  not take the transaction log backup without first taking the full database backup (Non Copy-Only). When I try to take the transaction log backup after taking a Copy-Only full backup, got an error as I need to have the full Backup taken before taking a transaction log backup.

Planning to do the following. Please let me know if this is best approach or any other best way to do this.

1. Take a regular Full backup of the database (Non Copy-Only), first time only.

2. Take Copy-Only backup every day night (keep doing this every day night).

3. Take Transaction log backups (during the day) in between Copy-Only backups.

Repeat Step 2 and 3 for ever. When we need to restore, restore the latest copy-only full backup and restore the transcation logs taken after the copy-only full backup.

Please let me know if this is the right way to do this. I need the copy-only option as I am planning to do this in AlwaysOn AG Secondary Replica.

Thank you,

Louis


Is it possible to move to Alwayson Availability groups from existing sql server FCI ?

$
0
0

Is it possible to move to Alwayson Availability groups from? existing sql server FCI ?

If yes, how to move and what are the pre-requisites?

Master DB restoration details

$
0
0

Hi,

We have configured new SQL Server 2008. Which contains multiple instances.

As part of disaster recovery test my colleague restored master databases on all the instances (about 15 instances).

I am suspecting that he missed restoration of mastes db's on some instances.

Now how can i validate that whether he restored master db's on all the servers are not?

As per test document the procedure is 

First restore all userdatabases then restore master databases.

This is only DR testing environment.




In azure, do databases go offline when a server gets a patch that requires a reboot?

$
0
0

In AWS I am told that sql server will go offline during maintenance windows.

Will Azure db's go offline for maintenance windows?


Removed SQL 2012 AV group leaves phantom processes consuming large amounts of resource

$
0
0

Hi,

I have been experiencing performance degradation on some production servers that previously were part of a SQL 2012 High availability Group.

I recently used a small window of opportunity to test the HADRON groups on some of my SQL Servers. Unusually because of the licencing and hardware high spec, identically setup servers required I had to take some of our servers out of the web production pool during a quiet period and use these for testing.

When the testing concluded, I removed all the HA SQL groups disabled, then removed the windows cluster and removed the cluster Feature from both of the servers and rebooted, but I see the following phantom queries.

()select table_id, item_guid, oplsn_fseqno, oplsn_bOffset, oplsn_slotid from[<dbname>].[sys].[filetable_updates_2105058535]with(readpast)orderby table_id

A reboot resolved the issue initially and although unhappy without knowing the root cause I decided not to spend any further time investigating as believed it was resolved. But I noticed a major hit on performance on those specific server again after 2-3 weeks and the queries have returned, if this happens during peak period I will be short of capacity and unable to reboot.

How can I completely remove trace of this as these are obviously protected system tables?.... there are still the odd days when I wished I was still allowed to meddle in those system tables :)

SQL 2012 Log shipping standard edition

$
0
0

Dear all,

I am having 3 server with same configuration one is production and other two is DR and Near DR

Suddenly something happens and DR and Near DR databases goes to restoring mode from standby/readonlymode.

Even I verified the .trn files it show's valid, even I checked the Disk there is no issues in the disk and I too checked the file share properties it is also fine.

Please find the below error log and below link it is similar SCENARIO

Processed 0 pages for database 'Logship_xxxxx', file 'xxxxx' on file 1. Processed 1 pages for database 'Logship_xxxxx', file 'xxxxx_log' on file 1. Msg 9004, Level 16, State 6, Line 1 An error occurred while processing the log for database 'Logship_xxxxx'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log. Msg 3013, Level 16, State 1, Line 1 RESTORE LOG is terminating abnormally. Msg 3414, Level 21, State 1, Line 1 An error occurred during recovery, preventing the database 'Logship_xxxxx' (27:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

http://social.technet.microsoft.com/Forums/en-US/9c39fc61-0a59-402b-91fb-17ac1f03da7b/sql-2012-log-shipping-to-report-server?forum=sqldisasterrecovery

Thank you..

Viewing all 4532 articles
Browse latest View live


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