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

how to Shrink LDF On the Always-On environment

$
0
0
Please help I have problems with large ldf size, condition database connected to AG / AlwaysOn. Connected database there are 4 including secondary and primary replica. The problems found in production machines are in use 24 hours to process the transaction and in priority no downtime. How to solve the problem, in order to shrink the LDF? how to avoid recurrence? And what his cause LDF can be enlarged?

SQL Server and Ransomware?

$
0
0

Hi,

This may not be the correct forum for this question but I figured it is related to disaster recovery so why not start here.

With all the hubbub about ransomware in the news lately it made me wonder, are SQL Server database files susceptible to ransomware?  I mean I suspect it is possible but has anyone heard of them being targeted or compromised?  Or are they safe because they are always held open by the server and can't be written to by an outside app?

We are stuck on SQL Server 2005, BTW.

Thanks in advance,

Linn

SQL Alwayson Availability group

$
0
0
We already have SQL 2012 alwayson availability databases with 2 servers in one location. Now I added another server which is in a different location to the availability group, this server will be our DR server. In the connection string information while connecting to the listener do we also have to specify ;multisubnetfailover=true; as we have a DR site in another location. Thanks.

sqldev

AlwyasOn

$
0
0
Hi All,

I have some question about Always on availability group

1) Is AG is instance level or database level?
2) What will happen when only 1 Db went suspect mode which participating alwyasON (automtic failover)
     Automatic failover will happen or not?

3) Can we make availability database in simple or bulk recovery mode which already participating alwyasON ?

4) If single database is not accessible due to any reason does it automatically get failover?

Database Snapshot for Reporting

$
0
0

Hello,

I read somewhere that we can access a database snapshot through the passive node in a cluster. How do we go about it? We are trying to use the database snapshot, as a snapshot in time of the operational database and then copy the needed data from the snapshot off to a reporting database. We did not want the queries for the ETL to be performed on the active node as it will affect the performance of the production database. We are not doing any write operations to extract the data and the reporting database is on another server.

Any help will be appreciated.

Thank you,

Ephraim Shurpin

Always on Configuration setup

$
0
0

hi, I need to setup Always on with 3 nodes locally and  one node remotely .

1. what type of storage requirement  and do we need (shared or individual mounted storage )

2. assume my DB size is 600GB. how much space I need to setup this alwayson.

3. what is best to configured DB whether database is on shared storage or AGs 

regards

Replication for AlwaysOn

$
0
0

Here is the setup that we used for the Replication of the AlwaysOn:

Servers for AlwaysOn:

server1AlwaysOn – Original Publisher<u5:p></u5:p>

server2AlwaysOn– Publisher Replica<u5:p></u5:p>

server3AlwaysOn– Publisher Replica


StandAlone Servers that will act as:

server1StandAlone– Subscriber<u5:p></u5:p>

server2StandAlone– Distributor

Another AlwaysOn that will act as a:

serverAlwaysOn1 – Subscriber

serverAlwaysOn2 


With this setup, Is it possible to have a subscriber that is in AlwaysOn? Can the AG Listener be used to act as a subscriber fromserverAlwaysOn1 and  serverAlwaysOn2?

<u5:p></u5:p>

<u5:p></u5:p>

AlwaysOn - ReadOnly Routing list issue

$
0
0

Hi,

I wanna configure a ReadOnly Routing list into my AlwaysOn Lab (I have 2 nodes), All readonly connection will going to SQLNODE2.

My T-SQL:

ALTER AVAILABILITY GROUP AG
MODIFY REPLICA ON ’SQLNODE1\INSTANCE′ WITH (SECONDARY_ROLE(ALLOW_CONNECTIONS = READ_ONLY))
GO

ALTER AVAILABILITY GROUP AG
MODIFY REPLICA ON 'SQLNODE2\INSTANCE' WITH (SECONDARY_ROLE(ALLOW_CONNECTIONS = READ_ONLY))
GO

