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 |
|
vicki
Posting Yak Master
117 Posts |
Posted - 2002-02-06 : 14:18:15
|
| is anyone here know what is the command to run to findout how much space available and how much space has been used for particular sql server?Thanks |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-06 : 14:21:40
|
| Use the sp_spaceused system procedure:EXEC sp_spaceused |
 |
|
|
vicki
Posting Yak Master
117 Posts |
Posted - 2002-02-06 : 14:30:12
|
| Thanks ,I already try that but it only give me the master database not the server?, what do I need to do knowEdited by - vicki on 02/06/2002 14:33:53 |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-06 : 14:34:22
|
| If you mean available disk space, you could simply use "dir" on the command line, and it will return the free space. If you want the size of the data and log files, you'll need to dir the appropriate folders where they are stored to get their file sizes. |
 |
|
|
vicki
Posting Yak Master
117 Posts |
Posted - 2002-02-06 : 14:47:11
|
| Thanks,ok, I have the server (DB1) to stored all the dabases for my company. I want to find out how many space available and how many spaces has been used for this server?Hope that you can under stand what I want |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-06 : 15:02:28
|
| I can't figure out what you're asking for exactly. Do you have existing databases in SQL Server right now, or are you migrating databases to SQL Server?If you've just installed SQL Server, there are 4 system databases (master, model, msdb and tempdb) and 2 demostration databases (pubs and Northwind) installed by default. The system databases cannot be removed. pubs and Northwind could be removed, but they are so small that it's better to simply leave them in place.It's entirely up to you how many databases you want to create; you're limited strictly by how much disk space is available. I can't answer your question any better without more detail on your current hardware, any databases you have now, and how much data you have to move, if you are migrating.Edited by - robvolk on 02/06/2002 15:03:13 |
 |
|
|
vicki
Posting Yak Master
117 Posts |
Posted - 2002-02-06 : 15:17:05
|
| I think you misunderstood of what I been asking for. My question is how do I find out how much disk space I have available and how much is being used in my sql server?, I used your command sp_spaceused and it was return me with database name: Master and I dont know how it ralted to server any waysHope you can uderstand me knowThanks |
 |
|
|
izaltsman
A custom title
1139 Posts |
Posted - 2002-02-06 : 15:23:35
|
| Don't know why you can't use 'dir' command like Rob suggests... As an alternative, you can always do it via the graphical interface... Just open up Windows Explorer, right-click each drive and select "Properties"... It'll show you space used and space available. Finally, if you want to use Query Analyzer to get this same info, you can run undocumented procedure xp_fixeddrives: EXEC master..xp_fixeddrives will get you a readout of free space your local drives. You can subtract those results from your total disk capacity to get space used.Edited by - izaltsman on 02/06/2002 15:27:45 |
 |
|
|
|
|
|
|
|