We are running SQL 2000 and have 2 sql servers linked. All databases are linked between both the servers. We get this weird error only when qrying 2 dbs:
Server: Msg 7313, Level 16, State 1, Line 1Invalid schema or catalog specified for provider 'SQLOLEDB'.OLE DB error trace [Non-interface error: Invalid schema or catalog specified for the provider.].
Unfortunately all the databases have identical table/schema/db objects. Only the database names are different. Why is this happening only with 2 db's where are all others are working find. Any ideas or has anyone seen this. Appreciate any help or thoughts on this.
I thought of something else: what are the names of bad-connecting databases? I had a case when the server name contained a dash - and I had to enclose the name in  for the name to work. Same may be applicable to the database names based on the provider you use for the linked server. Check for spaces in database names. Also check that you spelled the database names correctly. And one more thing: make sure you are connecting to the correct server that contains these databases. No, it is not a joke, it does happen.
Lets run below query on destination server and post output here.
SELECT dbnamelength = DATALENGTH(name), name FROM master..sysdatabases WITH (NOLOCK)GO
I am suspecting that you have blank space some where (either in DB or in object name)
Have a quick look at create database command (you said you created by script) I am sure that there is something worng with that...