An error occurred while installing CommunityServer2.1

Source: Internet
Author: User
Tags management studio microsoft sql server management studio sql server management sql server management studio

I plan to know about CommunityServer, So I downloaded a 2.1 version today. But it's a big deal! Some errors occur during the process.

Problems encountered during SQL Execution

In this process, follow the instructions in SqlScripts/HOW_TO_SETUP_DATABASE.txt step by step. An error occurs when the first step is taken! Error message:

Error

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema, sys, or yourself.

I found this error on the Internet and saw the description at. NET:

Jun. NET

Check the installation SQL script, which is caused by the following SQL:

declare @command nvarchar(4000)set @command = 'grant execute on [dbo].aspnet_RegisterSchemaVersion to '_
+ QUOTENAME(user)exec (@command)

This line of code, depending on the logic, should be to assign permissions to yourself.
There is no problem in writing this in SQL 2000, and an error occurs in SQL 2005.
However, this error is negligible. Because it does not affect our other logic.

Due to its limited level, ignore it.

I also mentioned the error 2.0 when installing MySQL 2.1. I did not have this problem, but I recorded it by the way:

Jun. NET

In addition, if you are running the SQL 2005 database-based Community Server 2.0 site, if you find that some stored procedures are reported by the execution permission, run the following SQL script to fix this known BUG. This BUG is said to be fixed only in Community Server 2.1.

grant execute on dbo.cs_BlogActivityReportAggregate_Get to publicgrant execute on dbo.cs_UserActivityReportRecords_Get to publicgrant execute on dbo.cs_Content_GetList to publicgrant execute on dbo.cs_PostAttachment_Delete to publicgrant execute on dbo.files_Entries_GetEntries to publicgrant execute on dbo.cs_PostAttachment_ToggleTemporary to publicgrant execute on dbo.cs_PostAttachment_Add to public

Trial Run

Configure the web. after configuring the virtual directory in IIS and then typing http: // localhost/cs in the address bar, I waited for a long time and got an error:

Error

An error occurred while establishing a connection with the server. When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server)

I have encountered this problem before, but I found that the remote connection of SQL Server2005 was activated, and this problem was encountered again, but it can be ruled out as a remote connection problem, what is the connection field problem? I have modified the connection string in web. config! However, the search results tell me that this error is mostly caused by the connection string. Let's look at the settings and we can see the problem:

<ConnectionStrings>
<Add name = "SiteSqlServer" connectionString = "server =. \ SQLEXPRESS; uid = cs; pwd = 123456; database = CommunityServer"/>
</ConnectionStrings>

<Deleetask>
<Add key = "SiteSqlServer" value = "server = (local); uid = cs; pwd = 123456; database = CommunityServer"/>
<Add key = "SiteSqlServerOwner" value = "dbo"/>
</AppSettings>

I found that in the key = "SiteSqlServer" in <etettings>, I forgot to modify its server value, so I changed server = (local) to server =. \ SQLEXPRESS. Now OK? I want ......

Click Refresh, wait, and the result is an error again!

Error

Critical Error: Data Store Unavailable

The data store used by Community Server cannot be opened.

Please ensure that your database is online and running and that the connection string in your web. config file is correct

Key error-Invalid Data Storage ?! Then I gave some guiding opinions after this error:

Tips

To configure your connection string:
1. Open [Install Location of Community Server] \ web. config

2. Within web. config find the configuration section (Highlighted) Below:

<configuration> <appSettings><add key="SiteSqlServer" value="[Your connection string here]" > </appSettings></configuration>

3. Modify the value to properly identify your database.

For example, to connect to a database named CommunityServer on the current machine with an account csSystem and the password pa $ word12:

  connectionString = "server=.;database=CommunityServer;
                                       uid=csSystem;pwd=pa$$word12"

However, this key = "SiteSqlServer" has just been changed. There will be no errors! After searching, the majority of cases are described to check the correctness of the connected strings. However, we can see a very important one:

Tips

If you use a database account-based untrusted connection method, make sure that the connectionstring in web. config is correct.
If you use the trusted connection method, you must first assign the db_owner role to the database for the login name to connect to the database in SQL Server, and ensure that the connectionstring in web. config is correct.

In Microsoft SQL Server Management Studio, db_owner is assigned to cs. Originally, only db_datareader, db_datawriter, db_ddladmin, db_securityadmin, and public are available. Because there is such a section in SqlScripts/HOW_TO_SETUP_DATABASE.txt:

Tips

-Note: At a minimum, Community Server will required the following database roles:
Db_securityadmin
Db_ddladmin
Db_datareader
Db_datawriter

However, this error occurs when you configure minimum, and add a db_owner.

Ah! Finally succeeded! Let's see the effect.

 

If you encounter a similar error, I hope this article will serve as a reference.

All content in this Blog is provided as "the status quo" without any guarantee and no rights are granted.
This posting is provided "as is" with no warranties, and confers no rights.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.