I am trying to do a backup of all stored procedures and tables from one database server to another. I want to get a list of stored procedures and tables that exist in the destination database so I can create a script automatically from the source server to execute against the destination server to create these stored procedures and/or tables.
I tried
SELECT *
FROM [*DestServer*].[*database*].sys.procedures
I just get the following error:
Invalid object name 'DestServer.database.sys.procedures'
Is it even possible to obtain that list I want?
Msg 7202 Could not find server 'DestServer' in sys.servers.
. And ifdatabase
didn't exist on that server, you'd getMsg 7314 The <provider> for linked server...
errors. Are you sure the linked server is actually a Microsoft SQL Server? Are you sure you don't haveSELECT * FROM [DestServer.database].sys.procedures
? That would lead to the exact error message you're showing.sys.sysobjects
instead ofsys.procedures