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

sql server agent cant start

$
0
0
in my  system two database  sql 2008 r2 and sql 2014
 i want start sql server agent in sql 2014, but error occurs in there ,
 in sql 2008 r2 sql agent start fine ,
  i have   disable  VIA in  sql server configuration  manger  still error

Renaming a Database that is under Availability Group

$
0
0

Friends,

We have a few databases that have been added as Available Databases under Availability Groups. We are planning to rename some of these databases now.

Would the names of these DBs change automatically in Availability Groups after renaming the Database or should we do it manaully?


Murali Krishnan

Cannot write to database after failover

$
0
0

Hi Guys,

I have alwaysOn on SQL server 2012. 1 primary and 2 secondary replicas. I have also setup the config below 

My problem now is ..when I failover from the primary server (EMR-SVR) to the secondary server in the same subnet (EMR-SVRII), the application is able to connect and to the database and view data. However, the application is not able to write to the database. I get an error that says the database is readOnly.

In the "Connections in Primary Role" tab, I have selected "allow all connections" Should I change this to "allow Read/write"? or is there something else I am missing. The database fails over but I am not able to write to it.

Thanks for all the help 

Richard


..forever is just a minute away*


SQL Server 2016 Enterprise -Always On HA-AvailabilityGroup- Dashboard -Not showing "log_send_rate"

$
0
0

Hello,

The Always On AG Dashboard does not show a value for the (Log Send Rate) for some of the databases in the Availability Group.

The DMV...sys.dm_hadr_database_replica_states, also shows a zero for the column log_send_rate for some of the databases in the Availability Group. 

I have another Always ON AG in a SQL Server 2014 environment and log_send_rate shows up correctly via the dashboard and the DMV returns the same value. 

Is there an extra configuration setting for 2016 AG's to show this column correctly for all database in the AG? 

Thanks! 

Ghost records and shrink file

$
0
0

Hi Team,

