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

MSDTC set up in SQL Server 2008 failover cluster

$
0
0

Hi Guys,

I am in the process of setting up failover cluster using SQL Server 2008  (64Bit) Enterprise on Windows Server 2008 R2 (64Bit) I have completed almost all the works but I got few questions regarding MSDTC configuration whether the MSDTC disk should be assigned from SAN or it should be local to the disk ,  Separate disk for each nodes in the cluter or 1 disk to be used across all the servers for MSDTC in windows fail over cluster.


With regards, Gopinath.


Issues with AlwaysOn High Availability

$
0
0

I am facing below issues while working with High Availability Group

* While executing PowerShell script as described in below link, getting error

    https://msdn.microsoft.com/en-us/library/hh213078.aspx

System.Data.SqlClient.SqlError: The log in this backup set begins at LSN Which is too recent to apply to the database.

* So i skipped log restoration on seondary server and only restored database, it worked but

          * Now database in Availability Group showing warning sign

           * In Primary server, database is showing Synchronized state and but in Secondary server it is not showing any state, Warning sign may be because of that, but i don't have any idea

It would be great if i can get some clue to get resolution for this issue.


Technical User

using an instance in a failover cluster as a witness server

$
0
0
Firstly I absolutely hate the idea of doing this with a passion . . . and then some, in my mind a witness server should have as few if not zero dependencies on any other SQL Server HA technology as possible, it should be a stand alone SQL Server instance. However, technically would you be able to use an instance which is already in a failover cluster as a witness for a mirrored pair of databases ?.

SQL Clustering

$
0
0

Hi,

Can anyone please tell me the steps for making an active node to a passive node in a Windows SQL cluster ?

I am trying to turn an active node to a passive node, but I could not find any options. Please advice.


Regards.


Regards, Kunjay Shah

ApexSQL Log

$
0
0

Dear Sir,

  I am going to implement ApexSQL Log in our environment so is it really helpful <g class="gr_ gr_55 gr-alert gr_gramm Grammar multiReplace" data-gr-id="55" id="55">for</g> us.

Can  you please advise on this tool.

Cheers,

Scheduled job routes to Primary in AG automatically?

$
0
0

Hello!

We have a new setup of SQL Server 2014 running 12.0.2430.  We have two servers that are set up in AlwaysOn High Availability, which are hosting a database in an AG with a valid listener. Everything seems fine and is working as expected in terms of HA, except for the following:

We have a scheduled job that was deployed to both servers in the HADRON cluster.  It runs a stored procedure in the db, which creates some temp tables and updates some records.  I was fully expecting that the job would fail on the server that is the secondary, however, we have observed that, when we set the secondary to be non-readable, the job will run on both the primary and the secondary, routing the traffic to the primary in both instances.  When we set the secondary to readable, this behavior goes away.

What gives?  Is this expected?

Thanks in advance for any info you can provide.

Thanks!

-Bill S.


SQL cluster logs

$
0
0

Hi,

1. Where to check and debug SQL server cluster error logs and windows cluster logs  in 2005/2008 R2/2012/2014?

2.What is the main difference between sql server 2012 and 2014 clustering?

question for the restoring backuped transaction logs

$
0
0

Suppose there is a a full database backup, and 10000 transaction log backup files.

Then I restore the  full database , restore the transaction logs backup,  when restore the X-th transaction log, the server power off suddenly.

As I didn't know the how many transaction logs have been restored, so My question is which transaction log files to which should I perform when server restarted ?

for example, the restored was interrupted at the 5000th transaction log file, so when the system restart, I need to restore again starting from 5000th transaction log file ,but  how do I know it interrupted at the 5000th transaction log file?



Please click the Mark as Answer button if a post solves your problem!






HADR_SYN_COMMIT wait types

$
0
0

We have a weekly purge job that runs on a table in SQL Server running SQL Server 2012 with AlwaysOn High Availability.  When the purge runs, we experience a situation where services connected to the database (using unrelated tables) experience wait times of 30+ seconds (causing the services to timeout and stop), all of HADR_SYN_COMMIT type.

Our purge process is a simple delete from table where date > certain time period, wrapped in a transaction with a commit.  While it runs, we see spikes in I/O wait time (read and write), as well as a spike in log flushes/sec on primary and secondary.  The read latency for the primary server peaks at 1 ms, and we see no blocking at this time.  Our hdds on the servers are Fusion I/O disks that are local to each machine and dedicated to the database files for the instance.

Looking at the primary, we see the HADR_SYNC_COMMIT waits, while on the secondary, we see almost 0 wait time across the server, maxing at 1 ms for writelog wait type during the event. 

I have asked my infrastructure team to review the network at this time.  What should I be looking at in addition to this?  I haven't found  much troubleshooting information other than this, so I figured I would check with the experts on where to look next!

Any help would be greatly appreciated.

Thanks!

the remote copy of database is not recovered far enough to enable database mirroring in SQL 2008

$
0
0

Hi,

I am having problems setting up database mirroring (SQL Server 2008).

i stooped Mirroring then I restored My Primary Data base first , and then Mirror data base with same backup file . and i start the mirror but i am getting below error 

