SQL 2012 Always on with WFC

Hi Expert,
I have following infrastructure at par. where i have 3 server in WFC(Windows Failover cluster) Win2012 and out of 3 servers two servers are active/passive cluster with SQL Instance hosted on it and i have created AG group for 3 users database and setup Sync
Replica on 3rd server within my WFC cluster.
I have SQL VIP(Virtual Server Name) for cluster and also i have AG Listener resources also on the cluster. Now this cluster is attached to SAN single.
3rd server where we kept sync replica its storage is not coming from SAN it has local storage attached to it.
Now we know we have single point failure if SAN goes down My SQL Server 2node active passive cluster instance will also come down.
Now in this kind of event will my AG Listener can be online on WFC even if SAN is down so that it can redirect connection to the 3rd server where it has sync replica copy.
Also if in case Listener will not be able to be online in event of SAN failure what would alternative path we consider here
your valuable suggestion and time are most welcome.
Thank you very much..
Regards, Nirav Joshi

This will depend on your quorum configuration. If you started building your SQL Server failover clustered instance before adding your 3rd node, you may have a node a disk majority quorum. When the SAN fails, you take down the disk witness and the SQL Server
instance but since you still have 2 additional voting nodes, you still have a quorum so the Availability Group stays online. Unfortunately, because you have a combination of SQL Server Failover clustered instance and stand alone instance for your Availability
Group, you lose the ability to have automatic failover. So, even if there is a majority of votes in your cluster, you still have to manually failover the Availability Group and the listener name on the standalone instance running on the 3rd node.
Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
Blog |
Twitter | LinkedIn
SQL Server High Availability and Disaster Recover Deep Dive Course

