SQL Server Changing logical name I have some db's created with an incorrect logical name for both rows and log. how can I change the logical names to match the db name with a script? (and does not want to change physical file names)

Also how can I find all the databases with same logical name?

(SQL Server 2012)

thanks
Just use ALTER DATABASE:

ALTER DATABASE mydb 
MODIFY FILE ( NAME = logical_file_name, NEWNAME = new_logical_name )