Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4083408
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:18:33+00:00 2026-05-20T18:18:33+00:00

Inherited a database with min size for one data file (primary) at 10 gigs

  • 0

Inherited a database with min size for one data file (primary) at 10 gigs and the min size for a secondary file to 6 gigs.

  1. Why would someone have created a secondary data file (NDF)?
  2. How do I shrink these below the initial sizes set for the fiels.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:18:34+00:00Added an answer on May 20, 2026 at 6:18 pm
    1. Why would someone have created a secondary data file (NDF)?
    

    This is a way to get create two files on the operating system. Some advantages:

    • 2 file handles
    • possibility of splitting across different disks or storage subsystems (fast/slow) even if you don’t do it right away
    • prepare for partitioning
    • controlling per-file operations, like shrinkfile below
    • allows a large db on a prod system to be restored onto a test/dev system that does not have a single large enough disk for single-file. Thus 2x 400GB files on a prod system (same folder) is restored onto 2 different 500GB disks on the dev system.

    2. How do I shrink these below the initial sizes set for the files
    

    Use DBCC SHRINKFILE instead of DBCC SHRINKDATABASE. It can be set to any desired size, even smaller than initial, as long as it is greater than the size of data currently stored. To reach smaller sizes, set the target

    DBCC SHRINKFILE (1, 0);  -- file id 1, to 0% free space
    

    To find out the file ids, you can use (while in the db)

    select * from sysfiles
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently inherited a database on which one of the tables has the primary
i have inherited a database application from someone else and there are a few
I have inherited a very old database that needs some data to be updated.
I inherited a poorly created mysql database and now I need to migrate data
I have inherited a old access database that includes a table with data organised
I inherited MYSQL database that has lots of tables with data like CREATE TABLE
I have inherited a database that has a lot of cursors in it, and
Recently I inherited a database from another programmer (created / stored with SQL Management
I have run into an interesting problem. I have inherited a database for daemon
I've inherited a Access database that is used to import some data in SQL.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.