none
Availability Group RRS feed

Answers

  • Yes, but you would have to do it from T-SQL or the GUI without the wizard.  The Availability Group doesn't really hold any value until you actually add databases.  I would want to know why you want an empty AG without any databases.

    Here is a script example on creating an empty Availability Group:

    USE [master]
    GO
    CREATE AVAILABILITY GROUP [SQLAGTest]
    WITH (AUTOMATED_BACKUP_PREFERENCE = SECONDARY)
    FOR 
    REPLICA ON N'REPLICA1' WITH (ENDPOINT_URL = N'TCP://REPLICA1:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, SESSION_TIMEOUT = 10, BACKUP_PRIORITY = 50, PRIMARY_ROLE(ALLOW_CONNECTIONS = ALL), SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)),
    	N'REPLICA2' WITH (ENDPOINT_URL = N'TCP://REPLICA2:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, SESSION_TIMEOUT = 10, BACKUP_PRIORITY = 50, PRIMARY_ROLE(ALLOW_CONNECTIONS = ALL), SECONDARY_ROLE(ALLOW_CONNECTIONS = NO));
    GO



    Monday, August 10, 2015 6:21 PM
  • You are welcome. I wish you good luck on the migration.  If my response answered your question please mark it as answered so the community can see the solution if they search for it.
    • Marked as answer by VijayKSQL Wednesday, May 4, 2016 4:42 PM
    Monday, August 10, 2015 8:14 PM

All replies

  • Yes, but you would have to do it from T-SQL or the GUI without the wizard.  The Availability Group doesn't really hold any value until you actually add databases.  I would want to know why you want an empty AG without any databases.

    Here is a script example on creating an empty Availability Group:

    USE [master]
    GO
    CREATE AVAILABILITY GROUP [SQLAGTest]
    WITH (AUTOMATED_BACKUP_PREFERENCE = SECONDARY)
    FOR 
    REPLICA ON N'REPLICA1' WITH (ENDPOINT_URL = N'TCP://REPLICA1:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, SESSION_TIMEOUT = 10, BACKUP_PRIORITY = 50, PRIMARY_ROLE(ALLOW_CONNECTIONS = ALL), SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)),
    	N'REPLICA2' WITH (ENDPOINT_URL = N'TCP://REPLICA2:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, SESSION_TIMEOUT = 10, BACKUP_PRIORITY = 50, PRIMARY_ROLE(ALLOW_CONNECTIONS = ALL), SECONDARY_ROLE(ALLOW_CONNECTIONS = NO));
    GO



    Monday, August 10, 2015 6:21 PM
  • Thank you John.

    Next month we are planning to migrate all our SQL servers. As part of this i established Test lab, and playing with AG's.

    Monday, August 10, 2015 7:01 PM
  • You are welcome. I wish you good luck on the migration.  If my response answered your question please mark it as answered so the community can see the solution if they search for it.
    • Marked as answer by VijayKSQL Wednesday, May 4, 2016 4:42 PM
    Monday, August 10, 2015 8:14 PM