Re: create db

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 04/24/04

  • Next message: Mary: "Table Corrupt"
    Date: Sat, 24 Apr 2004 19:32:53 +0530
    
    

    hi shif,

    To create a database you can make use of t-sql command "create database". If
    you want to create a database without using enterprise manager you will have
    to use above command with the help of application tools like "query
    analyzer" OR command line utility like osql.

    A typical syntax of create database will look as follows.

    CREATE DATABASE <database_name>
    ON
    ( NAME = logical_file_name ,
       FILENAME = 'os_file_name_path' ,
       SIZE = size_of_file ,
       MAXSIZE = max_size_of_file, --max size to which file can grow.
       FILEGROWTH = growth_increment_of_file )
    LOG ON
    ( NAME = logical_file_name,
       FILENAME = 'os_file_name_path',
       SIZE = size_of_file ,
       MAXSIZE = max_size_of_file, --max size to which file can grow.
       FILEGROWTH = growth_increment_of_file )
    GO

    If you want to attach a database with the existing data and log files. you
    can make use of clause "FOR ATTACH" in create database command. OR you can
    make use of system stored procedure sp_attach_db.

    See more help on both of the above commands and its explaination in Books
    online

    --
    Vishal Parkar
    vgparkar@yahoo.co.in
    

  • Next message: Mary: "Table Corrupt"

    Relevant Pages