Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 create table on filegroups

Author  Topic 

lazydev
Starting Member

16 Posts

Posted - 2008-04-02 : 16:56:24
CREATE DATABASE Dummy

ON



PRIMARY (

NAME = PrimaryLog,

FILENAME = 'D:\primary.mdf',

SIZE = 5MB,

MAXSIZE = 500MB,

FILEGROWTH = 20MB ),

(

NAME = Data,

FILENAME = 'D:\Data.ndf',

SIZE = 5MB,

MAXSIZE = 500MB,

FILEGROWTH = 20MB ),

LOG ON

-- Stores The Log Information used To Recover The Database

(

NAME = Log,

FILENAME = 'D:\Log.ldf',

SIZE = 5MB,

MAXSIZE = 500MB,

FILEGROWTH = 20MB )

Go









After this I want to create table on Data .



CREATE TABLE Sample (

No INT ,Name VARCHAR(30) , Department VARCHAR(4000) NULL

)

ON Data

GO



it shows invalid filegroup DATA specified



what may be wrong

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-02 : 23:50:41
You didn't specify filegroup name when create db.
Go to Top of Page
   

- Advertisement -