Hi All,
I am having a database named DA-Profiler.
While running the below query
exec sp_msforeachdb 'use ? exec sp_spaceused'
i got the following error
“Could not locate entry in sysdatabases for database 'DA'. No entry found with that name. Make sure that the name is entered correctly.”
The query is working fine with all other databases except this database.
This error occurred as the database name contains “–“ .
Can anyone suggest me a work around for this without renaming the database.
Thanks in advance.