SQL Server 2000 establishing a separate account database method
First we start the SQL Server 2000 database and open Enterprise Manager to connect to the database we use and find the database option, click the right mouse button to select the new database as shown in the following figure. You can set the physical location of data files in data files, and event logs when you build a database
Then we find the entry in security, click on the right mouse button as shown in the following image. We set his default database to the database we just built. If the system is English please set SQL Server's character set to Chinese_prc_ci_as.
The account is then mapped to the database to qualify the database account number.
Warning: We do not assign a server role to the database, only to be given Public,db_owner as shown in the figure.
The database is completed, remember the account number and password you set up and fill in the program configuration file. Stored procedures have security issues, all copied to SQL Query Analyzer click on the menu--"Query"-"execute", you will have a security problem of the SQL process deleted
Copy Code code as follows:
Use master
EXEC sp_dropextendedproc ' xp_cmdshell '
EXEC sp_dropextendedproc ' sp_OACreate '
EXEC sp_dropextendedproc ' sp_OADestroy '
EXEC sp_dropextendedproc ' sp_OAGetErrorInfo '
EXEC sp_dropextendedproc ' sp_OAGetProperty '
EXEC sp_dropextendedproc ' sp_OAMethod '
EXEC sp_dropextendedproc ' sp_OASetProperty '
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. Database links do not use the SA account. Single database to use the account alone. Give public and db_owner permissions only. Automatic backup of database Click "Program" in "Start" and click "Microsorft SQL Server" to open "Enterprise Manager". and open the interface as shown in the picture, right-click "Zbintel117_all", select "All Tasks", and select "Maintenance Plan".
If you click the "Finish" button, the following image appears to indicate that the SQL Server Agent service is stopped and that the SQL Server Agent service should be enabled.
To enable the SQL Server Agent service
Copy Code code as follows:
The following content comes from the network only as a reference, where
exec sp_dropextendedproc ' xp_regdelete '
exec sp_dropextendedproc ' xp_regenums '
The content is different from the above, the actual use of the above text prevail.
command to delete SQL extensions
Use master
exec sp_dropextendedproc ' xp_cmdshell '
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_OAGetProperty '
exec sp_dropextendedproc ' sp_OAMethod '
exec sp_dropextendedproc ' sp_OASetProperty '
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 sp_makewebtask This stored procedure, you can copy it from someone else, a script.
Can be used as a stored procedure that is generated later.
Use master
exec sp_addextendedproc xp_cmdshell, ' Xp_cmdshell.dll '
exec sp_addextendedproc xp_dirtree, ' Xpstar.dll '
exec sp_addextendedproc xp_enumgroups, ' Xplog70.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 above statement is generated automatically.
Interested you can look at the following statement, the above statement is so generated.
Because the extended stored procedure on my machine is not dropped, the statement above can be generated.
CREATE TABLE #temp (name varchar), DLL varchar (100))
TRUNCATE TABLE #temp
INSERT INTO #temp
exec sp_helpextendedproc ' xp_cmdshell '
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_OAGetProperty '
INSERT INTO #temp
exec sp_helpextendedproc ' sp_OAMethod '
INSERT INTO #temp
exec sp_helpextendedproc ' sp_OASetProperty '
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