Scripting learning resources

Scripting Guide https://technet.microsoft.com/en-us/library/ee692931.aspx FileSystemObject Managing Disk Drives Returning a Collection of Disk Drives Binding to a Specific Disk Drive Enumerating Disk Drive Properties Ensuring That a Drive is Ready Binding to a Folder Verifying That a Folder Exists Creating a Folder Deleting a Folder Copying a Folder and Its Contents Moving a Folder and Its…

0

Oracle Client for SQL Server

Oracle Client for SQL Server Oracle Client Support Windows version Document / Download Oracle 12c for Microsoft Windows x64 (64-Bit) •Windows Server 2008 x64 and Windows Server 2008 R2 x64 – Standard, Enterprise, Datacenter, Web, and Foundation editions. •Windows 7 x64 – Professional, Enterprise, and Ultimate editions •Windows 8 x64 and Windows 8.1 x64 –…

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 1.Does service account need sysadmin role?  [SQL Server(Database Engine)] 沒有文件說明一定需要sysadmin role no document found saying No or Yes explicitly about if sql service account need to be a member of sysdamin role (1)SQL 2005,service account is always granted with sysadmin by default (e.g. if we pick Local…

0

AlwaysOn Availability Groups learning resources

Overview of AlwaysOn Availability Groups (SQL Server)http://msdn.microsoft.com/en-us/library/ff877884.aspxPrerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups (SQL Server)http://msdn.microsoft.com/en-us/library/ff878487.aspx SQL AlwaysOn Team Bloghttp://blogs.msdn.com/b/sqlalwayson/SQL Server Customer Advisory Teamhttp://blogs.msdn.com/b/sqlcat/ MSDN Blogs  >  Brad Chen’s SQL Server Blog   >  All Tags  >  alwayson http://blogs.msdn.com/b/bradchen/archive/tags/alwayson/ AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using Failover Cluster Instances and…

0

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 automatically supplied by your DHCP settings.  …

0

Query SQL Server backup history and restore history records

  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 ‘G’…

3

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…

1

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

Setting Up SQL Server 2008 R2 Log Shipping step by step

Setting Up SQL Server 2008 R2 Log Shipping step by step 1.Prerequisites (1)確認資料庫復原模式recovery model為[完整](Full)或[大量記錄](bulk-logged) (2)建立一個交易紀錄備份用目錄並設定分享,如果只有兩台SQL Server通常建立在主要伺服器Primary Server上,此目錄也可以建立在第三台主機上。 此範例的目錄建立在主要伺服器上,C:\LogShip 並給予主要伺服器Primary Server的SQL Agent啟動帳戶SQLservice有寫入與讀取權限   (3) 建立一個放置要還原的交易紀錄檔目錄並設定分享,此目錄建立在次要伺服器secondary Server主機上。 此範例的目錄建立在次要伺服器上,C:\LogShipRestore 並給予次要伺服器secondary Server的SQL Agent啟動帳戶SQLservice有寫入與讀取權限   2.Prepare a Secondary Database for Log Shipping (1)在主要伺服器上對要設定log shipping的資料庫執行完整備份。 (2)在執行一次交易紀錄檔備份。 (3)複製備份檔到次要伺服器。 (4)在次要伺服器,以WITH NORECOVERY參數還原完整備份與交易紀錄檔備份。 還原後資料庫狀態為(正在還原中)(Restoring)   3.開始設定Log Shipping (1)在主體伺服器設定主體資料庫屬性 (2)在選取頁面點選[交易紀錄傳送],右邊勾選[將此啟用為記錄傳送組態的主要資料庫] Under Select a page, click Transaction Log…

0