Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL express 2005 max size/record limit

Author  Topic 

priyanka12
Starting Member

2 Posts

Posted - 2010-08-13 : 07:43:07
Hi,

Forgive me if this post in the wrong topic/thread.I am relatively new to databases and to this forum. I would like to know what SQL server 2005 does when it reaches the maximum records/size of database. If I want to delete the records after this point, how can I program the server to delete all/some records and then start adding new ones from the begining id or start adding henceforth? What are the different ways to do it?

Can anyone please help?

Thanx a ton

kashyap_sql
Posting Yak Master

174 Posts

Posted - 2010-08-13 : 08:23:50
it can be also done manually
1.In Object Explorer, connect to an instance of the SQL Server 2005 Database Engine and then expand that instance.
2.Expand Databases, right-click the database from which to delete the file, and then click Properties.
3.Select the Files page.
4.In the Database files grid, select the file to delete and then click Remove.
5.Click OK.

With Regards
Kashyap M
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-08-13 : 10:07:42
You do NOT delete database files to delete records.

you're going to have to write your own script to monitor file size, then delete records as needed.

or you can just choose some limit that makes sense to you and delete older records nightly; say for example, delete all records older than 1 week or whatever.

i assume this is just for testing purposes? if not, you're going to need a much more well thought out plan for archiving data. or upgrade to SE
Go to Top of Page

priyanka12
Starting Member

2 Posts

Posted - 2010-08-14 : 07:25:20
@Kashyap: You've got it all wrong
@Russell: Can you point me to some resource where this topic is covered better? or where I can know more about writing scripts? I dont need to archive data 'coz in my case, data older than a month would be useless.
Go to Top of Page

kashyap_sql
Posting Yak Master

174 Posts

Posted - 2010-08-14 : 08:10:17
quote:
Originally posted by priyanka12

@Kashyap: You've got it all wrong


How can you say it was all wrong this is also a process to delete the files manually.whether it helps you or not is not my issue

With Regards
Kashyap M
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-08-14 : 15:07:34
If data more than a month old can safely be deleted, just write a T-SQL script. Something like this:
DELETE FROM YourTable WHERE (DateDiff, day, DateField) > 30;
then create a sql agent job to run it every night.
Go to Top of Page
   

- Advertisement -