Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > Database Connection String View modes: 
User avatar
Member
Member
Yash - 5/25/2010 10:47:19 AM
   
Database Connection String
Hello,

I was testing CMS on the Test Server with SQl server confituration. Now I setup SQL server on the diffrent machine and also took backup from the Test SQL server and restore it to the New SQL server.

How can change the connection string so that it will use the new SQL server not the old SQL server?

Thanks,
yash

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 5/25/2010 3:35:44 PM
   
RE:Database Connection String
Hello,

The connection string can be changed directly in the web.config file in the section connectionStrings.

Best regards,
Boris Pocatko

User avatar
Member
Member
Yash - 5/25/2010 3:51:12 PM
   
RE:Database Connection String
Thanks Boris,

I change the connection string in web.config file but it's not working. Do I need to change anything else anywhere?

Thanks,
Yash

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 5/25/2010 4:17:07 PM
   
RE:Database Connection String
Hello,

If you change the connection string in the web.config file, Kentico will use the new connection string immediately. Are you changing the connection string in the correct web.config file? Could you please describe your configuration in more detail? A second option on how to deploy your project is described in our documentation.

Best regards,
Boris Pocatko

User avatar
Member
Member
Yash - 5/25/2010 4:25:34 PM
   
RE:Database Connection String
Thanks Boris,

Basically I created new SQL Server and I would like to use that SQL server instead of the current SQL server. So I took the backup of the old SQL server and Restore in to the New SQL server successfully. Now I would like to point CMS to the new SQL server.

So I did the Connection string change directring to the new SQL server and save that web.config file. When I am trying to access the web page it's not finding for some time and than give timed out page.

I would like to separate IIS server and SQL server.

Any more suggestion?

Thanks,
Yash

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 5/31/2010 11:01:07 AM
   
RE:Database Connection String
Hi,

from this description it's not clear, if the timeout is caused by incorrect SQL server logon credentials or if there's some problem in network - like firewall blocking the access to the SQL server...
Could you please check if that's not the cause of the timeouts? Is the SQL server accessible from the webserver, if you try to access it with same name and credentials like defined in web.config?

Regards,
Zdenek

User avatar
Member
Member
JimS - 6/3/2010 3:55:57 PM
   
RE:Database Connection String
Had experienced something like this on another (non-Kentico) project and found the following solution at http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx?PageIndex=4#comments:


Error: 18456, Severity: 14, State: 16 happened on my server when the owner of the files on the file system is not a user in SQL Server. I had the following scenario:

I imported a database, and specified the name of the imported database in a connection string. This failed to connect with the login failed message, but worked when I connected via master and specified "Use Database" within my query as suggested by Il-Sung.

When trying to generate database diagrams I was then told that the database did not have a valid owner, but when I right clicked on the databse properties an owner (sa) was listed. However, when I looked at the files owner, there was none specified.

To correct this problem in SQL Sever 2005, do the following:

1. Open SQL Server Management Studio

2. Expand Databases

3. Right Click on the Database with problems and choose 'Properties'

4. Left Click the 'Files' node

5. Ensure that an appropriate owner is listed, if none is then set it

That resolved the issue with the database that I had this error with.

Hope this helps,
Nick


Hope this helps,
Jim