[Records of various problems encountered in the project process] deployment chapter -- tangle problems in the project deployment process-sqlserver

Source: Internet
Author: User

The previous article mentioned IIS, which is about sqlserver. Compared with IIS, sqlserver has fewer problems in the configuration process and is more targeted, start record below:

Note: The actual project development is based on SQL2000, so the problems mentioned below are also based on SQL2000.

 

I. Session-related database configuration

Because the customer's servers are all brand new, it is necessary to install a series of environments for the customer's servers. SQL2000 is also essential because sessions are saved to sqlserver in the project, the configuration is as follows:

 
<Sessionstate mode = "sqlserver" sqlconnectionstring = "Data Source = 127.0.0.1; Integrated Security = sspi" timeout = "30"/>

Therefore, you must configure the database as follows:

1. Create an aspstatedata database, open the vscommand prompt tool, and use the aspnet_regsql.exe-ssadd -e( aspaspto use the “aspnet_regsql.exe -?" Check or directly check msdn. I will not go into details here)

2. Because all the websites we develop run on IISProgramBy default, you do not have the permission to access the aspstate database. Therefore, you need to add two user roles, iis_wpg and iuser _ computer name, to the aspstate database and set them as db_owner.

In theory, the problem should be solved. Otherwise, when a website is running, the session will still be used in the same way,This is because the session will be temporarily stored in the tempdb database. Therefore, you also need to add two user roles, iis_wpg and iuser _ computer name..

Together with the solution for session Status Service and lossArticle: ASP. NET Status Service and session loss solution summary [reprinted]

 

2. Database Permissions

Speaking of the tempdb database in the above question, its main function is as follows (from msdn ):

TempdbThe system database is a global resource that can be used by all users connected to the SQL server instance and used to save the following items:

1. explicitly created temporary user objects, such as global or local temporary tables, temporary stored procedures, table variables or cursors.

2. Internal objects created by the SQL Server database engine, for example, worksheets used to store the intermediate results of offline or sorting.

3. Modify the row version generated by the transaction from the data in the database that uses committed read (using row version control isolation or Snapshot isolation transactions.

4. the row version generated by the data modification transaction to implement online index operations, multiple active result sets (MARS), and after triggers.

TempdbThe operation in is the minimum logging operation. This will cause the transaction to roll back. Every time SQL Server is started, it will be re-createdTempdbTo keep a clean copy of the database at system startup. When the connection is closed, temporary tables and stored procedures are automatically deleted, and no active connections are established after the system is closed. ThereforeTempdbNO content is saved from one SQL Server session to another. Do not allowTempdbBackup and Restore operations.

One sentence is critical:Tempdb is created every time you start SQL Server,Therefore, this is a big problem, that is, when the server is restarted or the database is restarted, the user role previously added to tempdb disappears (because the tempdb database is re-created ), therefore, when you access the website again, you will find that the session has an error. You need to add two user roles, iis_wpg and iuser _ computer name, to the session again.

 

In other words, if you think this article is useful or valuable, move the cursor over [recommendation] and click it for me. Thank you very much!

 

Records of various problems encountered during the project process

Editor:

FCKeditor related knowledge and various common usage Problems

FCKeditor custom upload path Configuration

Use FCKeditor to generate static paging html

Chart:

Tips on mschart

Good chart selection on ASP.net-funsioncharts

Orm:

Some minor issues with using nhib.pdf to configure object entities

About Nhibernate query Encapsulation

Deployment:

Problems related to project deployment-IIS

The tangled problems during project deployment-sqlserver

Tools:

. Net tool library frequently used for development

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.