Before you start make sure there is absolutly no other way to use 1 database.
What you could do is writing a Custom Memership provider for this. In the custom membership provider you use the database that holds the member/umbraco user information. The default database holds the data.
Umbraco uses the normal user and member objects under the hood so you have to build a provider from scratch.
As Richard points out, using a custom membership provider for user logins is a good start. Besides that, you can use multiple db's, and you can easily use the umbraco framework to connect to other databases
using (var sqlHelper = DataLayerHelper.CreateSqlHelper(_connectionstring)) {...}
will allow you to use the 'umbraco data layer' to connect to any database.
Connecting to Multiple databases
Hi All,
We are struggling with a few database issues and hope that the Umbraco community could shed some light on a few of these issues.
One of the portals we are working on needs to connect to a couple of databases. This is becasue:
One database has user login details
The other has application and user specific data.
We have tried adding multiple connection strings in the Umbraco template, however, this does not work.
Umbraco seems to connect to the very first connection string.
Any suggestions or links to resources would be great.
Thank you for y our time and help.
Hi,
Before you start make sure there is absolutly no other way to use 1 database.
What you could do is writing a Custom Memership provider for this. In the custom membership provider you use the database that holds the member/umbraco user information. The default database holds the data.
Umbraco uses the normal user and member objects under the hood so you have to build a provider from scratch.
Few references online to check.
Tim's blog http://www.nibble.be/?p=66
MSDN: http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx
Hope this helps you,
Richard
As Richard points out, using a custom membership provider for user logins is a good start. Besides that, you can use multiple db's, and you can easily use the umbraco framework to connect to other databases
will allow you to use the 'umbraco data layer' to connect to any database.
Hope this helps.
Regards,
/Dirk
Hiii Dirk
Im new to umbraco can u plz provide an example to connect multiple dbs.
thanks
Mahesh
is working on a reply...