model database?

  • hi

    i need to create similar database with same tables and stored procedure

    shall i create in model database that may create all tables and sps when i am creting new database

    if any problems give me idea can i get

    with best regards

    pradeep

  • Create scripts for all your objects, then just run the script every time you create a database which needs them objects.

  • if we use model database is thier any problem

    thanks

    with best regards

    pradeep

  • What happens should someone create a database while the objects are still in model? Do you want them in that database or not?

  • what ever we create that database should contain all tables and sps

    for that case we can use model

    thanks

    with best regards

    pradeep

  • if every database you ever create on that server needs the same sp's tables etc, then use model, if they need different ones, use scripts

  • thanks

    is thier any performance issue by creating tables and sp s in model database

    thanks

    with best regards

    pradeep

  • mpradeep23 (1/25/2013)


    is thier any performance issue by creating tables and sp s in model database

    No

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Only upon restart of the service as TempDB is created from model so the objects inside it will also be created in TempDB

    Hence why you should use a script to do what you want to do, otherwise you will get the objects in TempDB.

  • anthony.green (1/25/2013)


    Only upon restart of the service as TempDB is created from model so the objects inside it will also be created in TempDB

    Hence why you should use a script to do what you want to do, otherwise you will get the objects in TempDB.

    I frequently wish we could vote up answers here. This one deserves a +50

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 10 posts - 1 through 9 (of 9 total)

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