Change Database configuration

48 views
Skip to first unread message

Ricardo Brandão

unread,
Mar 20, 2015, 1:31:18 PM3/20/15
to rav...@googlegroups.com

Hi,

What is the best way to add settings to a database? In v3 now we have

var databaseConfiguration = DocumentStore.DatabaseCommands.ForDatabase(databaseName).Admin.GetDatabaseConfiguration();

that gives us the database configuration. 

However I am not being able to properly save changes to this configuration. I am trying the following:

databaseConfiguration.Add(settingName, new RavenJValue(settingValue));

I am assuming that I am not supposed to change database configuration like this but I want to add a connection string that will be used in SqlReplication.

Any ideas?

Thanks.

Oren Eini (Ayende Rahien)

unread,
Mar 20, 2015, 6:14:45 PM3/20/15
to ravendb
Connection strings are actually stored as a document inside the database. You can just modify that.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ricardo Brandão

unread,
Mar 27, 2015, 5:48:29 AM3/27/15
to rav...@googlegroups.com
Thanks, that really helped.

P.S. Maybe you should consider moving "Raven/SqlReplication/Connections" to a constant?

Oren Eini (Ayende Rahien)

unread,
Mar 31, 2015, 8:08:04 AM3/31/15
to ravendb
I don't understand the suggestion?
--

Bruno Lopes

unread,
Apr 1, 2015, 5:14:04 AM4/1/15
to rav...@googlegroups.com
The predefined connections document uses the id "Raven/SqlReplication/Connections", but it's a bare string in the source.
I think Ricardo was suggesting placing the id on a constant, either in Constants or on SqlReplicationConnections

Oren Eini (Ayende Rahien)

unread,
Apr 1, 2015, 5:24:47 AM4/1/15
to ravendb

Already done

Bruno Lopes

unread,
Apr 1, 2015, 5:49:27 AM4/1/15
to ravendb
thanks

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/BEYR7JO7EYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages