December 1, 2011 at 10:36 am
Hello friends, I am trying to setup a database logfile size to autogroth through TSQL but it is not letting me keep that setting saved for logfile even if I try through management studio I am getting the same issue. As soon as I save it and come out the window and go back and check the property it shows restricted growth for log file but for Data file i have no issues . Please Help!!!
USE [master]
GO
/****** Object: Database [Test3] Script Date: 12/01/2011 12:29:44 ******/
CREATE DATABASE [Test3] ON PRIMARY
( NAME = N'Test3', FILENAME = N'D:\Data\Test3.mdf' , SIZE = 2048000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 20%)
LOG ON
( NAME = N'Test_log3', FILENAME = N'D:\Log\Test3_log.ldf' , SIZE = 1025024KB , MAXSIZE = Unlimited , FILEGROWTH = 20%)
GO
EXEC dbo.sp_dbcmptlevel @dbname=N'Test3', @new_cmptlevel=90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Test3].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [Test3] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Test3] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Test3] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Test3] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Test3] SET ARITHABORT OFF
GO
ALTER DATABASE [Test3] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [Test3] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [Test3] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Test3] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Test3] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Test3] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [Test3] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Test3] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Test3] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Test3] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Test3] SET ENABLE_BROKER
GO
ALTER DATABASE [Test3] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Test3] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Test3] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Test3] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Test3] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Test3] SET READ_WRITE
GO
ALTER DATABASE [Test3] SET RECOVERY FULL
GO
ALTER DATABASE [Test3] SET MULTI_USER
GO
ALTER DATABASE [Test3] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Test3] SET DB_CHAINING OFF
December 1, 2011 at 10:41 am
Let me guess, it's showing restricted to 2 TB?
2TB is the maximum size a log file can be (refer BoL), hence it's the same as unlimited.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 1, 2011 at 10:45 am
Thank you so much for your quick reply ...That was really helpful and you were right it was showing 2TB.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply