Hello all !
I´m using multiple databases on my project defining it in xml schema tag :
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" schema="BD_2.dbo" assembly="BLL" namespace="BLL">
And in my config I have:
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=Persist Security Info=False;user id=xxx; PWD=xxx;Initial Catalog=DB_1;Data Source=SERVER\DEV</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="show_sql">true</property>
<property name="use_reflection_optimizer">true</property>
<property name="bytecode.provider">lcg</property>
<mapping assembly="BLL"/>
</session-factory>
</hibernate-configuration>
All works fine, because my user xxx have access to both database (DB_1 and DB_2) ...
But, I need two different users ... How can I configure that?
cya