Structured Query Language (SQL) - Cultural View of Technology
Structured Query Language (SQL) - Cultural View of Technology Structured Query Language (SQL) - Cultural View of Technology
Data Manipulation Language 36 See also • Data Definition Language • Data Control Language References • "The SQL92 standard" [4] . [1] SQL92 [2] SQL92 4.22.2, SQL-statements classified by function [3] "Data Manipulation Language Statements" (http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm#i18503). Oracle. . "Data manipulation language (DML) statements query or manipulate data in existing schema objects." [4] http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt Database Console Commands (Transact-SQL) The Database Console Commands (DBCC) are a series of statements in Transact-SQL programming language to check the physical and logical consistency of a Microsoft SQL Server database. [1] . These commands are also used to fix existing issues [1] . They are also used for administration and file management. [2] DBCC was previously expanded as Database Consistency Checker. [3] Categories of DBCC Commands Based on their uses, DBCC commands are made of three categories of statements. They are: Category Uses Commands Maintenance statements Maintenance tasks DBCC DBREINDEX, DBCC DBREPAIR, DBCC INDEXDEFRAG, DBCC SHRINKDATABASE, DBCC SHRINKFILE, DBCC UPDATEUSAGE, DBCC CLEANTABLE, DBCC DROPCLEANBUFFERS, DBCC FREEPROCCACHE Status statements Status checks DBCC INPUTBUFFER, DBCC OPENTRAN, DBCC OUTPUTBUFFER, DBCC Validation statements Miscellaneous statements PROCCACHE, DBCC SHOWCONTIG, DBCC SHOW_STATISTICS, DBCC SQLPERF, DBCC TRACESTATUS, DBCC USEROPTIONS Validation operations on a database DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKCONSTRAINTS, DBCC CHECKDB, DBCC CHECKFILEGROUP, DBCC and database components such as table, [1] CHECKIDENT, DBCC CHECKTABLE, DBCC NEWALLOC index, file catalog, etc. Miscellaneous tasks DBCC dllname (FREE), DBCC HELP, DBCC PINTABLE, DBCC ROWLOCK, Source: MSDN Transact-SQL Reference (SQL Server 2000) DBCC TRACEOFF, DBCC TRACEON, DBCC UNPINTABLE
Database Console Commands (Transact-SQL) 37 Operation of DBCC statements DBCC DBREINDEX This statement is used to recreate the indexes for a particular table. [4] This statement rebuilds indexes in a single step. [5] It also assigns fresh pages to reduce internal and external fragmentation. [5] DBCC DBREPAIR This statement is used to drop or delete a damaged database [6] . However, this command is no longer available with Microsoft SQL Server 2005 and later versions of Microsoft SQL Server [7] . Instead, it has been replaced by the DROP DATABASE Transact-SQL statement [7] DBCC INDEXDEFRAG This statement is used to defragment the clustered and secondary indexes associated with the particular table. [8] The index defragmentation is carried out using the fill factor specified at the time of creation of indexes. [9] While its operation is strikingly similar to that of DBCC DBREINDEX, unlike DBCC INDEXFRAG it does not allow new fill factor to be specified. [9] DBCC SHRINKDATABASE This statement is used to reduce the size of a database [10] . This statement reduces the physical size of the database log file [11] [12] . An alternate way to shrink a database is to use the commander ALTER DATABASE. [13] DBCC SHRINKFILE This statement is used to reduce the size of a data file or log file of a particular database. [14] [15] The file could also be shrunk by using the SHRINKFILE attribute of the ALTER DATABASE command. [13] DBCC UPDATEUSAGE This statement is used to correct inaccuracies in the page and row statistics in the views. [16] DBCC CLEANTABLE This statement is used to remove spaces occupied by columns when they are removed. [17] . This feature is not available with Micrcosoft SQL Server 2000 and has been newly introduced in Microsoft SQL Server 2005 [17] DBCC DROPCLEANBUFFERS This statement is used to drop clean buffers from the buffer pool. [18] This feature is not available with Micrcosoft SQL Server 2000 and has been newly introduced in Microsoft SQL Server 2005 [18] DBCC FREEPROCCACHE This statement is used to remove all elements from the procedure cache. [19] This feature is not available with Micrcosoft SQL Server 2000 and has been newly introduced in Microsoft SQL Server 2005 [19] DBCC INPUTBUFFER This statement is used to display the last statement stored in the buffer. [20]
- Page 1 and 2: Structured Query Language (SQL) SQL
- Page 3 and 4: Nested SQL 72 Object-oriented SQL 7
- Page 5 and 6: SQL 1 SQL Paradigm Multi-paradigm A
- Page 7 and 8: SQL 3 result set. SELECT * FROM Boo
- Page 9 and 10: SQL 5 • MERGE is used to combine
- Page 11 and 12: SQL 7 REVOKE SELECT, UPDATE ON My_t
- Page 13 and 14: SQL 9 2008 SQL:2008 Legalizes ORDER
- Page 15 and 16: SQL 11 [9] ANSI/ISO/IEC Internation
- Page 17 and 18: SQL:2003 13 [11] http://www.iso.org
- Page 19 and 20: Advantage Database Server 15 • Sm
- Page 21 and 22: Call Level Interface 17 Call Level
- Page 23 and 24: Check Constraint 19 Check Constrain
- Page 25 and 26: Commit (data management) 21 Commit
- Page 27 and 28: Correlated subquery 23 Correlated s
- Page 29 and 30: CUBRID 25 Linux Foundation Silver S
- Page 31 and 32: CUBRID 27 References [1] http://www
- Page 33 and 34: Cursor (databases) 29 Scrollable cu
- Page 35 and 36: Cursor (databases) 31 Disadvantages
- Page 37 and 38: Data Definition Language 33 Data De
- Page 39: Data Manipulation Language 35 Data
- Page 43 and 44: Database Console Commands (Transact
- Page 45 and 46: Database Console Commands (Transact
- Page 47 and 48: DbForge Studio for MySQL 43 • Dat
- Page 49 and 50: Declarative Referential Integrity 4
- Page 51 and 52: Devgems Data Modeler 47 External li
- Page 53 and 54: Embedded SQL 49 External links •
- Page 55 and 56: EnterpriseDB 51 EnterpriseDB also o
- Page 57 and 58: Epictetus Database Client 53 Extern
- Page 59 and 60: Foreign key 55 SET NULL The foreign
- Page 61 and 62: FSQL 57 Comparator for Possibility
- Page 63 and 64: Hint (SQL) 59 Hint (SQL) In various
- Page 65 and 66: HSQLDB 61 Transaction support HSQLD
- Page 67 and 68: MaxDB 63 MaxDB Stable release 7.6.0
- Page 69 and 70: Meta-SQL 65 Meta-SQL 'Meta-SQL' Use
- Page 71 and 72: MySQL Workbench 67 MySQL Migration
- Page 73 and 74: MySQL Workbench 69 [14] MySQL Workb
- Page 75 and 76: Navicat 71 Free version Navicat Lit
- Page 77 and 78: PL/pgSQL 73 PL/pgSQL PL/pgSQL (Proc
- Page 79 and 80: PL/SQL 75 User-defined exceptions a
- Page 81 and 82: PL/SQL 77 A selection of other data
- Page 83 and 84: PL/SQL 79 Array handling PL/SQL ref
- Page 85 and 86: PL/SQL 81 Similar languages PL/SQL
- Page 87 and 88: Query optimizer 83 Join ordering Th
- Page 89 and 90: Query plan 85 Query plan A query pl
Database Console Commands (Transact-<strong>SQL</strong>) 37<br />
Operation <strong>of</strong> DBCC statements<br />
DBCC DBREINDEX<br />
This statement is used to recreate the indexes for a particular table. [4] This statement rebuilds indexes in a single<br />
step. [5] It also assigns fresh pages to reduce internal and external fragmentation. [5]<br />
DBCC DBREPAIR<br />
This statement is used to drop or delete a damaged database [6] . However, this command is no longer available with<br />
Micros<strong>of</strong>t <strong>SQL</strong> Server 2005 and later versions <strong>of</strong> Micros<strong>of</strong>t <strong>SQL</strong> Server [7] . Instead, it has been replaced by the<br />
DROP DATABASE Transact-<strong>SQL</strong> statement [7]<br />
DBCC INDEXDEFRAG<br />
This statement is used to defragment the clustered and secondary indexes associated with the particular table. [8] The<br />
index defragmentation is carried out using the fill factor specified at the time <strong>of</strong> creation <strong>of</strong> indexes. [9] While its<br />
operation is strikingly similar to that <strong>of</strong> DBCC DBREINDEX, unlike DBCC INDEXFRAG it does not allow new fill<br />
factor to be specified. [9]<br />
DBCC SHRINKDATABASE<br />
This statement is used to reduce the size <strong>of</strong> a database [10] . This statement reduces the physical size <strong>of</strong> the database<br />
log file [11] [12] . An alternate way to shrink a database is to use the commander ALTER DATABASE. [13]<br />
DBCC SHRINKFILE<br />
This statement is used to reduce the size <strong>of</strong> a data file or log file <strong>of</strong> a particular database. [14] [15] The file could also<br />
be shrunk by using the SHRINKFILE attribute <strong>of</strong> the ALTER DATABASE command. [13]<br />
DBCC UPDATEUSAGE<br />
This statement is used to correct inaccuracies in the page and row statistics in the views. [16]<br />
DBCC CLEANTABLE<br />
This statement is used to remove spaces occupied by columns when they are removed. [17] . This feature is not<br />
available with Micrcos<strong>of</strong>t <strong>SQL</strong> Server 2000 and has been newly introduced in Micros<strong>of</strong>t <strong>SQL</strong> Server 2005 [17]<br />
DBCC DROPCLEANBUFFERS<br />
This statement is used to drop clean buffers from the buffer pool. [18] This feature is not available with Micrcos<strong>of</strong>t<br />
<strong>SQL</strong> Server 2000 and has been newly introduced in Micros<strong>of</strong>t <strong>SQL</strong> Server 2005 [18]<br />
DBCC FREEPROCCACHE<br />
This statement is used to remove all elements from the procedure cache. [19] This feature is not available with<br />
Micrcos<strong>of</strong>t <strong>SQL</strong> Server 2000 and has been newly introduced in Micros<strong>of</strong>t <strong>SQL</strong> Server 2005 [19]<br />
DBCC INPUTBUFFER<br />
This statement is used to display the last statement stored in the buffer. [20]