General SQL Faq

download General SQL Faq

of 4

Transcript of General SQL Faq

  • 8/6/2019 General SQL Faq

    1/4

    General FAQ"S

    1. What is your profile?

    A. The activities that are begin carried out on daily basis are backups, restoration

    Indexing, tunning, replication and logshipping.

    2. How many servers and size of the databases that are you handling?

    A.Say more than 50 servers and size is nearly 250GB

    --------------------------------------------------------------------------------------

    SQL FAQ's

    1.Describe the logical and physical arechitecture of the SQL?

    A.Logical means the data is stored in the pages and extents1page =8kb and 8Pages =1extent

    Physical means the database is defined in the objects

    likes tables,views,triggers,stored procedures

    2.what is Normalization and denormalization?A.Normalization is nothing but removing the redundunt data.Normalization (study)

    6 froms will be there in normalization

    De-normalization is used for generating reports. it will be having all duplicates also

    3. How Many system databases are there?A. Four MAster, MSDB, MODEL and TEMPDB. Study only MASTER AND MSDB indepth all the tables in

    both the databases

    4. What is the size of the master database and how do you restore the Master Database?

    A. There are two ways to restore the Master

    1) By rebuilding the master database

    2) Restoring the master database from the backups that we have.

    5. How many types of locks are there?

    A.Deadlocks, exclusive locks, intent locks, shared locks and other also there i don'tremember

    6. What is 9002 error?A.Say the error states that transactional log full for a database

    7. Wat is Replication and logshipping?

  • 8/6/2019 General SQL Faq

    2/4

    A.Say replication is moving the data to different locations on LAN,WAN and then

    syncronize it.

    log shipping is one and the same thing but here we do the log files.

    DBCC CHECKALLOCChecks the consistency of disk space allocation structures for a specified database

    DBCC CHECKIDENTChecks the current identity value for the specified table and, if needed, corrects the

    identity value

    sp_configureDisplays or changes global configuration settings for the current server.

    Trace flag Description

    260 Prints versioning information about extended stored procedure dynamic-link libraries(DLLs). For more information about __GetXpVersion (), see Creating Extended Stored

    Procedures.1204 Returns the type of locks participating in the deadlock and the current command

    affected.

    2528 Disables parallel checking of objects by DBCC CHECKDB, DBCC

    CHECKFILEGROUP, and DBCC CHECKTABLE. By default, the degree of parallelismis determined automatically by the query processor. The maximum degree of parallelism

    is configured in the same manner as that of parallel queries. For more information, see

    max degree of parallelism Option.Parallel DBCC should typically be left enabled. In the case of DBCC CHECKDB, the

    query processor re-evaluates and automatically adjusts parallelism with each table or

    batch of tables checked. In some cases, checking may commence while the server isvirtually idle. An administrator who knows that the load will increase before checking is

    complete may want to manually decrease or disable parallelism.

    However, disabling parallel checking can cause a decrease in overall database

    performance. Decreasing the degree of parallelism increases the amount of transaction

    log that must be scanned. This in turn increases the demand for tempdb space and results

    in a non-linear increase in the time required for dbcc to complete its checks. If DBCC isrun with the TABLOCK feature enabled and parallelism turned off, tables may be locked

    for longer periods of time.

    3205 By default, if a tape drive supports hardware compression, either the DUMP or

    BACKUP statement uses it. With this trace flag, you can disable hardware compression

    for tape drivers. This is useful when you want to exchange tapes with other sites or tapedrives that do not support compression.

    How to see

  • 8/6/2019 General SQL Faq

    3/4

    How many backups are there?

    4 TypesFull/complete backup

    Differential

    TlogFilegroups

    What is blocking?

    How do you see blcoing?

    Fire/execute sp_who or sp_who2

    What is the error 9002?

    Log file full.

    How do you kill blocking

    kill spid

    Database suspect how to resolve?

    sp_resetstatus db_name

    where do the logins stored on sql server?

    In master database in the table sysxlogins..

    Monitoring... Probe, DBSPI or Sitescope.

    SLA's -- service level agreements.

    serv1,2,3,4

  • 8/6/2019 General SQL Faq

    4/4