我正在尝试将SQL数据库从服务器上的一个数据库切换到另一数据库的本地副本。在我的SQL Server Manager Studio中,我已经从数据库bak文件和固定用户设置中创建并还原了数据库。在我的本地umbraco项目中,连接字符串看起来像这样:
I am trying to switch my SQL database from one on server to local replica of another one. In my SQL Server Manager studio I've created and restored DB from DB bak file and fixed user settings. In my local umbraco project I have connection String that looks like this:
<connectionStrings> <remove name="umbracoDbDSN" /> <add name="umbracoDbDSN" connectionString="server=PCMINJACL2;database=MySites;user id=MySites_user;password=password" providerName="System.Data.SqlClient" /> </connectionStrings>我不确定是否丢失了某些内容,因为每次尝试打开网站时都会得到错误消息: Umbraco无法启动。配置了连接字符串,但Umbraco无法连接到数据库。
I am not sure if I am missing something, because everytime I try to open the site I get this error message: Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database.
任何建议都可以,因为从服务器名到用户名到密码的所有内容都是设置正确的。所以,我不知道为什么它不起作用。
Any suggestions what it can be, because everything from server name to user to password are set to correct ones. So, I have no idea why it is not working. Thanks in forward for any help.
推荐答案因此,在我看来,取代了 server = localhost的是什么?与连接字符串 server = .\; database = ... 的database = ... -它立即开始工作。
so in my case what helped was replacing server=localhost;database=... in connection string with server=.\;database=... - it started to work right away.
更多推荐
切换到本地SQL数据库后,Umbraco无法启动
发布评论