QPR
asked on
The specified schema name "sys" either does not exist or you do not have permission to use it.
Not sure why this would appear.
I am trying to create a sproc in a user db. This sproc calls master.sys.xp_readerrorlog
I am SA on the server.
Have I got my path wrong (mater.sys.....) or is SA <> SA in 2000?!
I am trying to create a sproc in a user db. This sproc calls master.sys.xp_readerrorlog
I am SA on the server.
Have I got my path wrong (mater.sys.....) or is SA <> SA in 2000?!
ASKER
exactly the same error (tried both versions)
BEGIN
IF (NOT IS_SRVROLEMEMBER(N'securit yadmin') = 1)
BEGIN
RAISERROR(15003,-1,-1, N'securityadmin')
RETURN (1)
END
IF (@p2 IS NULL)
EXEC master..sys.xp_readerrorlo g @p1
ELSE
EXEC master..sys.xp_readerrorlo g @p1,@p2,@p3,@p4
END
BEGIN
IF (NOT IS_SRVROLEMEMBER(N'securit
BEGIN
RAISERROR(15003,-1,-1, N'securityadmin')
RETURN (1)
END
IF (@p2 IS NULL)
EXEC master..sys.xp_readerrorlo
ELSE
EXEC master..sys.xp_readerrorlo
END
ASKER
ok red herring.
It was actually the create sp line (line 1) that was wrong even though the error claimed to be on line 31
CREATE PROC [sys].[sp_readerrorlog]
needed to be
CREATE PROC [sp_readerrorlog]
I was creating the sproc in a user db (not master)
I copied the code word for word from this article.....
http://www.mssqltips.com/tip.asp?tip=1476
Do you know why I got the error
It was actually the create sp line (line 1) that was wrong even though the error claimed to be on line 31
CREATE PROC [sys].[sp_readerrorlog]
needed to be
CREATE PROC [sp_readerrorlog]
I was creating the sproc in a user db (not master)
I copied the code word for word from this article.....
http://www.mssqltips.com/tip.asp?tip=1476
Do you know why I got the error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good info, thanks.
The author of the article had it as
[sys].[sp_readerrorlog]
The author of the article had it as
[sys].[sp_readerrorlog]
master..sys.xp_readerrorlo
or
master.dbo.sys.xp_readerro