windows azure在启动时可能寻找的数据库服务器的名称和实际的不相同,试过网上的很多方法都不行,后来改换到vs2008下成功,不知道为什么,先记录下找到的一些资料吧。
Hi, I have SQL server 2008 installed with instance named as "MSSQLSERVER" and after installingSQL Server 08, i installed VS 08 Team system excluding the sql server 05 express edition, and then I installed the azure SDK and tools for VS 08.
After making a website and running it, I faced a problem that the Dev Storage searches for an SQL Server instance named as SQLExpress .....
Please give me a solution as to how I can change the default instance to MSSQLSERVER ???
1。If your SQL Server 2008 is the default instance, you don't need to specify the name. Just type a dot:
DSInit.exe /sqlInstance:.
In the configuration, also use a single dot:
<add name="DevelopmentStorageDbConnectionString"
connectionString="Data Source=.;Initial Catalog=DevelopmentStorageDb;Integrated Security=True"
providerName="System.Data.SqlClient" />
And specify localhost for the table storage endpoint:
<service name="Table"
url="http://127.0.0.1:10002/"
dbServer="localhost"/>
If you still cannot get it to work, another solution is to run DSInit targeting SQL Express. Then import the DevelopmentStorageDB database to SQL Server 2008. This should also work, and you no longer need to run the DSInit tool. But the configuration file will have to be modified.
You only need to run DSInit once.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
2。You can follow the following steps:
1.) Open C:/Program Files/Windows Azure SDK/v1.0/bin/DevelopmentStorage.exe.config in Notepad
2.) Edit the DevelopmentStorageDbConnectionString to point to your SQL Server instance. By default the connection string is: connectionString="Data Source=./SQLEXPRESS;Initial Catalog=DevelopmentStorageDb;Integrated Security=True"
3.) in place of SQLEXPRESS or put your SQl server name within the file
4.) Save all changes.
上面的方法只能都针对的是sdk 1.0的版本,对于1.2没有上面的那个文件。郁闷。