header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
LogFile Class
Last Post 01 May 2010 12:51 PM by Chad Miller. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Terry2winUser is Offline
New Member
New Member
Posts:39
Avatar

--
29 Apr 2010 07:10 AM
    Hello.

    I'm using the logfile class (http://msdn.microsoft.com/en-us/lib...0%29.aspx) to get information about the logfiles on the SQL2008 R2 server.

    However, I'm not fully understanding the property "http://msdn.microsoft.com/en-us/lib...00%29.aspx">MaxSize". It's supposed to display "maximum size to which the file can grow", but I find this hard to believe. To test this I created a database where the initial size of the log file were set to 10 MB. I then checked the box "no growth allowed". But when running the command to get MaxSize I get the number 2097152 (presumably MB after formating from KB). This number seems to be standard for most of my log files.

    Anyone have any experience with this?

    Kind regards
    Chad MillerUser is Offline
    Basic Member
    Basic Member
    Posts:160
    Avatar

    --
    01 May 2010 12:51 PM
    I'm using SQL 2008 R2 Eval edition and do not have the same issue. If I set a database log file max size and then turn off auto grow. PowerShell/SMO returns the MaxSize I set. I did notice a problem in setting the max file size via the GUI, SSMS where the property change did not take effect. Are you sure the property was in fact changed?

    As a test try making the change via T-SQL:

    Alter database SQLPSX
    Modify File
    (Name = SQLPSX_log,
    MaxSize = 4MB);
    GO

    Then try retrieving the MaxSize property via PowerShell.
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer