Technology of SQL Server database (48)
Tuesday, March 03, 2009 by rain
7.5.1 examines the attribute of the watch
In Enterprise Manager,Click the watch that should examine attribute with right key,Choose from inside quick menu " attribute (Properties) " option,The attribute dialog box of the watch that if place of graph 7-6 is shown,can appear,The major property information that can see a table from which.What should notice is,What this attribute dialog box and place of graph 7-5 show is different,Its content wants a few less,And cannot revise.Click " Permissions " pushbutton,The attributive that still can be examined and revises a watch.The setting of concerned attributive is referred to please " security and user management " paragraphic.
7.5.2 examines the data in the watch
The watch that should examine attribute is clicked with right key in Enterprise Manager,Choose from inside quick menu " Open Table " child in menu " Return All Rows " ,All data that can show the watch is medium,The dialog box that if place of graph 7-7 is shown,appears.
If from " Open Table " child choose in menu " Return Top... " option,The dialog box that if place of graph 7-8 is shown,can appear,Input a numerical value,The linage that states the data that should examine since the group of the watch goes,In the dialog box that the data that can return a watch by the requirement next shows to place of graph 7-7.Can revise in the dialog box express medium data or add, delete data to go.
7.5.3 stores with the system process Sp_help examines the information of the watch
Of the information that Sp_help stores the process can offer designation database target and system or the data kind that the user defines
Information.Its grammar is as follows:Sp_help [[@objname =] Name]
Process of Sp_help memory is used at current database only,Among them the name that clause of Objname =] Name designates an object.If do not designate object name,Process of Sp_help memory can list of all object name in current database, object possessory the type with the object.But the information need of trigger shows with process of Sp_helptrigger memory.
7.5.4 stores with the system the process examines the tie of the watch
(1) with Sp_helpconstraint memory process examines a tie
The way that Sp_helpconstraint stores the process provided the tie information that examines a watch.Its grammar is as follows;
SyntaxSp_helpconstraint [@objname =] 'table'
[, [@nomsg =] 'no_message' ]
Among them [the name that clause of @objname =] 'table' designates the watch that restrains a place;[Clause of @nomsg =] 'no_message' is optional,The name that is used at printing a list.The data type of No_message is VARCHAR(5) .
Exemple 7-20:The tie information of indication watch Orders.Exec Sp_helpconstraint Orders
(2) with Sp_pkeys memory process is examined advocate key word tie
Sp_pkeys stores the process returns current database middle finger to be expressed surely advocate key word,Its grammar is as follows:Sp_pkeys [@table_name =] 'name'
Exemple 7-21:Of indication watch Orders advocate key word restrains information.Use PanguExec Sp_pkeys Orders
Moving result is as follows:
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
Pangu Dbo Orders Order_id 1 Pk_order_id (1 Row(s) Affected)
(3) tie of the key word outside storing with Sp_fkeys the process is examined
Sp_fkeys stores the process returns current database middle finger to be expressed surely advocate key word,Its grammar is as follows:Sp_fkeys [@table_name =] 'name'
The key word outside showing those who express Products restrains exemple 7-22 information.Exec Sp_fkeys Products
Moving result is as follows:
PKTABLE_QUALIFIER PKTABLE_NAME PKCOLUMN_NAME FKTABLE_NAME FKCOLUMN_NAME FK_NAME PK_NAMETemp Products P_id... Orders P_id... PK_products...