Hi
I am executing this against database i got above error .
Basically using this to track db growth of all database on a server.colud you please suggest anybody on this.
insert all_dbs_file_size(dbs_name,rec_model,dbf_size_in_MB,log_size_in_mb)
select
d.name
,d.recovery_model_desc
,convert(decimal(18,2),(sum(size)*8)/1024.0) as dbf_size_in_mb
,(select (size*8)/1024.0 from sys.sysaltfiles where dbid=saf.dbid and groupid=0) as log_size_in_mb
from sys.sysaltfiles saf
join sys.databases d on saf.dbid=d.database_id
where groupid>0
group by dbid,d.name,d.compatibility_level,d.recovery_model_desc
Regards,
Sreen.