SQL Server System stored procedures

Source: Internet
Author: User

1.

Execute sp_databases queries all current database approximate information (name, size, etc.)

2.

exec sp_helpdb [MySchool] Returns all the details of the database (database size, location, filegroup, owner, log size, location, etc.), displaying all database information without parameters

3.

exec sp_renamedb ' old_name ', ' new_name ' modifies the database name, the previous parameter is the old name, and the following parameter is the new name

4.

exec sp_tables [grade] View table information

5.

EXEC columns Table name view column information, must have table name parameter

6.

exec sp_help objname objname The name of an object of any user-defined data type in the sysobjects type or systypes table, and returns the result set as summary information for all types of objects.

7.

EXEC sp_helpconstraint Student--Query all constraints of the current table, must be located to the corresponding database

8.

EXEC sp_helpindex objname--Query the index of a user-defined table or view, objname a qualified or unqualified name for a user-defined table or view, you must navigate to the appropriate database

9.

EXEC sp_stored_procedures-Displays a list of stored procedures with default values, default NULL to display all stored procedures

10.

exec sp_password @old = ', @new = 1234--Change the password for the current login, @old default to NULL, @new No default value, you must specify

11.

EXEC sp_helptext Vw_studentinfo[usp_getscore]--Displays the actual text of a stored procedure that is not encrypted by default, or a user-defined view (vw_studentinfo), stored procedure (usp_getscore) or trigger actual text

SQL Server System stored procedures

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.