Msdeeleasea installation

zhaozj2021-02-16  45

Step 1: Installation

1. Open the command prompt window.

2. Under the command prompt, use the CD command to navigate to the folder containing the MSDE 2000 RELEASE A installation utility:

CD c: / msderela

Where c: / msdeela is a path to the folder stored by MSDE 2000 Release A to decompress file.

3. Do one of the following commands:

A. To install as the default instance name, and use "Windows user authentication mode", execute:

Setup sapwd = "astrongsapwd"

Where the AstrongSAPWD is the password that will be specified to the SA login.

B. To install the specified instance name, use "Windows user authentication mode", execute:

Setup instanceName = "instancename" sapwd = "astrongsapwd"

Where the AstrongSAPWD is a password that will be specified to the SA login, and instanceName is the name to be specified to the execution instance.

Note: After you have installed a SQL Server, you have to set the instance name when you continue to install MSDE.

C. To install as the default instance name, and use "mixed mode", execute:

Setup sapwd = "astrongsapwd" SecurityMode = SQL

Where the AstrongSAPWD is the password that will be specified to the SA login.

D. To install the specified instance name, use "Mixing Mode", execute:

Setup instancename = "instancename" securitymode = SQL SAPWD = "astrongsapwd"

Where the AstrongSAPWD is a password that will be specified to the SA login, and instanceName is the name to be specified to the execution instance.

Note: After you have installed a SQL Server, you have to set the instance name when you continue to install MSDE.

Step 2: Test if the installation is successful

Test, command line execution

C: /> OSQL -S Machine Name / Instance Name -U SA Enter the next prompt, enter your password.

Password 1111

Then enter 1> prompt, at this time, you can knock some SQL to test.

Use [master]

Go

Select * from [sysusers]

Go

System user records should be found.

Step 3: OSQL This command line tool to manage MSDE

1. Create a new landing user

Verify with Windows,

sp_grantlogin

E.g:

EXEC SP_GRANTLOGIN 'User Name'

SQL Server Verification

sp_addlogin

E.g:

EXEC SP_ADDLOGIN 'User Name,' Password '

Only users with the sysadmin / securityadmin role can run the sp_grantlogin / sp_addlogin this stored procedure.

2. The user name above can only log in to the server, and the database cannot be operated.

Only users with sysadmin / db_accessadmin / db_owner role can run sp_grantdbaccess

Sp_grantdbaccess

EXEC SP_GRANTDBACCESS 'WINDOW User Name', 'User Name'

3. Change your password

Exec sp_password 'old password', 'New Password', 'Username' Users who have sysadmin roles can change the password of other users, and general users can only modify their passwords.

4. Create a database

Create Database Test (Database Name)

Users with the sysadmin / dbcreator role can do this.

5. Backup, restore the database

Backup

Backup Database MyDB to Disk = 'c: /msde/backup/mydb.bak'

Backup log mydb to disk = 'c: /msde/backup/mydb_log.bak'

Users who have the sysadmin / db_owner / db_backupopopertor role can do this.

restore

RESTORE DATABASE MYDB from FROM Disk = 'c: /msde/backup/mydb.bak'

Users who have Sysadmin / DBCREATOR / DBO roles can do this.

6. Additional and separation database

Separate the database: You can separate the database from the instance of the current SQL Server server.

EXEC SP_DETACH_DB 'MYDB'

Users who have sysadmin roles can do this.

Additional Database: .mdf, .ldf These two files are required, the following statement can be attached to the current system to generate a new database.

EXEC SP_ATTACH_DB @dbname = n'mydb ',

@ filename1 = n'c: /msde/backup/mydb.mdf ',

@ filename2 = n'c: /msde/backup/mydb.ldf '

The upper uppercase letter N is the prefix of the Unicode string constant. The prefix "N" is defined in the SQL-92 standard.

转载请注明原文地址:https://www.9cbs.com/read-26116.html

New Post(0)