ALTER AVAILABILITY GROUP AG MODIFY REPLICA ON 'SQLNODE1\INSTANCE' WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = 'TCP://SQLNODE1:1433'));
GO 

ALTER AVAILABILITY GROUP AG MODIFY REPLICA ON 'SQLNODE2\INSTANCE' WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = 'TCP://SQLNODE2:1433'));
GO

ALTER AVAILABILITY GROUP ag MODIFY REPLICA ON 'SQLNODE1\INSTANCE' WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('SQLNODE2\INSTANCE')));
GO

ALTER AVAILABILITY GROUP ag MODIFY REPLICA ON 'SQLNODE2\INSTANCE' WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(''SQLNODE1\INSTANCE')));
GO

But, when i do a "Select" the request is issued by SQLNODE1, not by SQLNODE2.

If the T-SQL is wrong please tell me.

Thanks for all.



Remove an instance from SQL 2008 R2 cluster

$
0
0

I need to uninstall DB1 from a 2 nodes, active-active SQL 2018 R2 cluster. Instance1 on DB1. Instance2 on DB2

From what I have gathered, I need to move Instance2 to DB1, then run the SQL setup.exe to remove the passive node, DB2. The uninstall process does not interrupt the Instance1 and Instance2 on DB1, is that correct?

 If the uninstall failed, will Instance1 and Instance2 on DB2 still be able to serve the data?

Thank you very much.

Setting up availability groups for Always on

$
0
0

Hi!

I'm trying to create an availability group (with 1 test database) on SQL 2012 SP2.

I get the following error:


Creating availability group listener resulted in an error. (Microsoft.SqlServer.Management.HadrTasks)

Create failed for Availability Group Listener 'GL-LI-TEST'.  (Microsoft.SqlServer.Smo)

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

The WSFC cluster could not bring the Network Name resource with DNS name GL-LI-TEST online. The DNS name may have been taken or have a conflict with existing name services, or the WSFC cluster service may not be running or may be inaccessible. Use a different DNS name to resolve name conflicts, or check the WSFC cluster log for more information.
The attempt to create the network name and IP address for the listener failed. The WSFC service may not be running or may be inaccessible in its current state, or the values provided for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate the network name and IP address with the network administrator. (Microsoft SQL Server, Error: 19471)

I have verified with the AD team that GL-LI-TEST does not already exist as a DNS name

Any ideas what this means?

Thanks,

Zoe

Error 13 from ResourceControl for resource Disk Drive while adding cluster disk

$
0
0

Hi,

I have a drive mounted at C:\mountpoint\Kdrive. C:\ is not a cluster disk. I am trying to use Cluster API to add this disk to the cluster but it fails with the following errors:-

00000928.00000ce8::2016/03/10-04:59:51.637 INFO  [RCM] rcm::RcmApi::CreateResource: (SQL Server (MSSQLSERVER), Disk Drive C:\mountpoint\KDrive\, 8836dfef-fa51-419d-960f-75965fed6cfd, Physical Disk)
00000928.00000ce8::2016/03/10-04:59:51.637 INFO  [RCM] rcm::RcmGum::CreateResource(Disk Drive C:\mountpoint\KDrive\,8836dfef-fa51-419d-960f-75965fed6cfd,SQL Server (MSSQLSERVER))
00000304.00000554::2016/03/10-04:59:51.678 ERR   [RES] Physical Disk <Disk Drive C:\mountpoint\KDrive\>: Open: Unable to get disk identifier. Error: 5023.
00000928.00000dc8::2016/03/10-04:59:51.678 INFO  [RCM] HandleMonitorReply: OPENRESOURCE for 'Disk Drive C:\mountpoint\KDrive\', gen(0) result 0.
00000304.00000554::2016/03/10-05:00:12.208 ERR   [RHS] Error 13 from ResourceControl for resource Disk Drive C:\mountpoint\KDrive\.
00000928.00000ce8::2016/03/10-05:00:12.208 WARN  [RCM] ResourceControl(SET_PRIVATE_PROPERTIES) to Disk Drive C:\mountpoint\KDrive\ returned 13

I tried with various syntax for the Disk Drive path (with single \ and double \\) but nothing works. If I execute the same code with path like K:\ it works fine.

Code snippet:

try
 {
  // Create the resource.  The resource name is "Disk Drive @:"
  // where @ is the drive letter of a disk partition.
  bstr_t bstr;
  UTIL_Utf8ToWideChar (szDiskPath.data(), bstr);
  int length = bstr.length ();
  lpstrDiskPathW = new WCHAR[length + 1];
  wcsncpy (lpstrDiskPathW, (const wchar_t*)bstr, length);
  lpstrDiskPathW[length] = L'\0';

  String strResName = "Disk Drive " + szDiskPath;
  UTIL_Utf8ToWideChar(strResName.data(), bstr);
  length = bstr.length ();
  lpstrResourceNameW = new WCHAR[length + 1];
  wcsncpy (lpstrResourceNameW, (const wchar_t*)bstr, length);
  lpstrResourceNameW[length] = L'\0';

  hResource = m_funcCreateClusterResource(hClusterGroup,
   (LPCWSTR)lpstrResourceNameW,
   L"Physical Disk",
   0);

  if( hResource == NULL )
  {
   m_log.error("CreateDiskResource: failed to create disk resource %s", strResName);
   throw -1;
  }
  else
  {
   m_log.info("CreateDiskResource: created disk resource %s", strResName);
  }

  // Set the diskpath private property
  // Begin property list used to set the DiskPath private property.
  WCHAR szPropName[] = CLUSREG_NAME_PHYSDISK_DISKPATH;

  typedef struct _DiskPathControl
  {
   DWORD dwPropCount;
   CLUSPROP_PROPERTY_NAME_DECLARE(PropName,sizeof(szPropName)/sizeof(WCHAR));
   CLUSPROP_SZ_DECLARE(DiskPathValue, sizeof(lpstrDiskPathW)/sizeof(WCHAR));
   CLUSPROP_SYNTAX Endmark;
  } DiskPathControl;

  DiskPathControl DPC;

  //  Property Count
  DPC.dwPropCount = 1;

  //  Property Name
  DPC.PropName.Syntax.dw  = CLUSPROP_SYNTAX_NAME;
  DPC.PropName.cbLength   = sizeof( szPropName );
  wcsncpy (DPC.PropName.sz, (const wchar_t*)szPropName, DPC.PropName.cbLength);

  //  Property Value
  DPC.DiskPathValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
  DPC.DiskPathValue.cbLength  = sizeof( lpstrDiskPathW );
  wcsncpy (DPC.DiskPathValue.sz, (const wchar_t*)lpstrDiskPathW, DPC.DiskPathValue.cbLength);

  //  Endmark
  DPC.Endmark.dw = CLUSPROP_SYNTAX_ENDMARK;

  DWORD cbSize = sizeof( DiskPathControl );

  //  End property list creation

  // Set the diskpath private property
  dwRC = m_funcClusterResourceControl( hResource,
   NULL,
   CLUSCTL_RESOURCE_SET_PRIVATE_PROPERTIES,
   ( void* ) &DPC,
   cbSize,
   NULL,
   0,
   NULL );

  if( dwRC != ERROR_SUCCESS )
  {
   String err(dwRC);
   m_log.error("AA_ClusterBase:: CreateDiskResource: failed to set the DiskPath property, error %s", err);
   m_funcDeleteClusterResource( hResource );
   m_funcCloseClusterResource( hResource );
   hResource = NULL;
   throw -1;
  }
 }
 catch (...)
 {
 }

Is there a know limitation with the Cluster API for not supporting disks mounted on mountpoints?

Thanks,

Aditya

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_slotidfrom[<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 :)

Database Mirroring Question

$
0
0

Hi!,

I have a Production instance which contains a database which is mirrored to a DR instance (no witness).

If I shut down the secondary instance  for a couple of hours what happens when I bring it up again?

Will it automatically reconnect?   Will the data that was missed during that time be lost or will it be applied to the Mirror once its reconnected

Thanks,

Zoe

how to configure static TCP port for named instance of SQL server 2012 which is in two node active-passive cluster.

$
0
0

Hi all,

we got 2 node active-passive cluster for our prod boxes(SQL 2012), as we got multiple instances they are running on TCP dynamic ports(named instance) now we need to change it to static TCP port. so could some one help me on the below concerns

->is this process same like in stand alone setup(configuration manager->sql server ntw config-->IP all and set static port in     TCP-->restart services)

-> Does this changes have any dependencies in cluster set up.

->Do we need to do in passive node as well.

->If the port configuration process is different in cluster set up, kindly some one help me in this.

With Regards,

Ram.

How to restore/recover MSSQL logs after restore of an MSSQL VSS-HW Snapshot?

$
0
0

Hi.

I am scheduling VSS HW based snapshots of my MSSQL database and log files. 

This makes it possible to restore a previous version of my MSSQL database very quickly.

However I am also running transaction log backups of the databases, and I have not found a way to restore the transaction logs after I revert to a snapshot.

Is there a way to set the databases into NORECOVERY mode after I have reverted to a snapshot, but before I start the databases? Or is there any other way I can restore the logs backed up after I took the snapshot before I start up the databases?

I see the documentation says that I can restore transaction logs if I am in READONLY mode, but I have not found any description how I can do this if I am sitting with a HW snapshot of the Database and logfiles and a backup of transaction logs taken after the snapshot.

Geir


SQL Server 2012 Clustering - Prerequisite and Checklist

$
0
0

Hi,

I want install and setup SQL Server 2012 Active/Passive clustering (Database Engine, SQL Agent, Reporting Service, Integration Service, Full Text Service, Analysis Service).

I am aware about some of parameter for SQL Clustering checklist (like 2 Public IP, 2 Private IP, 1 SQL Virtual IP, 1 Windows Cluster IP, SQL Cluster Name, MSDTC IP , MSDTC Network name, Quorum etc)

But I need some more information regarding the account through which SQL Clustering will be configured (domain account / Windows Local ??). Also which account should (Database Engine, SQL Agent, Reporting Service, Integration Service, Full Text Service, Analysis Service) use ??.

if anybody has complete checklist for above setup then requesting to please share the same

Regards,

Nikhil  Desai

 

Restoring a database with replace which is configured with transaction replication

$
0
0

Hi All,

Can we do restore with replace on a database which is already configured with replication. If it is possible, will there be any effect on existing replication set up.

With Regards,

Ram

How to differentiate SQL VSS (volume shadow copy) backups ?

$
0
0

Hello,

on our server on which SQL Server works, we have two database backups performed every day - both are VSS backups.
One comes from CPM tool that is used to make volumes backup (volumes which contain db files) and second DPM tool that is used to make SQL server databases backup only.
In msdb system database both backups create entries that seems to be not possible to differentiate. We want to monitor DPM backups by checking how old is last backup using query to msdb db. In that situation if DPM tool stops work there will be still entries from CPM backup.
Do someone know if it is possible to differentiate those backups and how to do it? 

Best Regards,

Kamil

Problem in recognizing the newly plugged in Drive to the server ( SQL Instance couldnot recognize )

$
0
0

Hi ,

The SQL Server instance cannot recognize the newly plugged in drive in the physical server. That is an active active cluster server, where in the sql instance cannot recognize , inspite of providing all sort of permissions. 

Can you please help me with a solution . 

Thank you 


hemadri

How to configue DR setup for Analysis Service DB

$
0
0

Hi,

I have setup SQL Server 2012 Active/Passive clustering at DC and Log shipping between DC and DR (Standalone). 

Please let me know whether there any technique like log shipping to configure DR for Analysis Services database , Reporting Services db for the above setup.

Regards,

Nikhil Desai

Viewing all 4532 articles
Browse latest View live


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