Similar Messages

  • Backup Sharepoint 2013 Farm with SQL 2012 "Always On" using System Center 2012 R2 Data Protection Manager

    Is backing up and Restoring SharePoint 2013 Farm with SQL 2012  "Always On" High Availability now supported using "System Center 2012 R2 Data Protection Manager"?
    I cannot find confirmation anywhere.
    Regards,
    John

    Per this thread
    http://social.technet.microsoft.com/Forums/en-US/0c047737-4733-4ad5-a24d-3e6e6ff42f70/dpm-2012-sp1-and-sharepoint-2013-on-a-sql-2012-alwayson-ag?forum=dpmsharepointbackup, no it does not look like this is supported.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Does Lync 2013 work with SQL 2012 always on Feature?

    Howdy,
    I'm not that even "ok" when it come to SQL :)
    so my question Does Lync 2013 Enterprise work with SQL 2012 "Always on" Feature or only Mirroring?
    Regards,
    T

     It will not be supported. Mirroring is your only option.
    If a post is helpful, please take a second to hit the green arrow on the left, or mark as answer, thanks.
    Jean-Philippe Breton | Senior Microsoft Consultant | MCTS, MCITP, MCT, Lync MVP

  • SQL 2012 Always On Availability Groups

    Has anyone configured FIM SYnc, FIM Service and MSF in SQL 2012 Always On Availability groups
    I do not believe we can configure the SQL connection string for FIM Sync or FIM Service to include "multisubnetfailover"
    TIA
    Nigel

    I commented on this here:https://social.technet.microsoft.com/Forums/en-US/64f55628-3b5d-4d16-9044-dcbe7053581d/lack-of-support-for-fim-database-mirroring?forum=ilm2
    Additional comments:
    SQL Server Always On Failover Cluster Instances should be supported just as SQL Clustering is supported.
    SQL Server Always On Availability Groups are not supported, just as Database Mirroring in synchronous mode (which is required for automatic failover) is not supported. I can't find authoritative statements of this on the web. But I know this to be the
    case.
    Ultimately, the reason for lack of support for mirroring (for automatic failover or in synchronous mode) is that the product group has said so (in conferences and webinars). Meaning the product group has not tested it or has and decided that it doesn't
    work or adds risk.
    Possible underlying reasons:
    1) To do automatic failover with mirroring or Availability groups you must edit the connection string. The way FIM builds the connection string out of the components in the registry don't permit this.
    2) Running mirroring in synchronous mode slows down performance in two ways: first is the additional traffic to send it to the mirror partner (or replica), second and most important is that synchronous requires that the primary not truly commit the transaction
    until it has been committed to the secondary which means transactions take longer. For some products this can result in an unacceptable performance degradation.
    Hopefully, MIM will support Availability groups.
    David Lundell, Get your copy of FIM Best Practices Volume 1 http://blog.ilmbestpractices.com/2010/08/book-is-here-fim-best-practices-volume.html

  • Sql 2012 always on setup

    I got a sql 2012 always on setup between 2 standalone servers in 2 different locations.
    I do not understand why I need cluster manager managing the 2 nodes.
    I have cluster manager but there is no shared disks. there are 2 nodes under cluster manager and one cluster name.
    what would be the different between the cluster name here and the availability group listener name in sql 2012? they are both different names

    Read those articles
    https://www.microsoftvirtualacademy.com/tracks/mission-critical-confidence-using-microsoft-sql-server-2012
    http://www.sqlservercentral.com/articles/FCI/92196/
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SQL 2012 install fails with 'Object reference not set to an instance of an object.'

    Hi, I'm trying to install SQL 2012 RTM Enterprise on a Windows 2008 R2 single node cluster.
    The installer starts goes through some checks and then fails with the message 'Object reference not set to an instance of an object.' It happens while the small 'wait while...' dialog box is
    showing, another window pops up briefly (I think the feature selection window - can't really tell as it doesn't draw before disappearing). Then the ‘Object reference not set’ message comes up.
    From the summary log file..
    Overall summary:
    Final result:                 
    Failed: see details below
    Exit code (Decimal):          
    -2147467261
    Exit facility code:           
    0
    Exit error code:              
    16387
    Exit message:                 
    Object reference not set to an instance of an object.
    Start time:                   
    2012-09-26 08:52:53
    End time:                     
    2012-09-26 08:54:08
    Requested action:             
    InstallFailoverCluster
    Exception help link:          
    http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.2100.60&EvtType=0x9AF1AE5E%400x44A889F9&EvtType=0x9AF1AE5E%400x44A889F9
    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented
    Exception type: System.NullReferenceException
    Message:
    Object reference not set to an instance of an object.
    Data:
    HelpLink.EvtType = 0x9AF1AE5E@0x44A889F9
    DisableWatson = true
    Stack:
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.ShouldRuleRun(Rule rule)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.IsRuleSkipped(Rule rule)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRule(String ruleId, List`1 ruleProperties, XmlSchema ruleSchema, XmlElementParserFactory elementParser)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRules(IEnumerable`1 ruleIds)
    at Microsoft.SqlServer.Configuration.InstallWizard.RunRuleProgressController.Initialize()
    I have rebooted, tried different media, tried uninstalling the setup files and rerunning but always get the same result.
    Any help would be gratefully accepted.
    Thanks,
    Bruce.

    Hi Alberto,
    Whenever I am trying to install SQL 2012 with SP1 clustering, I am getting below error. Can you please advise on this. 
    Additional information are
    Windows Servers Version and Edition - Windows 2012 Strandedition
    SQL Server Version and Edition - SQL 2012 with SP1
    All the machines are running on Hyper-V and Passed the cluster validation test successfully. there is no issue. The servers' (Nodes) names are;
    DomainServerName - ACONDomainGroup (1gb ram allocated)
    Node1 - AconNODE1W2K12STD (2.5gb ram allocated )
    Node2 - AconNODE2W2K12STD (1.5 ram allocated allocated)
    WindowsClusterName - AconWinCLTR
    Below is  Summary.txt Error
      Update Source:                 MU
    User Input Settings:
      ACTION:                        InstallFailoverCluster
      AGTDOMAINGROUP:                <empty>
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                <empty>
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      ENU:                           true
      ERRORREPORTING:                false
      FAILOVERCLUSTERDISKS:          <empty>
      FAILOVERCLUSTERGROUP:          
      FAILOVERCLUSTERIPADDRESSES:    <empty>
      FAILOVERCLUSTERNETWORKNAME:    <empty>
      FEATURES:                      
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    <empty>
      INSTANCENAME:                  <empty>
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                <empty>
      SQLSYSADMINACCOUNTS:           <empty>
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140420_052344\ConfigurationFile.ini
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140420_052344\SystemConfigurationCheck_Report.htm
    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented
    Exception type: System.NullReferenceException
        Message: 
            Object reference not set to an instance of an object.
        HResult : 0x80004003
        Data: 
          HelpLink.EvtType = 0x9AF1AE5E@0x44A889F9
          DisableWatson = true
        Stack: 
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.ShouldRuleRun(Rule rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.IsRuleSkipped(Rule rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRule(String ruleId, List`1 ruleProperties, XmlSchema ruleSchema, XmlElementParserFactory elementParser)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRules(IEnumerable`1 ruleIds)
            at Microsoft.SqlServer.Configuration.InstallWizard.RunRuleProgressController.Initialize()

  • Clustering Pre-reqs for sql 2012 always on availability group

    Hello,
    I'm currently in the planning stages of building a sql 2012 alwaysON cluster on Windows server 2012. I'm a bit confused with some of the requirements.
    Does  windows 2012 clustering require a heartbeat network as well a nic that communicates with the domain?
    For a 2 node 2012 always on sql cluster which type of cluster should I use? node majority? node majority plus fileshare?
    thanks!

    I found this information regarding SQL 2014. This could be helpful
    "We strongly recommend that you use the same network links for communications between WSFC cluster members and communications
    between availability replicas. Using separate network links can cause unexpected behaviors if some of links fail (even intermittently).
    For example, for an availability group to support automatic failover, the secondary replica that is the automatic-failover partner must be in the SYNCHRONIZED state. If the network link to this secondary replica fails (even intermittently), the replica enters
    the UNSYNCHRONIZED state and cannot begin to resynchronize until the link is restored. If the WSFC cluster requests an automatic failover while the secondary replica is unsynchronized, automatic failover will not occur."
    source:http://msdn.microsoft.com/en-us/library/ff878487.aspx#NetworkConnect

  • Use a SQL 2012 database server with Reporting Services 2008?

    Hello, we have a SQL Server 2008 R2 Reporting Services Standard server with the reporting databases running on a SQL Server 2008 Standard database server. I would like to upgrade the database server to SQL Server 2012 before I upgrade the reporting server.
    Can I run SQL Server 2008 R2 Reporting Services against a 2008-version database running on a SQL 2012 database server? Thanks for your help.

     
    Hi Nicole
    Thanks for your posting.
    Are you asking if we can connect from SSRS 2008 r2 to a database sitting on SQL Server 2012.  Am I right?, please ignore me if I misunderstood your question. If that is your question
    then I think you will be able to using BIDS 2008, I have created A database on SQL Server 2012 and I use that database table inside  my SSRS 2008 R2 dataset. I can even think that you can use a database of compatibility level of 2012(110) as well
    Many thanks
    Syed Qazafi Anjum

  • Changing from full recovery model to simple in sql 2012 always on

    how do I change from a full recovery model to simple in an always on sql 2012 setup? When I try to change it it gave this error

    The physical size of the log file will not change unless you manually shrink the file.  A backup marks the log space as "reusable" internally.
    Please see:
    http://msdn.microsoft.com/en-us/library/ms365418.aspx

  • SQL 2012 Always on AG Primay went to secondary

    I have a Database in sql 2012 in an Always on AG that went from primary to secondary. I am not sure what happened or made it failover to secondary. So my apps were pointing to the primary all had problems updating the database but were still running.
    what do I have to change on my app so that they point to the AG listener instead of just the primary server?
    this way whenever the primary changes, the app will use the other server as primary

    Hi JonDoe,
    If an availability group possesses only one secondary replica and it is not configured to allow read-access to the secondary replica, clients can connect to the primary replica by using a database mirroring connection string.
     Optionally, the connection string can also supply the name of another server instance, the
    failover partner name, to identify the server instance that initially hosts the secondary replica as the failover partner name.
    While migrating from database mirroring to AlwaysOn Availability Groups, applications can specify the database mirroring connection string as long as only one secondary replica exists and it disallows user connections. For more information,
    see: http://msdn.microsoft.com/en-us/library/hh213417.aspx#CCBehaviorOnFailover
    There is an article about configure SQL Server to automatically redirect the read-only workloads after a failover in AlwayOn Availability Groups, you can review it.
    http://www.mssqltips.com/sqlservertip/2869/configure-sql-server-2012-alwayson-availability-groups-readonly-routing-using-tsql/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • SQL 2012 AlwaysOn AG with 3 Nodes

    First, what would be the best option of quorum/quorum witness for my SQL 2012 AlwaysOn group?
    I have setup the following:
    SQL 2012 AlwaysOn with 3 nodes.
    1 primary
    2 secondaries - one of them is read-only (for reporting and backup)
    Dynamics CRM and Reporting DBs are running on them.
    How can I achieve the highest avalability and DR with my SQL? Do I even need to create the quorum witness? What kind of Quorum (majority nod with network share?)
    Second, Is it good idea to run the backup on that read-only node?  If I setup the maintenance plan on this 3rd read-only mode with full and transactional backups, I should be able to restore without any issues?
    Third, I have another DB (SharePoint) that needs to be moved over to this SQL AlwaysOn AG but wondering if I can restore it in the secondary node to utilize the unused resources.  Is that possible or not recommended?

    Are the replicas on the same network subnet? If they are, then, you already have a quorum with node majority (odd number of votes.) Since you are already paying for an additional license to run read-only workloads on your readable secondary, you can take
    backups on this replica. Full database backups are in COPY_ONLY mode but you can take regular log backups which will truncate the log on the primary replica. In theory, you will be able to restore the backups taken from your readable secondary but you should
    test (hence, why I mentioned "in theory.") I wouldn't move my SharePoint databases to this SQL Server Availability Group mainly because of the different requirements between the two - SharePoint and Dynamics CRM. MAXDOP =1, disabling index maintenance and
    statistics updates on SharePoint databases, etc. are just a few of them. Besides, I doubt that the recovery objectives and service level agreements between those two applications are the same within your organization.
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • SQL 2012 R2 - SSRS with the Report Server Web Service URL, can't access

    Hello:
    I am installing Dynamics CRM 2013.  When I am on RS Configuration manager; I am running into the SSRS (SQL 2012 on Server 2012)SQL issue, can't access the
    http://servername/:80/ReportsServer or
    http://servername/:Reports web pages
    The database server has SSRS native mode installed, it is using a domain account for the service credentials.  This account also has permission to log on a service in the GPO
    Account is a domain admin and is a local administrator
    SQL server is 2012 R2 on Windows Server 2012.  User base is less than 60 people and they have SharePoint 13 on the same SQL server.  Server more than enough resources.
    Any assistance would be appreciated.
    Thanks..Dan

    Hi DCas1,
    According to your description, you could not access
    http://servername/:80/ReportsServer or http://servername/:Reports web pages from Reporting Services configuration manager, SSRS in configured in native mode and the account you used is a local administrator.
    In Reporting Services, URLs are used to access the Report Server Web service and Report Manager. Before we can use either application, we need to configure at least one URL each for the Web service and Report Manager. If we are using the Reporting Services
    Configuration tool to create or modify the URLs, we can accept the default values for a URL or specify custom values. When we create a report server URL, we must specify the following parts: Host name, port and Virtual directory. In order to improve the efficiency
    of troubleshooting, I need to ask several questions:
    Since the default URL is http://<computername>/reportserver, did you type the URLs manually? or the URLs configured in Reporting Services configuration manager are
    http://servername/:80/ReportServer and
    http://servername/:Reports?
    Could you provide detailed information of error log(default location: %programfiles%\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles)?
    For more information about Configuring a URL, please refer to the following documents:
    http://msdn.microsoft.com/en-us/library/ms159261(v=sql.110).aspx
    http://msdn.microsoft.com/en-us/library/bb630447(v=sql.110).aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Executing a SQL 2012 SSIS project with DTExec using Protection Level "EncryptAllWithPassword"

    I'm trying to execute a very basic SQL 2012 Project that only has 1 single package that contains a simply email task.
    The project will run fine from command line using basic syntax.
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" /package "Main.dtsx"
    Once I add the protection level of EncryptAllWithPassword to the project and the package things suddenly stop working. New command line syntax is.
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" /package "Main.dtsx" /P "Password"
    I get the following output.
    Microsoft (R) SQL Server Execute Package Utility
    Version 11.0.2100.60 for 64-bit
    Copyright (C) Microsoft Corporation. All rights reserved.
    Started:  5:14:49 PM
    Could not load project "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" because of error 0x80131500.
    Description: The encrypted data in project manifest failed to load. The project
    manifest is corrupted or if the project is password protected, the specified password is incorrect.
    Source: Microsoft.SqlServer.ManagedDTS
    Started:  5:14:49 PM
    Finished: 5:14:49 PM
    Elapsed:  0.078 seconds
    I'm confident my passwords are entered correctly in the two spots. Is there something I'm missing in my command line to use protection levels correctly. I have also built the project and deployed to SSISDB.
    Thank you

    Add the PassWord attribute as  :
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project
    1 Configuration\project1.ispac" /package "Main.dtsx" /P "YourPassWord"
    For more info :
    http://technet.microsoft.com/en-us/library/ms138023(v=sql.105).aspx

  • Automate SQL 2012 policy management with powershell

    Hello.
    I´m trying to automate policy management via Powershell and I´m running into some problems. What I want to do is register a SQL 2012 server to a group in a CMS server and then import a pre defined policy into that server. The first part where I register
    the client server is no problem but I cant figure out how to import the policy.
    Has anyone else run into this problem?
    Regards.
    /Niklas

    Of course!
    First thing you need to do if it is not already done is to register the CMS server. 
    Set-Location "SQLSERVER:\SQLRegistration\Central Management Server Group"
    New-Item -Name $CMSServer -ItemType registration -Value "server=$CMSServer;integrated security=true"
    Second you want to register the client server into a CMS server group.
    Set-Location "SQLSERVER:\SQLRegistration\Central Management Server Group\$CMSServer\SQL Server Group"
    New-Item -Name $serverToRegister.Replace("\","`$") -ItemType registration -Value "server=$serverToRegister;integrated security=true"
    When this is done I want to create my policy and schedule on all my target machines. I defined my policies directly in my powershell script so if
    you want to import the exported policies you probably need to extract information from the XML files.
    This example creates a schedule called hisec that executes daily at 1 am.
    $createSchedulecommand = @"
    DECLARE @start_date varchar(8) = convert(varchar(8), DATEADD(day,-1,GETDATE()), 112)
    EXEC msdb.dbo.sp_add_schedule  @schedule_name = N'hisec',
    @enabled = 1, @freq_type = 4, @freq_interval = 1, @active_start_date = @start_date,
    @active_start_time = 010000; "@ 
    Invoke-Sqlcmd -Query $createSchedulecommand -ServerInstance $targetInstanceName -Database "msdb" 
    Next thing is to create my policy. This example checks if XPCmdShell is enabled.
    $createPolicyCommand = @"
    DECLARE @object_SET_id int
    EXEC msdb.dbo.sp_syspolicy_add_object_SET
    @object_SET_name=N'hisec_ObjectSET',
    @facet=N'IServerSecurityFacet',
    @object_SET_id=@object_SET_id OUTPUT;
    DECLARE @target_SET_id int
    EXEC msdb.dbo.sp_syspolicy_add_target_SET
    @object_SET_name=N'hisec_ObjectSET',
    @type_skeleton=N'Server',
    @type=N'SERVER',
    @enabled=True,
    @target_SET_id=@target_SET_id OUTPUT;
    GO
    DECLARE @uid varchar(40)
    SET @uid = (select schedule_uid from msdb..sysschedules where name = 'hisec')
    DECLARE @policy_id int
    EXEC msdb.dbo.sp_syspolicy_add_policy
    @name=N'hisec',
    @condition_name=N'ServerSecurity',
    @policy_category=N'',
    @description=N'',
    @help_text=N'',
    @help_link=N'',
    @schedule_uid=@uid,
    @EXECution_mode=4,
    @is_enabled=True,
    @policy_id=@policy_id OUTPUT,
    @root_condition_name=N'',
    @object_SET=N'hisec_ObjectSET';
    GO
    Invoke-Sqlcmd -Query $createPolicyCommand -ServerInstance $targetInstanceName
    -Database "msdb"
    Hope this can help you somehow.

  • Which Edition of Windows is required for using SQL 2012 Always On Availability Groups

    I want to use the new feature of having 2 secondary mirror replicas. the first secondary replica will be sync the second one will be async.
    Currently I have SQL Enterprise license and Windows 2008 R2 Standard license.
    Will I be required to upgrade to Windows Enterprise license to use Always On? (since this feature depends on Windows clustering?)
    Can you please confirm if SQL Always On feature can be used on Windows 2008 R2 standard or not?
    MSDNStudent Knows not much!

    Always On is available with Standard Edition but it supports only 2 nodes. 
    AlwaysOn is a bigger umbrella which covers two features. AlwaysOn Availability Groups (AG) and AlwaysOn Failover Cluster Instance (FCI).
    FCI for 2 node is supported. You can't use AG feature in SQL Server Standard Edition
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

Maybe you are looking for

  • Please help me! To Install solaris 8 on Intel plateform

    Hi All, During when I tried to install Solaris 8 on my machine I repetadely used to encountered following problem listed below.I have also checked my motherboard's chipset with Sun's Hardware Compatiability List, it is there. My Machine: Intel PIII M

  • 16:9 movie exported from Final Cut Pro X showing up as 4:3 movie in iDVD

    I have exported a movie from Final Cut Pro X in 16:9 and when I open it in iDVD (also in 16:9 mode) it shows up as a 4:3 video.

  • Performance of ccBPM

    Hi, I am currently working in a maintenance project and I have to improve the performance of XI interfaces. I need some clarity on the below. There are many ccBPM's used to collect messages for say 30 mins and perform a mapping and then write a singl

  • Relationship A/B003 between WA and Position

    Dear experts, I'd like to understand what is happening when I create a relationship between a position and a work area. After I create this relationship, the existing relationship A/B003 with the Org. Unit is deleted and replaced by the one between W

  • Using Temp Tables

    I'm creating a temp table inside my program. Is there any way to force the database to keep the temp table's contents in memory, rather than flsuhing it to temp disk?