• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

Creating and connecting of the copy of MSSQL database to a WEB Application


I need some step by step instructions with MSSQL Driven WebApp.
I think it is a couple steps solution however I would need some help with it, please:

I have a Virtual Dedicated Server with Windows server 2008 R2 and SQL Server Management Studio 2008 R2 and it is accessible with Remote desktop connection.

There is a web based app which is fully connected to MSSQL database on the same server. The app is fully functional, no issues with that. The website is built in .NET (I think 3.5 or 4.0).

Database name: ABCApp
User which is used for connection: sa (system admin)

The connection string is
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCApp;User ID=sa;Password= ABCAppPassword" />

I would like to create a copy of the ABCApp and a copy of the LIVE database for a parallel (beta) development. The copy has to be 100% disconnected from the live version.

I created a separate hosting and placed all the files on the same Virtual Dedicated Server already and it is working perfectly, however it uses the LIVE database.

Since I have no experience with MSSQL I would like to ask what would be the next step by step instructions to make the BETA version of ABCApp run with a BETA version of the database (which needs to be created and connected to the BETA version of ABCApp

If you need any additional info please let me know.

Thank you for your help.
  • 3
  • 2
2 Solutions
if you hostings are on the same server it will be using the live database, change the name of the database for the dev instance ABCAppDEV and amend the connection string accordingly
mimarkAuthor Commented:

Thank you for your reply

- I created a new database with the name ABCAppDEV (by restoring from the backup of the live database)
- Created a new user with the name BETA
- Modified the connection string from:
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCApp;User ID=sa;Password= SaUserPassword" />
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCAppDEV;User ID=beta;Password= BetaUserPassword" />
And still it didn't work

Actually, I experimented for a bit and looked into the User Mapping for BETA user and for the DEV database was activated following:

I activated one more

and it seems to be working.

A couple tiny questions (to confirm):
- was everything done correctly? Did I need to change the name to <add name="ABCAppDEV"
- do I have rename Instance name for ABCAppDEV database?
- Is it everything I needed to do?
- Are this right permissions for the BETA user? Is it not too much?
- Should I enable or disable anything?

The most important for me is that this BETA user will not be able to access any other databases on the SQL server or have access to any other settings or anything else on SQL server.

Could you please confirm that everything is correct?

If it is then I will close the question as solved and award points.

Thank you
mimarkAuthor Commented:
Seems to be working, please see edited reply above.
Thank you
the surest way to do that is create a beta username and password, that only has access to the beta database, use the beta credentials in the connection string you use on the beta site
mimarkAuthor Commented:
Thank you for your help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now