Monday, March 26, 2012

Problem with SQL Query file

I'm hoping you can help with something.
I've installed the Project Server post SP1 Hotfix in my test lab and all
looks ok, apart from some errors when I execute the websps.sql query file
that forms part of the hotfix. The errors look like this.
There is no such user or group 'MSProjectServerRole'.
Here's an example of one of the entries in the query file that generates the
error.
/* Query #65005 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo
AS
select WADMIN_SMTP_SERVER_NAME,
WADMIN_SMTP_SERVER_PORT,
WADMIN_DEFAULT_LANGUAGE,
WADMIN_NTFY_FROM_EMAIL,
WADMIN_NTFY_EMAIL_TRAILER,
WADMIN_ORG_EMAIL_ADDRESS,
WADMIN_NPE_LAST_RUN,
WADMIN_NPE_NEXT_RUN,
WADMIN_NPE_SCHEDULED_TIME,
WADMIN_INTRANET_SERVER_URL,
WADMIN_EXTRANET_SERVER_URL,
WADMIN_EMAIL_CHARSET
from MSP_WEB_ADMIN
RETURN
GO
GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo TO
MSProjectServerRole
GO
********************************
I've checked that the MSProjectServerRole exists and is populated with
MSProjectServerUser, so all looks ok. I'm confused as to why the execution
of the stored procedure comes up with the error. The CREATE PROCEDURE part
doesn't appear to work as the stored procedure
MSP_WEB_SP_QRY_GetNotificationAdminInfo does not appear in Enterprise Manage
r
after the query file has finished executing.
Not being a SQL guy, can anyone give me a pointer as to how I can
troubleshoot this problem? I'm executing the query file as sa, so I don't
think this is a permissions thing.
Thanks
TonyIt appears that you created the proc in the wrong database. Likely, you put
it in master.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Tony Murray" <TonyMurray@.discussions.microsoft.com> wrote in message
news:1530354A-94BA-4F8C-B1E7-F31980B603A9@.microsoft.com...
I'm hoping you can help with something.
I've installed the Project Server post SP1 Hotfix in my test lab and all
looks ok, apart from some errors when I execute the websps.sql query file
that forms part of the hotfix. The errors look like this.
There is no such user or group 'MSProjectServerRole'.
Here's an example of one of the entries in the query file that generates the
error.
/* Query #65005 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo
AS
select WADMIN_SMTP_SERVER_NAME,
WADMIN_SMTP_SERVER_PORT,
WADMIN_DEFAULT_LANGUAGE,
WADMIN_NTFY_FROM_EMAIL,
WADMIN_NTFY_EMAIL_TRAILER,
WADMIN_ORG_EMAIL_ADDRESS,
WADMIN_NPE_LAST_RUN,
WADMIN_NPE_NEXT_RUN,
WADMIN_NPE_SCHEDULED_TIME,
WADMIN_INTRANET_SERVER_URL,
WADMIN_EXTRANET_SERVER_URL,
WADMIN_EMAIL_CHARSET
from MSP_WEB_ADMIN
RETURN
GO
GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo TO
MSProjectServerRole
GO
********************************
I've checked that the MSProjectServerRole exists and is populated with
MSProjectServerUser, so all looks ok. I'm confused as to why the execution
of the stored procedure comes up with the error. The CREATE PROCEDURE part
doesn't appear to work as the stored procedure
MSP_WEB_SP_QRY_GetNotificationAdminInfo does not appear in Enterprise
Manager
after the query file has finished executing.
Not being a SQL guy, can anyone give me a pointer as to how I can
troubleshoot this problem? I'm executing the query file as sa, so I don't
think this is a permissions thing.
Thanks
Tony|||Thanks Tom, you were spot-on :-) I had highlighted the ProjectServer
database in the left hand pane of Query Analyzer, but had not specified it i
n
the drop down list in the right pane.
Tony
"Tom Moreau" wrote:

> It appears that you created the proc in the wrong database. Likely, you p
ut
> it in master.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Tony Murray" <TonyMurray@.discussions.microsoft.com> wrote in message
> news:1530354A-94BA-4F8C-B1E7-F31980B603A9@.microsoft.com...
> I'm hoping you can help with something.
> I've installed the Project Server post SP1 Hotfix in my test lab and all
> looks ok, apart from some errors when I execute the websps.sql query file
> that forms part of the hotfix. The errors look like this.
> There is no such user or group 'MSProjectServerRole'.
> Here's an example of one of the entries in the query file that generates t
he
> error.
> /* Query #65005 */
> CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo
> AS
> select WADMIN_SMTP_SERVER_NAME,
> WADMIN_SMTP_SERVER_PORT,
> WADMIN_DEFAULT_LANGUAGE,
> WADMIN_NTFY_FROM_EMAIL,
> WADMIN_NTFY_EMAIL_TRAILER,
> WADMIN_ORG_EMAIL_ADDRESS,
> WADMIN_NPE_LAST_RUN,
> WADMIN_NPE_NEXT_RUN,
> WADMIN_NPE_SCHEDULED_TIME,
> WADMIN_INTRANET_SERVER_URL,
> WADMIN_EXTRANET_SERVER_URL,
> WADMIN_EMAIL_CHARSET
> from MSP_WEB_ADMIN
> RETURN
> GO
> GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo TO
> MSProjectServerRole
> GO
> ********************************
> I've checked that the MSProjectServerRole exists and is populated with
> MSProjectServerUser, so all looks ok. I'm confused as to why the executio
n
> of the stored procedure comes up with the error. The CREATE PROCEDURE pa
rt
> doesn't appear to work as the stored procedure
> MSP_WEB_SP_QRY_GetNotificationAdminInfo does not appear in Enterprise
> Manager
> after the query file has finished executing.
> Not being a SQL guy, can anyone give me a pointer as to how I can
> troubleshoot this problem? I'm executing the query file as sa, so I don't
> think this is a permissions thing.
> Thanks
> Tony
>|||It's a common problem with DBA's. We usually belong to the sysadmin role
and have a default DB of master. If you include a USE statement, that can
fend off the wrong DB problem. Any object you create should also have the
appropriate GRANT statements, too. When you're in sysadmin, it always
works.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Tony Murray" <TonyMurray@.discussions.microsoft.com> wrote in message
news:209BE0C0-C948-4AE6-886E-F87A76AC3823@.microsoft.com...
Thanks Tom, you were spot-on :-) I had highlighted the ProjectServer
database in the left hand pane of Query Analyzer, but had not specified it
in
the drop down list in the right pane.
Tony
"Tom Moreau" wrote:

> It appears that you created the proc in the wrong database. Likely, you
> put
> it in master.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Tony Murray" <TonyMurray@.discussions.microsoft.com> wrote in message
> news:1530354A-94BA-4F8C-B1E7-F31980B603A9@.microsoft.com...
> I'm hoping you can help with something.
> I've installed the Project Server post SP1 Hotfix in my test lab and all
> looks ok, apart from some errors when I execute the websps.sql query file
> that forms part of the hotfix. The errors look like this.
> There is no such user or group 'MSProjectServerRole'.
> Here's an example of one of the entries in the query file that generates
> the
> error.
> /* Query #65005 */
> CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo
> AS
> select WADMIN_SMTP_SERVER_NAME,
> WADMIN_SMTP_SERVER_PORT,
> WADMIN_DEFAULT_LANGUAGE,
> WADMIN_NTFY_FROM_EMAIL,
> WADMIN_NTFY_EMAIL_TRAILER,
> WADMIN_ORG_EMAIL_ADDRESS,
> WADMIN_NPE_LAST_RUN,
> WADMIN_NPE_NEXT_RUN,
> WADMIN_NPE_SCHEDULED_TIME,
> WADMIN_INTRANET_SERVER_URL,
> WADMIN_EXTRANET_SERVER_URL,
> WADMIN_EMAIL_CHARSET
> from MSP_WEB_ADMIN
> RETURN
> GO
> GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo TO
> MSProjectServerRole
> GO
> ********************************
> I've checked that the MSProjectServerRole exists and is populated with
> MSProjectServerUser, so all looks ok. I'm confused as to why the
> execution
> of the stored procedure comes up with the error. The CREATE PROCEDURE
> part
> doesn't appear to work as the stored procedure
> MSP_WEB_SP_QRY_GetNotificationAdminInfo does not appear in Enterprise
> Manager
> after the query file has finished executing.
> Not being a SQL guy, can anyone give me a pointer as to how I can
> troubleshoot this problem? I'm executing the query file as sa, so I don't
> think this is a permissions thing.
> Thanks
> Tony
>

No comments:

Post a Comment