Hi,
Using SMO (VB.NET), I'm creating a new database as shown below. I would
like to change the growth size of the database (to 10%, it's defaulting to
1mb at the moment) and also to set the maximum size I will allow it to grow
to, to 10mb (for testing purposes). How can I do this on the SMO interface?
Thanks for any tips,
Robin
theServer = New Server(Source.S erver)
Dim theDatabase As New Database(theSer ver , newCatalog)
theDatabase.Col lation = "SQL_Latin1_Gen eral_CP1_CI_AS"
theDatabase.Com patibilityLevel = CompatibilityLe vel.Version90
theDatabase.IsF ullTextEnabled = False
theDatabase.Dat abaseOptions.An siNullDefault = False
theDatabase.Dat abaseOptions.An siNullsEnabled = False
theDatabase.Dat abaseOptions.An siPaddingEnable d = False
theDatabase.Dat abaseOptions.An siWarningsEnabl ed = False
theDatabase.Dat abaseOptions.Ar ithmeticAbortEn abled = False
theDatabase.Dat abaseOptions.Au toClose = True
theDatabase.Dat abaseOptions.Au toCreateStatist ics = True
theDatabase.Dat abaseOptions.Au toShrink = True
theDatabase.Dat abaseOptions.Au toUpdateStatist ics = True
theDatabase.Dat abaseOptions.Cl oseCursorsOnCom mitEnabled = False
theDatabase.Dat abaseOptions.Lo calCursorsDefau lt = False
theDatabase.Dat abaseOptions.Co ncatenateNullYi eldsNull = False
theDatabase.Dat abaseOptions.Nu mericRoundAbort Enabled = False
theDatabase.Dat abaseOptions.Qu otedIdentifiers Enabled = False
theDatabase.Dat abaseOptions.Re cursiveTriggers Enabled = False
theDatabase.Dat abaseOptions.Br okerEnabled = True
theDatabase.Dat abaseOptions.Au toUpdateStatist icsAsync = False
theDatabase.Dat abaseOptions.Da teCorrelationOp timization = False
theDatabase.Dat abaseOptions.Tr ustworthy = False
theDatabase.Dat abaseOptions.Is Parameterizatio nForced = False
theDatabase.Dat abaseOptions.Re adOnly = False
theDatabase.Dat abaseOptions.Re coveryModel = RecoveryModel.S imple
theDatabase.Dat abaseOptions.Us erAccess = DatabaseUserAcc ess.Multiple
theDatabase.Dat abaseOptions.Pa geVerify = PageVerify.Torn PageDetection
theDatabase.Dat abaseOptions.Da tabaseOwnership Chaining = False
theDatabase.Cre ate(False)
Using SMO (VB.NET), I'm creating a new database as shown below. I would
like to change the growth size of the database (to 10%, it's defaulting to
1mb at the moment) and also to set the maximum size I will allow it to grow
to, to 10mb (for testing purposes). How can I do this on the SMO interface?
Thanks for any tips,
Robin
theServer = New Server(Source.S erver)
Dim theDatabase As New Database(theSer ver , newCatalog)
theDatabase.Col lation = "SQL_Latin1_Gen eral_CP1_CI_AS"
theDatabase.Com patibilityLevel = CompatibilityLe vel.Version90
theDatabase.IsF ullTextEnabled = False
theDatabase.Dat abaseOptions.An siNullDefault = False
theDatabase.Dat abaseOptions.An siNullsEnabled = False
theDatabase.Dat abaseOptions.An siPaddingEnable d = False
theDatabase.Dat abaseOptions.An siWarningsEnabl ed = False
theDatabase.Dat abaseOptions.Ar ithmeticAbortEn abled = False
theDatabase.Dat abaseOptions.Au toClose = True
theDatabase.Dat abaseOptions.Au toCreateStatist ics = True
theDatabase.Dat abaseOptions.Au toShrink = True
theDatabase.Dat abaseOptions.Au toUpdateStatist ics = True
theDatabase.Dat abaseOptions.Cl oseCursorsOnCom mitEnabled = False
theDatabase.Dat abaseOptions.Lo calCursorsDefau lt = False
theDatabase.Dat abaseOptions.Co ncatenateNullYi eldsNull = False
theDatabase.Dat abaseOptions.Nu mericRoundAbort Enabled = False
theDatabase.Dat abaseOptions.Qu otedIdentifiers Enabled = False
theDatabase.Dat abaseOptions.Re cursiveTriggers Enabled = False
theDatabase.Dat abaseOptions.Br okerEnabled = True
theDatabase.Dat abaseOptions.Au toUpdateStatist icsAsync = False
theDatabase.Dat abaseOptions.Da teCorrelationOp timization = False
theDatabase.Dat abaseOptions.Tr ustworthy = False
theDatabase.Dat abaseOptions.Is Parameterizatio nForced = False
theDatabase.Dat abaseOptions.Re adOnly = False
theDatabase.Dat abaseOptions.Re coveryModel = RecoveryModel.S imple
theDatabase.Dat abaseOptions.Us erAccess = DatabaseUserAcc ess.Multiple
theDatabase.Dat abaseOptions.Pa geVerify = PageVerify.Torn PageDetection
theDatabase.Dat abaseOptions.Da tabaseOwnership Chaining = False
theDatabase.Cre ate(False)
Comment