Manually Grow w/Multi files.

  • We have a huge database with auto grow on, I am trying to setup a job to manually grow the database because the databse is always growing and locking things out. (not my setup)

    Because of the size, there are two database files everytime I execute a command to grow the db I get this error:

    Msg 1842, Level 16, State 1, Line 1

    The file size, max size cannot be greater than 2147483647 in units of a page size. The file growth cannot be greater than 2147483647 in units of both page size and percentage.

    Searching online showed nothing, only 3 or 4 pages from the net, most errors related to Sharepoint.

    from sp_spaceused: The database_size: 29427824.94 MB unallocated space:506.73 MB

    and from the sysfiles tables:

    Size Grow Name:

    21474816000VSD

    4380792 12800VSD_log

    161489920012800VSD2

    What does this mean, and how can I grow a database this large through a TSQL statement..?

    Thanks,

    -David

  • Hello,

    Can you let us know what are you trying to achieve by growing db ? What TSQL are you executing?

    There is an option for growing your db in chuncks of MB or as percentage.

    Let us know to help you better.

    Cheers !

    ______________________________________________________________________________________________________________________________________________________________________________________
    HTH !
    Kin
    MCTS : 2005, 2008
    Active SQL Server Community Contributor 🙂

  • digdave7 (6/23/2010)


    Because of the size, there are two database files everytime I execute a command to grow the db I get this error:

    Msg 1842, Level 16, State 1, Line 1

    The file size, max size cannot be greater than 2147483647 in units of a page size. The file growth cannot be greater than 2147483647 in units of both page size and percentage.

    What command are you running?

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I was using

    ALTER DATABASE [XXXX] MODIFY FILE ( NAME = N'VSD2', SIZE = NumberBiggerThatbeforeKB )

    Technically they are in filegroups, right now we can't even open the database properties because we get the conversaion failure error.

  • digdave7 (6/24/2010)


    I was using

    ALTER DATABASE [XXXX] MODIFY FILE ( NAME = N'VSD2', SIZE = NumberBiggerThatbeforeKB )

    Technically they are in filegroups, right now we can't even open the database properties because we get the conversaion failure error.

    The error message itself says "Msg 1842, Level 16, State 1, Line 1

    The file size, max size cannot be greater than 2147483647 in units of a page size. The file growth cannot be greater than 2147483647 in units of both page size and percentage."

    You are trying to grow the file size greater than 2147483647 which is a limitation.

    Ref: http://www.sql-server-performance.com/faq/max_size_cannot_be_greater_than_2147483647_p1.aspx

    HTH,

    Cheers !

    ______________________________________________________________________________________________________________________________________________________________________________________
    HTH !
    Kin
    MCTS : 2005, 2008
    Active SQL Server Community Contributor 🙂

  • If my calculations are correct, that means the file size limit is 16Tb (assuming 8kb pages). If that's the case, how has the OP's database file ended up at a smidgeon over 28Tb?

  • digdave7 (6/24/2010)


    I was using

    ALTER DATABASE [XXXX] MODIFY FILE ( NAME = N'VSD2', SIZE = NumberBiggerThatbeforeKB )

    With exactly what value for NumberBiggerThatbeforeKB ?

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • digdave7 (6/23/2010)


    from sp_spaceused: The database_size: 29427824.94 MB unallocated space:506.73 MB

    Is that a correct output? Is the sum total of all the database files 29 427 824 MB? (29 427 GB, 29.4 TB)

    If not, please run DBCC UPDATEUSAGE and see if the output of sp_spaceused changes?

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail,

    I ran

    ALTER DATABASE [VSD] MODIFY FILE ( NAME = N'VSD', SIZE = 29864824 MB )

    and this is the error again:

    Msg 1842, Level 16, State 1, Line 1

    The file size, max size cannot be greater than 2147483647 in units of a page size. The file growth cannot be greater than 2147483647 in units of both page size and percentage.

    Oddly Enough the max size is close to the size of the first database file.

    2147481600VSD

    1669644800VSD2

  • digdave7 (6/29/2010)


    Hi Gail,

    I ran

    ALTER DATABASE [VSD] MODIFY FILE ( NAME = N'VSD', SIZE = 29864824 MB )

    29 Terabytes? That's what the alter database you have there sets the file size to. Is that really the size that you want the file?

    The maximum size of a database file is 16 terabytes, so I would fully expect that alter database to fail. If you really do have a database that's many terabytes in size, you'll have to add more files to the existing filegroups rather than grow existing files, as the hard limit on the size of a single file is 16 TB (16777216 MB)

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply