Looking for some help regarding following two issues -
Issue 1. Source database has replication setup
When it is restored on a test server in standby mode sp_helpreplicationdb shows it as replicated but there is no publication or anything.
sp_removedbreplication does not work because database is in read-only mode
can not update sysdatabases to set Category to zero
Can not drop database unless I take it offline
When restored without standby mode it does not show it as replicated and can drop it without any issues.
Issue 2. When it is restored with move
database files correctly get moved to proper location but sys.database_files.physical_name has the original path.
Thanks in advance