MSSQL2000 Security Settings graphic tutorial

Source: Internet
Author: User

MSSQL2000 Security Settings

How to create an independent account database on SQL server 2000

First, start the SQL server 2000 database, open the Enterprise Manager to connect to the database we use, find the database options, and right-click on the top to choose new database, as shown in. When creating a database, you can set the physical storage location of data files in data files and Event Logs.

Then, we can find the logon item in security and right-click the item above, as shown in. We set his default database to the database we just created. If the system is English, set the character set of SQL server to Chinese_PRC_CI_AS.

Then, map the account to the database to limit the scope of the database account.


Warning do not assign a server role to the database. You only need to assign the public and db_owner roles to the database.

The database has been created. Remember the account and password you set and fill them in the program configuration file. If there is a security issue in the stored procedure, copy it to "SQL query analyzer" and click "query" -- "execution" on the menu to delete the SQL process with security issues.
Copy codeThe Code is as follows:
Use master
EXEC sp_dropextendedproc 'xp _ export shell'
EXEC sp_dropextendedproc 'SP _ OACreate'
EXEC sp_dropextendedproc 'SP _ OADestroy'
EXEC sp_dropextendedproc 'SP _ oageterrorinfo'
EXEC sp_dropextendedproc 'SP _ oagetproperties'
EXEC sp_dropextendedproc 'SP _ oamethod'
EXEC sp_dropextendedproc 'SP _ oasetproperties'
EXEC sp_dropextendedproc 'SP _ oastop'
EXEC sp_dropextendedproc 'xp _ regaddmultistring'
EXEC sp_dropextendedproc 'xp _ regdeletekey'
EXEC sp_dropextendedproc 'xp _ regdeletevalue'
EXEC sp_dropextendedproc 'xp _ regenumvalues'
EXEC sp_dropextendedproc 'xp _ regread'
EXEC sp_dropextendedproc 'xp _ regremovemultistring'
EXEC sp_dropextendedproc 'xp _ regwrite'
Drop procedure sp_makewebtask

Change the default SA null password. do not use the SA account for database links. A single database has a separate account. only grant the public and db_owner permissions. for automatic database backup, click "program" in "start", click "Microsorft SQL Server" to open "Enterprise Manager", open the interface, and right-click "zbintel117_all ", select "all tasks" and then "Maintenance Plan ".

If you click "finish", the SQL Server Agent service is stopped. You must enable the SQL Server Agent service.

Enable the "SQL Server Agent" Service


Copy codeThe Code is as follows:
The following content comes from the network for reference only.
Exec sp_dropextendedproc 'xp _ regdelete'
Exec sp_dropextendedproc 'xp _ regenums'
The content is different from the above.
Command to delete SQL extensions

Use master
Exec sp_dropextendedproc 'xp _ export shell'
Exec sp_dropextendedproc 'xp _ dirtree'
Exec sp_dropextendedproc 'xp _ enumgroups'
Exec sp_dropextendedproc 'xp _ fixeddrives'
Exec sp_dropextendedproc 'xp _ loginconfig'
Exec sp_dropextendedproc 'xp _ enumerrorlogs'
Exec sp_dropextendedproc 'xp _ getfiledetails'
Exec sp_dropextendedproc 'SP _ OACreate'
Exec sp_dropextendedproc 'SP _ OADestroy'
Exec sp_dropextendedproc 'SP _ oageterrorinfo'
Exec sp_dropextendedproc 'SP _ oagetproperties'
Exec sp_dropextendedproc 'SP _ oamethod'
Exec sp_dropextendedproc 'SP _ oasetproperties'
Exec sp_dropextendedproc 'SP _ oastop'
Exec sp_dropextendedproc 'xp _ regaddmultistring'
Exec sp_dropextendedproc 'xp _ regdeletekey'
Exec sp_dropextendedproc 'xp _ regdelete'
Exec sp_dropextendedproc 'xp _ regenums'
Exec sp_dropextendedproc 'xp _ regread'
Exec sp_dropextendedproc 'xp _ regremovemultistring'
Exec sp_dropextendedproc 'xp _ regwrite'
Drop procedure sp_makewebtask
Go

Restore the extended stored procedure and execute the following statement.
As for the storage process sp_makewebtask, you can copy a script from someone else,
The stored procedure generated after execution can also be used.

Use master
Exec sp_addextendedproc xp_cmdshell, 'xp _ cmdshell. dll'
Exec sp_addextendedproc xp_dirtree, 'xpstar. dll'
Exec sp_addextendedproc xp_enumgroups, 'xp log70. dll'
Exec sp_addextendedproc xp_fixeddrives, 'xpstar. dll'
Exec sp_addextendedproc xp_loginconfig, 'xplog70. dll'
Exec sp_addextendedproc xp_enumerrorlogs, 'xpstar. dll'
Exec sp_addextendedproc xp_getfiledetails, 'xpstar. dll'
Exec sp_addextendedproc sp_OACreate, 'odsole70. dll'
Exec sp_addextendedproc sp_OADestroy, 'odsole70. dll'
Exec sp_addextendedproc sp_OAGetErrorInfo, 'odsole70. dll'
Exec sp_addextendedproc sp_OAGetProperty, 'odsole70. dll'
Exec sp_addextendedproc sp_OAMethod, 'odsole70. dll'
Exec sp_addextendedproc sp_OASetProperty, 'odsole70. dll'
Exec sp_addextendedproc sp_OAStop, 'odsole70. dll'
Exec sp_addextendedproc xp_regaddmultistring, 'xpstar. dll'
Exec sp_addextendedproc xp_regdeletekey, 'xpstar. dll'
Exec sp_addextendedproc xp_regdelete, 'xpstar. dll'
Exec sp_addextendedproc xp_regenums, 'xpstar. dll'
Exec sp_addextendedproc xp_regread, 'xpstar. dll'
Exec sp_addextendedproc xp_regremovemultistring, 'xpstar. dll'
Exec sp_addextendedproc xp_regwrite, 'xpstar. dll'

The preceding statements are automatically generated.
If you are interested, take a look at the following statements. The preceding statements are generated in this way.
Because the Extended Stored Procedure on my machine is not dropped, the above statements can be generated.

Create table # temp (name varchar (100), dll varchar (100 ))

Truncate table # temp

Insert into # temp
Exec sp_helpextendedproc 'xp _ Your shell'
Insert into # temp
Exec sp_helpextendedproc 'xp _ dirtree'
Insert into # temp
Exec sp_helpextendedproc 'xp _ enumgroups'
Insert into # temp
Exec sp_helpextendedproc 'xp _ fixeddrives'
Insert into # temp
Exec sp_helpextendedproc 'xp _ loginconfig'
Insert into # temp
Exec sp_helpextendedproc 'xp _ enumerrorlogs'
Insert into # temp
Exec sp_helpextendedproc 'xp _ getfiledetails'
Insert into # temp
Exec sp_helpextendedproc 'SP _ OACreate'
Insert into # temp
Exec sp_helpextendedproc 'SP _ OADestroy'
Insert into # temp
Exec sp_helpextendedproc 'SP _ oageterrorinfo'
Insert into # temp
Exec sp_helpextendedproc 'SP _ oagetproperties'
Insert into # temp
Exec sp_helpextendedproc 'SP _ oamethod'
Insert into # temp
Exec sp_helpextendedproc 'SP _ oasetproperties'
Insert into # temp
Exec sp_helpextendedproc 'SP _ oastop'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regaddmultistring'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regdeletekey'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regdelete'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regenums'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regread'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regremovemultistring'
Insert into # temp
Exec sp_helpextendedproc 'xp _ regwrite'

Select 'exec sp_addextendedproc' + name + ', ''' + dll + ''''
From # temp

Related Article

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.