Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to repair after database sorting installation error

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to fix database sorting errors after installation. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. Modify the collation of the database environment

After logging in to the database, there are two ways to view the default collation of the currently installed database

Method 1. After logging in to the database using SQL Server 2012 Management Studio, right-click on the linked database server, click Properties, and click Server Properties-> General-> Server collation.

Figure 2 Database properties

Method 2: in the query analyzer, enter SELECT SERVERPROPERTY ('Collation') to get the server collation

2 View the current installation version of the server database: query Analyzer enter SELECT @ @ VERSION

View database server version

3 Please confirm the current default installation version of the database and the default installation file directory, and record the default installation directory of the database according to your own version.

Serial number

No database version

(Windows Service) default installation directory

1 SQL Server 2008 C:\ Program Files\ Microsoft SQL Server\ 100\ Setup Bootstrap\ Release

2 SQLServer2012 C:\ Program Files\ Microsoft SQLServer\ 110\ Setup Bootstrap\ SQLServer2012

3 SQLServer2014 C:\ Program Files\ Microsoft SQLServer\ 120\ Setup Bootstrap\ SQLServer2014

4 SQLServer2016 C:\ Program Files\ Microsoft SQLServer\ 140\ Setup Bootstrap\ SQLServer2016

4 Open the DOS command line with administrator privileges:

Figure 5 enter the DOS command line

5 use CD + default installation directory path to enter the corresponding version database installation file directory

6. Use Net stop mssqlserver statement to shut down the SQL Server background service

Figure 7 shutting down the SQL Server service

8 run the statement Setup / QUIET / ACTION=REBUILDDATABASE / instancename=MSSQLSERVER / SQLSYSADMINACCOUNTS=administrator / sapwd=bwi@1234 / sqlcollation=Chinese_PRC_CS_AS

Format description:

Setup / QUIET / ACTION=REBUILDDATABASE / INSTANCENAME=InstanceName

/ SQLSYSADMINACCOUNTS=accounts / [SAPWD= StrongPassword]

/ SQLCOLLATION=CollationName)

Note: accounts users use computer administrator users. CollationName is the sort format that needs to be changed.

Figure 9 start the SQL Server service

10 to verify that the collation is in effect, please repeat step 1 to see.

two。 Restore X3 database

Because the master database is rebuilt, it is equivalent to resetting the database environment, so the ERP database has to be restored.

Attach the mdf file of the original X3 database

3. Restore X3 users and associate

Create related accounts for X3, X3_REPORT and Folder

USE [master]

GO

/ * For security reasons the login is created disabled and with a random password. , /

/ * Object: Login [REFRX] Script Date: 19:30:34 on 2020-8-1 * /

CREATE LOGIN [REFRX] WITH PASSWORD=N' examples æ _ words R _ CHECK_POLICY=OFF è T / s / g-â'Y / bi è res *, DEFAULT_DATABASE= [x3pu9], DEFAULT_LANGUAGE= [simplified Chinese], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF

GO

After the user has created it, execute the following command to synchronize the login account of X3, X3_REPORT and the other two Folder accounts

Use database

Go

Exec sp_change_users_login 'update_one',' login user name', 'user name'

The great task has been completed!

Thank you for reading! This is the end of this article on "how to fix database sorting errors". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report