Author |
Topic |
sunny_10
Yak Posting Veteran
72 Posts |
Posted - 2013-06-12 : 02:11:50
|
Hi I am creating table like this but It is giving me error on Windows 8 Basic "The Create Database Statement failed . The primary file must be atleast 3 MB to accomodate a copy of the model databasestr = "CREATE DATABASE " & mydatabase & " ON PRIMARY " & _ "(NAME = " & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & "_Data" & ", " & _ " FILENAME = '" & m_path & "Data\" & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & ".mdf' , " & _ " SIZE = 2MB, " & _ " MAXSIZE = 20MB, " & _ " FILEGROWTH = 10%) " & _ " LOG ON " & _ "(NAME = " & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & "_Log" & ", " & _ " FILENAME = '" & m_path & "Data\" & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & ".ldf ', " & _ " SIZE = 1MB, " & _ " MAXSIZE = 10MB, " & _ " FILEGROWTH = 10%) " confind.Execute (str)Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-12 : 02:14:10
|
quote: Originally posted by sunny_10 Hi I am creating table like this but It is giving me error on Windows 8 Basic "The Create Database Statement failed . The primary file must be atleast 3 MB to accomodate a copy of the model databasestr = "CREATE DATABASE " & mydatabase & " ON PRIMARY " & _ "(NAME = " & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & "_Data" & ", " & _ " FILENAME = '" & m_path & "Data\" & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & ".mdf' , " & _ " SIZE = 2MB, " & _ " MAXSIZE = 20MB, " & _ " FILEGROWTH = 10%) " & _ " LOG ON " & _ "(NAME = " & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & "_Log" & ", " & _ " FILENAME = '" & m_path & "Data\" & "WeighBridge" & Mid(fyear, 1, 2) & "_" & Mid(fyear, 4, 2) & ".ldf ', " & _ " SIZE = 1MB, " & _ " MAXSIZE = 10MB, " & _ " FILEGROWTH = 10%) " confind.Execute (str)Thanks
As error suggests increase size of mdf file may be 5 MB to start with------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-06-12 : 02:15:42
|
Means Memory space for that specific primary file should have at least 3MB--Chandu |
|
|
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2013-06-14 : 18:24:01
|
As Model database have mdf file size set to 3MB, set your MDF file to 3+MB, it should works. |
|
|
|
|
|