Attach Production DB To Test DB

Dear Experts, In Live application, we have changed the manager user password. But in test environment both user id and password are manager-manager. Please suggest me how to attach live db to test environment.

Please let me know, if any query.

… what? can you try to reword that it doesn’t make a lot of sense.

Do you mean like, with duct tape?

1 Like

In all seriousness, I think you’re asking how can you make a copy of your production environment and use it for testing purposes. If this is the case, you can simply restore a .bak of your database to a new database name such as EpicorTest and then update the connection strings in your web.config for your test application server to point to the test database location.

dear josephmelloer, Yes. I want to make a copy of production environment and use it for testing purposes.

Do you already have a test application server, or not yet?

can you please let me know, how to change connection string in web config file?

Yes, We have already test server. Both Production and Test application and database on same server.

You can do this in the Admin Console and it is well documented in the Epicor documentation
Epicor Admin Guide
https://epicweb.epicor.com/doc/Docs/Epicor10_techrefSystemAdministration_102300.pdf#search=Administration

Epicor Install Guide etc.

Please have a look there.

1 Like

@josecgomez is correct. It really benefits you to understand how these connections are made per the tech reference guide.

Within the web.config there is a section called <connectionStrings>.
In here, there is a connection string for your IceContext and your ErpContext that needs to point to your test database.

It should be something like this:

<add name="IceContext" connectionString="metadata=res://Ice.Data.Model/IceContext.csdl|res://Ice.Data.Model/IceContext.ssdl|res://Ice.Data.Model/IceContext.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=YOURTESTDBINSTANCE;Initial Catalog=YOURTESTDBNAME;User ID=YOURSQLDBUSER;Password=YOURSQLDBPW;Min Pool Size=100;Max Pool Size=2000;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
<add name="ErpContext" connectionString="metadata=res://Erp.Data.910100/ErpContext.csdl|res://Erp.Data.910100/ErpContext.ssdl|res://Erp.Data.910100/ErpContext.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=YOURTESTDBINSTANCE;Initial Catalog=YOURTESTDBNAME;User ID=YOURSQLDBUSER;Password=YOURSQLDBPW;Min Pool Size=100;Max Pool Size=2000;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />