The distribution agent failed to create temporary files in xxx directory. System returned errorcode 5 散發代理程式建立暫存檔失敗

The distribution agent failed to create temporary files in … directory. System returned errorcode 5 散發代理程式建立暫存檔失敗 Error: 錯誤訊息 當你修改了散發代理程式的處理帳號(執行帳號) When you change the Agent process account in the Distribution Agent Security  The distribution agent failed to create temporary files in ‘C:\Program Files\Microsoft SQL Server\110\COM’ directory. System returned errorcode 5 Cause: 原因 新的執行帳號,對C:\Program Files\Microsoft SQL Server\110\COM…

0

Replication Log Reader Agent Error “The principal dbo does not exist” 複寫記錄讀取器代理程式出現主體dbo不存在

Replication Log Reader Agent Error “The principal dbo does not exist” 設定SQL Server Replication複寫時,Log Reader Agent複寫記錄讀取器代理程式出現以下錯誤 Error: 錯誤訊息 Error messages: The process could not execute ‘sp_replcmds’ on ‘SQLPublisher’. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011) Get help: http://help/MSSQL_REPL20011 Cannot execute as the database principal because the principal “dbo” does not exist, this type of principal cannot be…

0

複寫監控 Monitor Replication

複寫監控 Monitor Replication Measure Latency and Validate Connections for Transactional Replication 使用Tracer Token監控複寫延遲 保留延遲紀錄作法請參考我這篇   Programmatically Monitor Replication–Programmatically Monitor Replication USE [distribution] GO sp_replmonitorhelppublisher GO sp_replmonitorhelppublisher (Transact-SQL) USE [distribution] GO sp_replmonitorhelppublication @publisher = N’SQLDEV1′ GO sp_replmonitorhelppublication (Transact-SQL) USE [distribution] GO sp_replmonitorhelpsubscription @publisher = N’SQLDEV1′, @publication_type = 0 GO sp_replmonitorhelpsubscription (Transact-SQL) USE [distribution] GO sp_replmonitorsubscriptionpendingcmds @publisher…

0

SQL Server 2008 R2 Management Studio – Darker Shades of Blue Theme

SQL Server 2008 R2 Management Studio – Darker Shades of Blue Theme SSMS 2008 R2 套用Visual Studio色彩佈景主題環境設定檔 SQL 2012 SSMS以上才支援匯出與匯入環境設定檔 SQL 2008 R2 SSMS需自行調整字型與色彩,以下方法可以直接套用已經設定好的色彩佈景主題   1.Download: CurrentSettings-2016-07-12.vssettings 2.覆蓋以下檔案 預設路徑 C:\Documents and Settings\{user name}\Documents\SQL Server Management Studio\Settings\ CurrentSettings-2016-xx-xx.vssettings 3.重開SSMS就可以套用成功 Reference: SQL Server 2012 Management Studio – Darker Shades of Blue Theme Making SSMS Pretty : My…

0

SQL Server and SQL Server Agent Service Account(Startup Account) and Permissions

SQL Server and SQL Server Agent service account(Startup Account) and Permissions SQL Server與SQL Server Agent 服務帳戶(啟動帳戶)與權限 可設定的種類 1.Domain User Account (使用一個網域使用者帳戶) 2.Local User Account (使用一個本機使用者帳戶) 3.Local Service Account (NT AUTHORITY\LOCAL SERVICE) 本機服務帳戶 4.Network Service Account (NT AUTHORITY\NETWORK SERVICE) 本機網路帳戶 5.Local System Account (NT AUTHORITY\SYSTEM) 本機系統帳戶 6.Virtual Accounts (start from Windows 7 and Windows Server 2008…

0

How to create a failover cluster

How to create a failover cluster 如何新增一個容錯移轉叢集 1.In the Failover Cluster Manager snap-in, confirm that Failover Cluster Manager is selected and then, under Management, click Create a Cluster. 2.Follow the instructions in the wizard to specify: The servers to include in the cluster. The name of the cluster. Any IP address information that is not…

0

Query SQL Server backup history and restore history records

SQL Server備份還原紀錄 1.使用以下TSQL語法查詢備份檔紀錄 SELECT bs.backup_set_id, bs.database_name, bs.backup_start_date, bs.backup_finish_date, CAST(CAST(bs.backup_size/1000000 AS INT) AS VARCHAR(14)) + ‘ ‘ + ‘MB’ AS [Size], CAST(DATEDIFF(second, bs.backup_start_date, bs.backup_finish_date) AS VARCHAR(4)) + ‘ ‘ + ‘Seconds’ [TimeTaken], CASE bs.[type] WHEN ‘D’ THEN ‘Full Backup’ WHEN ‘I’ THEN ‘Differential Backup’ WHEN ‘L’ THEN ‘TLog Backup’ WHEN ‘F’ THEN ‘File or filegroup’ WHEN…

4

Setting Up SQL Server 2008 R2 Database Mirroring in a Workgroup

1.Verify SQL Server service account and configure SQL Server Login for Database Mirroring (1)SQL Server service account Principal Server SQL Server service account is local account name “SQLServer” Mirroring Server SQL Server service account is local account name “SQLService” (2)create a local account “SQLservice” on Principal Server create a login for local account “SQLservice” (3)create a…

2

Service Accounts and Database Mirroring

Service Accounts (Configure Database Mirroring Security Wizard)http://msdn.microsoft.com/en-us/library/ms189434.aspx When using Windows Authentication, if the server instances use different accounts, specify the service accounts for SQL Server. These service accounts must all be domain accounts (in the same or trusted domains). If all the server instances use the same domain account or use certificate-based authentication, leave the…

0

Setting Up SQL Server 2008 R2 Database Mirroring with Certificate step by step in a Workgroup

Setting Up SQL Server 2008 R2 Database Mirroring with Certificate step by step in a Workgroup LAB VM Principal Server: SQL2008R2M1 Mirroring Server: SQL2008R2M2 Witness Server: SQL2008R2M3   [Step by Step] 1.Create Database Master key, certificate and endpoint on Principal Instance(SQL2008R2M1) USE master GO SELECT * FROM sys.symmetric_keys GO CREATE MASTER KEY ENCRYPTION BY PASSWORD=’P@ssw0rd’;…

3