Why do some stored procedures in MSSQL need to be called using 'master..` prepending, while others can be called without?

The recommended version of MS SQL Server is 8.

In the context of a database other than the main one, if I call stored procedures from the main database, for some of them I must add a prefix master..(otherwise I get Could not find the error "procname" of the stored procedure), for some of them I don’t . For example, I can call -

EXEC sp_addlogin 'user' 'pass';

- and it works, but -

EXEC xp_cmdshell 'command'; 

- no. I need to add master..to make it work -

EXEC master..xp_cmdshell 'command';

Maybe I'm wrong, but I noticed that I need to add master..only to those stored procedures that start with xp_(as opposed to sp_).

master.. , ?

+4
2

, sp_, master... , xp_, , master.. .

. .

+5

xp_ . master.

sp_ "". Microsoft, . , ( ) > "" > " " > " ". , , master..

sp_.... . .

0

Source: https://habr.com/ru/post/1589325/


All Articles