Please MS documentation states (https://msdn.microsoft.com/en-us/library/ff878253.aspx)

The DBCC SHRINKFILE operation on files containing disk-based tables might fail on the primary replica if the file contains ghost records that are still needed on a secondary replica.

It means by default shrinkfile is reliant on Ghost cleanup task and forces it to run when we shrink file/database.

Thank you very much team.

how to fix error

$
0
0
Could not generate mail.an exception occurred while executing a transact sql statement or batch.no global profile is configured specify a profile name in the @profile_name parameter

How to fix error getting error in maintenance plan while reorganizing index in sql server 2008r2 64bit

$
0
0

Executing the query "alter index [pk_acctid] on [dbo].[acct_manager_det….

"failed with the following error:"insert failed because the following set options have incorrect settings:

'arithabort',verify that set option are correct for use with indexed views and/or indexes on computed

Colums and/or filterd indexes and/or query notifications

 Problems with the query,resultset property not set correctly,parameters not set correctly ,or connection not established correctly.

 

 


VSS Writer SqlServerWriter fails with 3rd party backup solution.

$
0
0

I am having some troubles with the Sql VSS writer. I am using a 3rd party backup solution, and it is failing because each time a snapshot is attempted the writer (SqlServerWriter) fails with a non-retryable error. The same thing happens with the built in Windows Server Backup utility. There are a few notable entries in the Event Logs on the server. One names error 0x800423f4, the other0x80070005, which is an access denied error. Trouble is, the writer is set to run under the local system account, and the local system account has SysAdmin privileges on the databases. I've spent quite a few hours over the past week or two attempting to solve this and have had no luck. Any ideas where this writer is failing? This is a SQL 2008r2 install.

Thanks,

Josh

 

 

Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e14. SQLSTATE: 42000, Native Error: 3013
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 10.0
Error message: BACKUP DATABASE is terminating abnormally.
SQLSTATE: 42000, Native Error: 18210
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 10.0
Error message: BackupVirtualDeviceSet::Initialize: CoCreateInstance failure on backup device '{730A7E71-C123-4F80-A1E3-DEF2BDE8E112}3'. Operating system error 0x80070005(Access is denied.).

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

A VSS writer has rejected an event with error 0x800423f4, The writer experienced a non-transient error. If the backup process is retried,
the error is likely to reoccur.
. Changes that the writer made to the writer components while handling the event will not be available to the requester. Check the event log for related events from the application hosting the VSS writer.

Operation:
 PrepareForSnapshot Event

Context:
 Execution Context: Writer
 Writer Class Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
 Writer Name: SqlServerWriter
 Writer Instance Name: SQL Server 2008 R2:SQLWriter
 Writer Instance ID: {e37d5783-6dd3-4bde-ae44-c179982fb65b}
 Command Line: "C:\Program Files\Microsoft SQL Server\90\Shared\sqlwriter.exe"
 Process ID: 8984

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is what the 'vssadmin list writers' command turns up for the SQL Writer after an attempted snapshot. Only way to recover it is to restart the server.

 

Writer name: 'SqlServerWriter'
 Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
 Writer Instance Id: {ac3d731f-6a0f-4537-8d6f-1ffad6dd9d8f}
 State: [8] Failed
 Last error: Non-retryable error

 

 

 




SQL 2016 Always On Basic

$
0
0

Hi there,

Can you confirm that you can use only 1 database in the availability group? standard version.

If so, it is pointless, we are thinking over if standard or enterprise

Thanks a lot,

SQL Server Agent service are invalid

$
0
0

Hello, 

I am currently trying to add a node to an existing cluster and having issue with it. 

It comes with below error message. 

I've made sure the SQL Agent credential is correct as to which is used on existing node. The username is blank on the SQL Server Agent Account Name, so have no clue as to what else it's looking for?

Please help. 

Best regards, 

Mohan

Performance Issues on Idle (secondary) DB

$
0
0

Hi,

I am running SQL 2012 (11.0.6248) on a pair of Real Servers running on Win 2008 R2 SP1. SSRS runs on the secondary server (here called B). About a month after switching from RAID 10 to RAID 5 (on SSDs) because the need to add some space, the secondary server was running as primary after failing over to update the configuration. Suddenly, we started getting timeouts and we failed over to the primary server (A). The performance on the secondary server (B) eventhough was on a idle state, was terrible. We rebooted the server, but didn't fixed the problem. While installing SQL updates, suddenly performance improved and the server was back to normal. We had to install updates on the primary server to run the same version of SQL on both servers so we failed over and the secondary server (B) was again the primary. After 3 weeks, the same problem occured, performance suddenly went down, we had to fail over to A and B is running slow. Rebooted server, restarted SSRS, checked for running qeuries, but nothing seems to solve the issue on B. Any ideas what could be causing this server even on an Idle state to run slow? Usually in the past a fail over would have fixed the problem on both servers.

Any help would be really appreciated,

Thanks

Downtime for failover is too long on Linux

$
0
0

Hi experts,

I'm new to SQL Server. Nowadays I want to use SQL Server on Linux. and I tested the failover SQL Server on Linux and Windows Server. 

And I found out that downtime for failover is too long on linux.

Env for windows

OS : windows server 2016 with AD (3node)

SQL : SQL Server 2017

Failover Downtime : 10s

Env for Linux

OS : ubuntu 16.04 with pacemaker (3node)

SQL : SQL Server 2017

Downtime : 40s(I tested it on centos again and I got the same result)

So I doubt thepacemaker configuration or something on Linux. I don't know where I should see.

I followed the document (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-create-availability-group?view=sql-server-linux-2017)

Could you give me some advice? Do you need more information to solve or check? Tell me.

Thank you.

AG cluster non-default ports question

$
0
0

Hi guys.  Can you help me sort out the non-default ports in my 3-node, multi-instance, 2014 AG cluster?  HA Node1 holds  primary replica of all AG's.  Hopefully below presents it clearly.  What changes do you recommend?...

HA cluster node 1: 

  xx36 = SQL Server default port set in Client Protocols TCP/IP Properties

      xx38 = Default Instance port, xx38 = Listener 1 port, xx39, Listener 2 port

      xx36 = Named Instance 1, xx36 = Listener

      xx40 = Named Instance 2, xx40 = Listener

      xx42 = Named Instance 3, xx42 = Listener

      xx45 = Named Instance 4, xx45 = Listener

      xx47 = Named Instance 5, xx47 = Listener

      xx49 = Named Instance 6, xx49 = Listener

HA Cluster Node 2:

  xx36 = SQL Server default port set in Client Protocols TCP/IP Properties

DR Cluster Node 1:

  xx33 = SQL Server default port set in Client Protocols TCP/IP Properties

Notice above that:

  -Default SQL Server port not consistent between HA and DR nodes.

  -Listener ports set to same as named instance ports in all cases.

  -Named Instance 1 has same port as the default SQL Server port.  

Also, on HA cluster nodes 1 and 2, the "Listen All" property not same: 

  -Default Instance, TCP/IP "Listen All" property = No

  -Named Instances 1 through 6, TCP/IP "Listen All" property = Yes

On DR cluster node, all instances have "Listen All" property set to Yes.



Issue setting up my File Share witness

$
0
0

I am in the process of setting up a SQL Failover cluster over two availability zones in AWS.  My issue I am having is my File share witness is throwing me an error when trying to set this part up.  

set-clusterquorum -NodeAndFileShareMajority "\\EPMMNSDC1\Witness"

Gives me this error:

set-clusterquorum : There was an error configuring the file share witness '\\EPMMNSDC1\Witness'.
    Unable to save property changes for 'File Share Witness'.
    The parameter is incorrect
At line:1 char:1
+ set-clusterquorum -NodeAndFileShareMajority "\\EPMMNSDC1\Witness"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-ClusterQuorum], ClusterCmdletException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.FailoverClusters.PowerShell.SetClusterQuorumCommand

I have both my nodes as read/write on the share.  I am able to browse to the share from both nodes.

I try to run it through the GUI and i get this error:

An error was encountered while modifying the quorum settings.
Your cluster quorum settings have not been changed.

There was an error configuring the file share witness '\\EPMMNSDC1\Witness'.

Unable to save property changes for 'File Share Witness'.

The parameter is incorrect



Unable to create cluster resource for SQL linux AG

$
0
0

[root@pcmk01 ~]# pcs resource create ag1 ocf:mssql:ag ag_name=ag_cluster meta failure-timeout=30s master notify=true
Error: Agent 'ocf:mssql:ag' is not installed or does not provide valid metadata: Metadata query for ocf:mssql:ag failed: Input/output error, use --force to override
[root@pcmk01 ~]# pcs resource create ag1 ocf:mssql:ag ag_name=ag_cluster meta failure-timeout=30s master notify=true --force
Warning: Agent 'ocf:mssql:ag' is not installed or does not provide valid metadata: Metadata query for ocf:mssql:ag failed: Input/output error
[root@pcmk01 ~]# pcs resource show
 virtualip    (ocf::heartbeat:IPaddr2):    Started pcmk01.sqlaglinux.net
 Master/Slave Set: ag1-master [ag1]
     Stopped: [ pcmk01.sqlaglinux.net pcmk02.sqlaglinux.net ]

[root@pcmk01 ~]# pcs status
Cluster name: sqlclufy
Stack: corosync
Current DC: pcmk01.sqlaglinux.net (version 1.1.18-11.el7-2b07d5c5a9) - partition with quorum
Last updated: Thu Jun 28 09:25:52 2018
Last change: Thu Jun 28 09:24:42 2018 by root via cibadmin on pcmk01.sqlaglinux.net

2 nodes configured
3 resources configured

Online: [ pcmk01.sqlaglinux.net pcmk02.sqlaglinux.net ]

Full list of resources:

 virtualip    (ocf::heartbeat:IPaddr2):    Started pcmk01.sqlaglinux.net
 Master/Slave Set: ag1-master [ag1]
     Stopped: [ pcmk01.sqlaglinux.net pcmk02.sqlaglinux.net ]

Failed Actions:
* ag1_monitor_0 on pcmk01.sqlaglinux.net 'not installed' (5): call=39, status=Not installed, exitreason='',
    last-rc-change='Thu Jun 28 09:24:42 2018', queued=0ms, exec=0ms
* ag1_monitor_0 on pcmk02.sqlaglinux.net 'not installed' (5): call=22, status=Not installed, exitreason='',
    last-rc-change='Thu Jun 28 09:24:30 2018', queued=0ms, exec=1ms


Daemon Status:
  corosync: active/disabled
  pacemaker: active/enabled
  pcsd: active/enabled


I created database via SQL Server 2012, it connects many people in our office

$
0
0


It works during some months without any bugs. Yesterday evening one of our colleagues said that database dropped. Today I've checked this fact, moreover at opening I see that many of tables lost. I applied some sql database recovery tools like Stellar, DataNumen and others, but no one of it couldn't help us. I and some IT specs don't know what to undertake in the following, but we hope that there's a decision...

LS Status Report showing false alert state

$
0
0

I have log shipping every 15 minutes working between 2 servers, and while the secondary server reports everything ok (time since last copy, restore are all under 15 minutes), the primary server reports that the time since last backup is 7400+ minutes.  I have verified that the LS backup job has no failures.  How can I correct this false error state and get the primary server to start reporting actual statuses?

 

The LS monitor is on the secondary server. 

mssql server enterprise licencing

$
0
0
When I create alway-on cluster on AWS with primary and secondary passive replica I need licences for both instances or only for primary? I want to use enterprise edition

Managed Backups to Azure - CryptDecrypt Errors in log

$
0
0

Hi guys,

I hope something can help me with the following issue since it has been slowly eroding my sanity this week :-)

A while ago I deployed an Azure SQL server with Managed Backups (SQLIaas Extension) enabled so it will automatically backup to an Azure Storage Account. This worked fine.

Recently I wanted to improve the way we get alerts when the backup fails. I then noticed a whole bunch of errors in the SQL Agent Log every time it does backups. At first these were "Impersonation" errors:

[298] SQLServer Error: 22046, Impersonation error. [SQLSTATE 42000]

I then changed the SQL Agent Service account back to NT Service\SQLSERVERAGENT(it was a domain account before) and the errors went away only to be replaced by the following error instead:

[442] CryptDecrypt failed (-2146893819).

Correlating the timestamp of the error to an Xevent trace I found out that the error occurs when this Stored Procedure is called:

exec managed_backup.sp_backup_config_advanced @encryption_algorithm =N'NO_ENCRYPTION',@encryptor_type =default,@encryptor_name =default,@database_name=N'dbname' 

Running this manually gives me the following error

Msg 45207, Level 17, State 17, Procedure sp_add_task_command, Line 102 [Batch Start Line 0]
The operation failed because of an internal error. Value cannot be null.
Parameter name: sasToken Please retry later. 
    at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials..ctor(String sasToken)
   at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.FileService.VerifyContainerURL(String containerURL, SqlConnection conn)
   at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.SmartBackup.ConfigureDbOrInstance(SmartBackupConfigParameters config, LogBaseService jobLogger, SqlConnection conn)


And to complete the story; if I change a setting via the Azure Portal (for example at what time it should take backups) I get a similar error talking about the SAS token in the failed deployment's error details.

SQL Server IaaS Agent: The operation failed because of an internal error. Value cannot be null. Parameter name: sasToken Please retry later. 

at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials..ctor(String sasToken)at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.FileService.VerifyContainerURL(String containerURL, SqlConnection conn)at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.SmartBackup.ConfigureDbOrInstance(SmartBackupConfigParameters config, LogBaseService jobLogger, SqlConnection conn);Automated Patching: Automated Patching enabled: False, Windows Update state: NotifyBeforeInstallation, VM is up to date in applying important updates.;Automatic Telemetry: Performance Collector State: Running


I've already tried removing and re-adding the extension, manually generating a SAS token and replacing the existing credential. I've also tried using a new storage account without success.  Using the query to do Ad-Hoc backups works as well so I'm sure the Credential is working correctly

EXEC managed_backup.sp_backup_on_demand @database_name = 'dbname',@type = 'Database'  

So where is the code getting the SAS token information from (so I can find out why it's getting a Null value). Any idea which DLL it's using? 

Is there a way to completely remove the Managed Backups in order to reinstall? It seems like just removing the extension just sets the backups to disabled on an instance level. 

Any help would be greatly appreciated!



I want to restore a differential backup.

$
0
0

Facing a below error. I have already done a full backup and a differential backup, when i tried to restore a second differential backup, I'm facing the below error. I could understand i'm getting the error since my db in online state. I cannot take a full backup again because its huge size. 

As of my knowledge we can restore multiple differential backup post one full backup. 

How to make the db in restoring state, so that i can update a new differential backup. Please anyone assist. 

TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore failed for Server 'xxxxx-xx'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17199.0+((SSMS_Rel).171004-0254)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

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

------------------------------

The log or differential backup cannot be restored because no files are ready to rollforward.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3117)


Viewing all 4532 articles
Browse latest View live


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