Showing posts with label area. Show all posts
Showing posts with label area. Show all posts

Monday, March 12, 2012

Maximum Possible Database Size

I posted this in another area and didn't get an answer, so maybe I posted it in the wrong place. Forgive me if you've seen this twice.

I'm trying to figure out what the ultimate size limitation for a SQL 2005 Enterprise server is. This document is helpful but I'm a bit confused:

http://msdn2.microsoft.com/en-us/library/ms143432.aspx

In the document, it says that the maximum database size is 524,258 terabytes; however, it also says that the maximum data file size--which I assume is the .MDF file--is 16 terabytes. My question is, how can you create a 524,258 TB database if the maximum file size 16 TB?

Dumb question, I'm sure...please enlighten me!

Norm

The .mdf file is the primary data file. You can create secondary data files (typically .ndf file extension) and with large databases you typically will. This allows you to distribute your data across multiple disk spindles or multiple LUN's if your company is using a SAN.

Monday, February 20, 2012

Max value of column in DB

Hey everyone!
Ok, I'm not exactly sure this is an easy task so I hope im posting this in the right area.
What I have is a column in my SQL Server database that is just an ID number.
I had previously used Access and being SQL Server noob, I had no idea if it had a property type like Access' "AutoNumber". I just made it an integer
What I want to do though now, is assign ID's automatically to each new record by making it 1 above the most recently added one. There are two ways I've thought I can be helped:
1) Is there code to find the maximum value of a column in a database, return the value, and then add 1 to it?
or
2.) Can someone give me information about how I could use a feature like Access' AutoNumber in SQL Server?
THANKS GUYS FOR ALL YOUR HELP!In SQL server, you can make the column data type as integer and set identity = yes, identity Seed = 1 and identity Increment = 1 in Columns tab.|||IDENTITY in SQL Server is a property like Access Autonumber. Run a search for IDENTITY and IDENTITY Scope, IDENT_SEED, IDENT_INCR and SET IDENTITY_INSERT option and System varaible IDENTITYCOL in the BOL(books online) to get started. Hope this helps.|||

Worked out perfect, exactly what I was looking for!

Thanks a ton guys!