Re: DataFile

Tech-Archive recommends: Fix windows errors by optimizing your registry



Year Space Unused
2001 - 190432 KB
2002 - 2592 KB
2003 - 2800 KB
2004 - 1160 KB
2005 - 984 KB


what I do now ?


"David Gugick" <davidg-nospam@xxxxxxxxxx> wrote in message
news:ecmhPgdSFHA.2384@xxxxxxxxxxxxxxxxxxxxxxx
> Joh wrote:
> > Select * into MedicalHistory_2001 from MedicalHistory where
> > year(Creationdate) = 2001
> >
> > Select * into MedicalHistory_2002 from MedicalHistory where
> > year(Creationdate) = 2002
> >
> > Select * into MedicalHistory_2003 from MedicalHistory where
> > year(Creationdate) = 2003
> >
> > Before using the above three commands my 'Health_Data' DataFile size
> > is 3GB but now its 8.5GB, can I shrink the datafile ?
> >
> > I have used the following command but doesn't effect.
> >
> > backup log Health with truncate_only
> > dbcc shrinkfile('Health_Log',EmptyFile)
> > dbcc shrinkfile('Health_Data')
> >
> > Any guidance?
> >
> > Thanks in advance.
>
> Did you drop those tables? How large is each table? Run the following
> and report back:
>
> exec sp_spaceused -- what's the "unused" portion?
> exec sp_spaceused MedicalHistory_2001 -- what's the "unused" portion?
> exec sp_spaceused MedicalHistory_2002 -- what's the "unused" portion?
> exec sp_spaceused MedicalHistory_2003 -- what's the "unused" portion?
>
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>


.



Relevant Pages

  • Re: Permissions to run DBCC SHOWFILESTATS
    ... There are many commands for which permission cannot be granted; many DBCC ... > that uses the undocumented command "DBCC SHOWFILESTATS" to get data file ... As I am not an SQL Server Admin, ...
    (microsoft.public.sqlserver.security)
  • Re: Curious performance experiment
    ... Before starting to tune the query after re-creating an index run the ... following commands ... DBCC FREEPROCCACHE clears the procedure cache and causes ad hoc queries to ...
    (microsoft.public.sqlserver.server)
  • Re: Backup...
    ... dbcc log ... I tried the following commands ... >>TRANSACTION LOG. ... >>You might also try using the undocumented DBCC LOG ...
    (microsoft.public.sqlserver.server)
  • Getting user input without using a form
    ... these old commands still work, but they have been removed from the ... documentation and their use is not recommended. ... Peter Rooney ... Prev by Date: ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Curious performance experiment
    ... >following commands ... >DBCC FREEPROCCACHE clears the procedure cache and causes ad hoc queries to ... >if you want to clear the data cache you will need to use DBCC ... >specific database on a SQL Server, ...
    (microsoft.public.sqlserver.server)