myDataBase
and
myUsername and myPassword are what you've already specified in the
control panel under MSSQL databases. myServerAddress can be 'localhost'
or you may need to specify '.\SQLEXPRESS'
Lastly,
if you are not sure how to use that in context of the code, you may use
this sample code:
If you restored the database on the new server, first check if your user has enough rights. Server can also be an ip like in your original connectionstring, it does necessarily need to be localhost or .\SQLEXPRESS, it depends on your server settings. If you restored your database than your password and userid would probably remain the same, so you probably want to change that too then in your new connectionstring.
everything between brackets needs to be replaced with your servervalue (including the brackets itself)
<add key="umbracoDbDSN" value="server=[your server name or ip];database=[your database name];user id=[user id with rights to your database];password=[password of the user id]" />
Connection String Help
OK - I have moved servers and cannot figure out the connection string to use for umbraco.
This is their KB article on the matter:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please use the following connection string on our Windows 2008 servers to connect to the local MSSQL service:
Another method is to use the Provider= line like so:
Where:
myDataBase and myUsername and myPassword are what you've already specified in the control panel under MSSQL databases. myServerAddress can be 'localhost' or you may need to specify '.\SQLEXPRESS'
Lastly, if you are not sure how to use that in context of the code, you may use this sample code:
connect = "Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;UID=USERNAME; PWD=PASSWORD; database=DB;"
strConnString.ConnectionString = connect
strConnString.Open
I have tried the following with the articles above
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=dbumbraco;user id=dbsite;password=pass" />
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;user id=dbsite;password=pas" />
<add key="umbracoDbDSN" value="server=localhost;database=dbumbraco;user id=dbsite;password=pass" />
<add key="umbracoDbDSN" value="server=localhost;user id=dbsite;password=pass" />
Hi Tye,
If you restored the database on the new server, first check if your user has enough rights. Server can also be an ip like in your original connectionstring, it does necessarily need to be localhost or .\SQLEXPRESS, it depends on your server settings. If you restored your database than your password and userid would probably remain the same, so you probably want to change that too then in your new connectionstring.
everything between brackets needs to be replaced with your servervalue (including the brackets itself)
good luck!
Perfect Gerty - thanks very much :)
is working on a reply...