the remote copy of database is not recovered far enough to enable database Mirroring 

Please can someone help!

Thanks,


Gajanan

Always On Availability Groups

$
0
0

Hello everyone!

I am currently planning to implement SQL Always On Availability Groups.

Mainly i have one sql server so apparently i need to setup a new sql server.

In the wizard there is a page where I need to select Initial data synchronization full or join.

What’s the difference?? Is choosing the full option requires me to provide a Third  server to temporarily store my database so my 2 main SQL server can sync for the first time? And if yes can I remove this shared location (Third server) after the database are synced??

Thank You.


Use xp_cmdshell to execute nqcmd through SSMS

$
0
0

Hi all,

I am trying to execute nqcmd utility through SSMS but it is not working. If I run it at command line, it is successful but unable to run it through SSMS.

 

The script that I am using is similar to the below code.

	SET @sCmd = 'nqcmd -d "Server_Name" -u UserName -p Password -s "Test.sql" -o "Test1.dat"'
	PRINT 'STEP: ' + @sCmd
	EXEC @nResult = master..xp_cmdshell @sCmd

 

AlwaysON DashBoard says the database is primary role, but dm_hadr_availability_replica_states

$
0
0

Hello,

I am confused now, DashBoard says the database on instance A is primary role, but the dm_hadr_availability_replica_states doesn't agree this.

Is it a bug or something else? I didn't find error in log.

SQL Server version is:

Microsoft SQL Server 2014 - 12.0.2456.0 (X64) 
Dec 11 2014 17:32:03 
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

Some Quick clarification about 2012 and always on Availability groups

$
0
0

Hi guys, just need some clarification about always on.

I've got plenty of experience with normal SQL Clusters, but just need some clarification around always on availability groups.

I presume with AG, you setup a listener and this becomes your point of connection, IE this is what you use in the you connection string for you applications, so can I use this when I am setting up a new application, and will this automatically make the Database that's created by the APP, Highly available. ? or do you still have to add it to the AG afterwards. ?

I have also read that you can still point to the installed SQL instance, and you don't need to use the AG group listener, but how does this make your DB HA ? how does the failover work.

I also presume you don't need to use any roles under the MSC anymore.

Kind regards

Mark.G


Bulk insert into sql tabe from .dat file using .fmt file

$
0
0

I have a .dat file with data. I would like to bulk insert the data into a sql table using a format file.

I am attaching the .dat file, .fmt fiel and the sql table definition samples.

It runs succesfully but inserts 0 records into the table

Sample code in .dat file is as below:

ccount_Num Account_Name                        Cd Start_Date Cd d Cd Cd d Cd Cd Addr_Street                                        Addr_City_Name                                     _Cd ode_Main Cd r_Num Cd
YT4114     DAWN VEENSTRA                       US 2010/12/20 D  0 13 00 0 04 99 1435 KYLE ST.                                      MOUNTAIN HOME                                      ID  83647    US 8360  US

format file that I am using is:

 11.0
18
1 SQLCHAR  0 10 "" 1 Account_Num   ""
2 SQLCHAR  0 35 "" 2 Account_Name   ""
3 SQLCHAR  0 2 "" 3 Account_Country_Cd  ""
4 SQLDATE 0 3 "" 4 Account_Start_Date  ""
5 SQLCHAR  0 2 "" 5 Account_Performance_Status_Cd ""
6 SQLBIT  0 1 "" 6 Source_System_Existence_Ind ""
7 SQLCHAR  0 2 "" 7 Account_Type_Cd   ""
8 SQLCHAR  0 2 "" 8 Retail_Location_Type_Cd  ""
9 SQLBIT  0 1 "" 9 Trade_Direct_Ind  ""
10 SQLCHAR  0 2 "" 10 Account_Rating_Class_Cd  ""
11 SQLCHAR  0 2 "" 11 Account_Rating_Type_Cd  ""
12 SQLCHAR  0 50 "" 12 Addr_Street   "" 
13 SQLCHAR  0 50 "" 13 Addr_City_Name   "" 
14 SQLCHAR  0 3 "" 14 Addr_State_Cd   ""
15 SQLCHAR  0 8 "" 15 Addr_Postal_Code_Main  ""
16 SQLCHAR  0 2 "" 16 Addr_Country_Cd   ""
17 SQLCHAR  0 5 "" 17 Center_Num   ""
18 SQLCHAR  0 2 "\n\r" 18 Country_Cd   ""

Table definition:

CREATE TABLE [dbo].[Account]( [Account_Num] [varchar](10) NULL, [Account_Name] [varchar](35) NULL, [Account_Country_Cd] [char](2) NULL, [Account_Start_Date] [smalldatetime] NULL, [Account_Performance_Status_Cd] [varchar](2) NULL, [Source_System_Existence_Ind] [bit] NULL, [Account_Type_Cd] [varchar](2) NULL, [Retail_Location_Type_Cd] [varchar](5) NULL, [Trade_Direct_Ind] [bit] NULL, [Account_Rating_Class_Cd] [varchar](5) NULL, [Account_Rating_Type_Cd] [varchar](5) NULL, [Addr_Street] [varchar](50) NULL, [Addr_City_Name] [varchar](50) NULL, [Addr_State_Cd] [varchar](5) NULL, [Addr_Postal_Code_Main] [varchar](8) NULL, [Addr_Country_Cd] [char](2) NULL, [Center_Num] [varchar](5) NULL, [Country_Cd] [char](2) NULL ) ON [PRIMARY]

 







