Академический Документы
Профессиональный Документы
Культура Документы
Master DB stores information regarding all other databases, Logins, Devices, etc. It keeps track of all the databases. It has nearly 32 system tables. Some of them are syslogins, sysdb, sysdevices,sysroles, sysprocess, etc. Server wide details are stored in here. It is the heart of the Server. Model DB Is the template for all the databases, excluding the Master. Temp DB can be referred as a workspace for the users to perform operations. Itis a volatile memory, so whenever the server is rebooted, it has to be recreated using the template from Model DB SYBSYSTEMPROCS DB stores all the system procedures
DATA
TABLE
EXTENT
PAGES 2K,4K,16K
0 8
1 9
2 10
3 11 . . .
4 12
5 13
6 14
7 15
248
250
251
252
253
254
255
. ..
DATABASE
ADPATIVE SERVER
DATABASE
DEVICE
SEGMENTS
PHYSICAL NAME
ALLOCATION UNIT
LOGICAL NAME
EXTENTS
PAGES
SEGEMENTS
SYSTEM
USER
SYSTEM- system tables for a particular database LOG- All data modifications in the database are temporarily
stored temporary in the log
bcp --- take a backup copy of the objects and then copy them back to new segment clustered index --- By recreating a clustered index for the object on new object sp_placeobject --- It moves the next coming up objects to the new segment
Why indexes are needed ..?? What is HOT SPOT & HEAP TABLE .?? Now if we don t have Indexes in DB then .?? Types of Indexes ??
Format - Root page, Intermediate, Data/Leaf Pages SYSINDEXES table
SELECT
STATEMENT
DATA/LEAF PAGE
INTERMEDIATE
1) 2) 3)
When ever a query is executed it is executed in three phases. Parser -- > checks for the syntactical errors Compiler -- > checks for the query plan in data cache Execute -- > checks for the result in the data cache
During the phases of execution, the single process can change to various states depending on the availability of the i/o, query plan, data, etc. Below are mentioned the possible states of a process.
During the execution of a query, it goes through many phases, which can result as a HIT or a MISS depending on the availability of the data in the cache The below diagrams clearly explain the steps involved during HIT or MISS
STATUS Sleeping
CONDITION
Waiting disk I/O, or some other resource. Probably indicates a process that is running, but doing extensive disk I/O In the queue of runnable processes Actively running on one on the Server engines
Runnable Running