csharp var documentStore = new DocumentStore { Urls = new string[] { "http://PrimaryServer:8080", "http://SecondaryServer1:8080", "http://SecondaryServer2:8080" }, Database = "YourDatabaseName", Conventions = { ReadBalanceBehavior = ReadBalanceBehavior.RoundRobin } }; documentStore.Initialize(); using (var session = documentStore.OpenSession()) { } csharp var documentStore = new DocumentStore { Urls = new string[] { "http://PrimaryServer:8080", "http://SecondaryServer1:8080", "http://SecondaryServer2:8080" }, Database = "YourDatabaseName", Conventions = { FailoverBehavior = FailoverBehavior.AllowReadsFromSecondariesAndWritesToSecondaries } }; documentStore.Initialize(); using (var session = documentStore.OpenSession()) { } csharp var documentStore = new DocumentStore { Urls = new string[] { "http://PrimaryServer:8080" }, Database = "YourDatabaseName", Conventions = { } }; documentStore.Initialize(); using (var session = documentStore.OpenSession()) { } documentStore.Backup("YourBackupFolder", "YourBackupFilename");


上一篇:
下一篇:
切换中文