Monday, March 12, 2012

Execute stored proc on a named instance

I think I'm being a bit thick, but I just cannot figure out the proper syntax to call a stored proc on a SQL named instance I have. I've tried many variations, but here is the basic format of what I'm trying:

EXEC Server\Instance.DB.dbo.usp_fm_proc 1

It seems it doesn't like the \ as I get an error "Incorrect syntax near 'Instance'.

What am I missing here?

Have you created linekd server, try the following:

EXEC [Server\Instance].DB.dbo.usp_fm_proc 1

|||Dooh! That's it, I was overlooking the []. Thanks!

No comments:

Post a Comment