Thursday, March 22, 2012

Calling Functions on another database

Hey guys, I recently found out u can actaully JOIN tables that are on different dbs as long as they are on the same SQL Server by specifying [DATABASE].[DATABASEOWNER].[TABLE]. I now have a question tho. Can you access functions the same way? i have tried using the same syntax, but I get an error saying 'Invalid object name'

Any help would be great.

Thanks!You can as long as permissions are set correctly. I do it all the time. You must be missing something, because it is possible. Is the function what is showing as invalid or is there something inside the function that it thnks is invalid?

And actually, you can join tables and use objects from other servers if you have linked servers set up.|||ah thanks, you're right, i had changed the object owner using sp_changeobjectowner and forgot that the permissions get dropped. Thanks alot!sql

No comments:

Post a Comment