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.
| Author |
Topic |
|
RichardSteele
Posting Yak Master
160 Posts |
Posted - 2004-02-06 : 17:42:20
|
| 1. How can I determine the space remaining in my primary filegroup? I'm on a shared sql server with no admin permissions. I can right click my database and look at the properties, where I see the size is 295 MB and space availabe is 86 mb. The space allocated is 220 mb in my primary filegroup and 75 mb is alloted for the transaction log. However I was getting the following error message when trying to insert a new record: ODBC Error Code = 37000 (Syntax error or access violation)<P>[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate spacefor object 'MailingList_OM' in database 'photoeyecom' because the'PRIMARY' filegroup is full.2. If I have space available why do I get the Primary filegroup is full error message? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-02-06 : 17:46:04
|
| Someone needs to run DBCC UPDATEUSAGE to fix what is being reported. You really don't have space available, hence the error message. DBCC UPDATEUSAGE will fix what is being reported.Tara |
 |
|
|
RichardSteele
Posting Yak Master
160 Posts |
Posted - 2004-02-06 : 17:48:25
|
| Is this an admin job? Why is there a false reading of availability and how can we monitor this? Thanks. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-02-06 : 17:55:40
|
| DBCC UPDATEUSAGE permissions default to members of the sysadmin fixed server role or the db_owner fixed database role, and are not transferable.I do not know why there are inaccuracies, but for more information take a look at DBCC UPDATEUSAGE topic in SQL Server Books Online. Inaccuracies do not need to be monitored as it doesn't affect anything except what is reported by sp_spaceused.Tara |
 |
|
|
RichardSteele
Posting Yak Master
160 Posts |
Posted - 2004-02-06 : 17:59:01
|
| But surely we (being non-system administrators) can monitor how much space we are using. Particularly if the properties reports is unreliable. How can we determine that? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-02-06 : 18:05:06
|
| sp_spaceused is what you use, but it can be inaccurate. Nigel has a stored procedure that runs sp_spaceused for all tables:http://www.nigelrivett.net/SpaceUsedAllTables.htmlYou can add up how much space is being used, but it would require a lot of work:Number of rows in each table * row size, remember to include indexes too (indexes can take up more room than the actual table)Tara |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|