I am trying to add a linked server name customer to get this
customer.Addresses.dbo.sysfiles from code below
@name = databasename => addresses inthis example
customer = linked server
Addresses = databasename
select @SQL = 'insert into #databases
select N'''+ @name + ''', sum(size) from '
+ QuoteName(@name) + '.dbo.sysfiles'
Any ideas , also can someone explain to me what Quotename actually does?