Recover from consistency errors in table.

$
0
0

Hi all,

I'm having trouble correcting consistency error on a table. I've tried a complete rebuild of all the indexes on the table but the result stays the same and is as follows:

 
Msg 8951, Level 16, State 1, Line 1
Table error: table 'METINGEN_METINGEN' (ID 36299289). Data row does not have a matching index row in the index 'idx_METINGEN_METINGEN_METINGEN' (ID 7). Possible missing or invalid keys for the index row matching:
Msg 8955, Level 16, State 1, Line 1
Data row (1:109702270:2) identified by (AutoID = 2150390 and MSESSIEID = '0000021587' and SOURCETYPE = 'M' and MEET_DATUM = '2008-09-25 00:00:00.000' and MEET_TIJD = '08:43:41') with index values 'METING_ID = '' and AutoID = 2150390 and MSESSIEID = '0000021587' and SOURCETYPE = 'M' and MEET_DATUM = '2008-09-25 00:00:00.000' and MEET_TIJD = '08:43:41''.
Msg 8952, Level 16, State 1, Line 1
Table error: table 'METINGEN_METINGEN' (ID 36299289). Index row in index 'idx_METINGEN_METINGEN_METINGEN' (ID 7) does not match any data row. Possible extra or invalid keys for:
Msg 8956, Level 16, State 1, Line 1
Index row (1:103520455:62) with values (METING_ID = '' and AutoID = 2150390 and MSESSIEID = '퍠෶ and SOURCETYPE = '퓠' and MEET_DATUM = '2008-09-25 00:00:00.000' and MEET_TIJD = '푐෶) pointing to the data row identified by (AutoID = 2150390 and MSESSIEID = '퍠෶ and SOURCETYPE = '퓠' and MEET_DATUM = '2008-09-25 00:00:00.000' and MEET_TIJD = '푐෶).
DBCC results for 'METINGEN_METINGEN'.
There are 48684994 rows in 4416906 pages for object "METINGEN_METINGEN".
CHECKTABLE found 0 allocation errors and 2 consistency errors in table 'METINGEN_METINGEN' (object ID 36299289).
repair_rebuild is the minimum repair level for the errors found by DBCC CHECKTABLE (EVD_Ont.dbo.METINGEN_METINGEN).
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
and also i can't find what (ID 7) means..

Disks are not shown in Failover Cluster Manager

$
0
0

Hi All,

As per the validation report we have successfully configured cluster between two nodes. Active Nodemy computer and failover cluster manager:storage shows all the available clustered disks but not shown when clicked on active node in failover cluster manager. 

Had a glimpse on few earlier posts and all I understood is that Windows Server 2008R2 has a bug and MS is working on it.

Do we have any fix for this issue? Please suggest. 

Grateful to your time and support.

Regards,

Kalyan



Grateful to your time and support. Regards, Shiva

How to Apply Windows (OS) Updates to Failover Clusters Hosting SQL Server AlwaysOn Availability Groups

$
0
0


If I am running a Windows Server 2012 Failover Cluster with SQL Server Always on Availability groups how am I supposed to apply Windows Updates to the cluster nodes?

CAU is explicity not supported and the only guidance that I can find from MS which comes close is to do a cross-cluster failover which is pretty complicated and involves 2x the hardware:

https://msdn.microsoft.com/en-us/library/jj873730.aspx



SQL 2012 AlwaysOn High Availability, how to collect Backup history across replicas from MSDB

$
0
0

SQL 2012 AlwaysOn High Availability, how to collect Backup history across replicas from MSDB

During our implementation of a synchronised SQL Server AlwaysOn solution, with one primary and two replica,
we ran into a challenge on how to merge backup history from the involved MSDB databases.
We take full and diff backup on primary and log backup on preferred replica.

To get the full chain of backup history, we need to merge backup history from all servers running the backups at any given time.

How do we solve this?

We consider to create a procedure to move backup history from all involved MSDB databases to a common central database.

Backup tools like Quest LiteSpeed offer a solution, with a local and central repository.

Also Oracle has a solution for saving backup history local and centralised.

I Except, like sql2012 truncating a logbackup across replicas, I really expect from Microsoft at simple
solution viewing the Last backup history would be out of the box.

Other Info:
Data Info for my "high availability system"
OS: OS2008R2
SQL: SQL2012, with AlwaysON enabled
Number of replicas: 3

Regards
Michael Hesselberg
SQL Team Capital Market IT Infrastructure & Operation
DBA SQL,Microsoft Cluster



Always on

$
0
0
how to apply the patches (windows or sql )on always on environment?   please help me on this?
Viewing all 4532 articles
Browse latest View live


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