What happens when a database is created???

  • I just wanted to know what exactly happens when a user defined database created??

    Which entries are made in system databases?

    Which new objects are created?

    please help.... I am starting from scratch....

    Sagar Sonawane
    ** Every DBA has his day!!:cool:

  • The model database is copied to form the new DB and the system objects that are the base for sys.databases, sys.master_files and related ones are updated with the new DB and files.

    Why?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • before creating a new database I want to know

    what exactly happens, which objects are used???

    Sagar Sonawane
    ** Every DBA has his day!!:cool:

  • It would help to know in what context you want the answer. Like Gail said; it creates a database using the model database as a template also there are certain switches or keywords as part of the create database command that affect what happens and how.

    Additional entries are created in system table to indicate that creation of the database and the requried files and filegroups etc.

    At the OS level at least 2 files ( 1 mdf and 1 ldf ) are created in the specified/Default location etc.

    Jayanth Kurup[/url]

  • Why are you asking? What's the reasoning here.

    I already told you what objects are involved, the model database and the hidden system tables that sit below the sys.databases and related views.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply