Showing posts with label properties. Show all posts
Showing posts with label properties. Show all posts

Tuesday, March 27, 2012

Embedded code: what's the trick?

I am trying to put some embedded Visual Basic code into my report (RS 2005), using the "Code" section in the report properties.

Here's the function I'm trying to use:

Public Shared Function ReportTotal(ByVal IsUnitCost As Boolean,ByVal TotalDirectCosts As Double, ByVal SalaryBenefitsTotal As Double, ByVal IndirectRate As Double, ByVal SS_Screened As Integer, ByVal UnitRate As Double) As Double
If IsUnitCost Then
Return SS_Screened * UnitRate
Else
Return TotalDirectCosts + SalaryBenefitsTotal * IndirectRate
End If
End Function

Supposedly, after entering this you can access it in the expression for a field by typing the following: =Code.ReportTotal(... parameters ...)

However, when I try this, "ReportTalk" does not show up in the intellisense after I type "Code.". If I type it in anyway, a red squiggly line shows up under it, and if I attempt to preview the report, I get the following error: "The definition of report [report name] is invalid. Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessingException' was thrown."

This is not a very helpful error message! I tried with and without "Public" and "Shared" and got the same thing.

What am I doing wrong?


Unfortunately, Custom code is not compiled until the report is published, so any custom methods will not show up in intellisense or be resolved (which results in the red underline) by the report designer.

If you are using RS 2005, then it should be evident in the exception message if the custom code generated the error. So, inorder to help you debug the issue I have a few questions:
What version of Reporting Services are you using?|||

Oh OK, you are right -- when I deploy the report, my code does work! Thank you very much.

You'd think there would be ONE mention of this little fact in SOME documentation, somewhere! It never would have occurred to me that the error was occurring only on preview.

In the SQL Server books online, the following is the entire entry for How to Add Code to a Report:

1. On the Report menu, click Report Properties.

Note: If the Report menu is not available, click within the report design area.

2. On the Code tab, in Custom code, type the code.

I kid you not. Anyway, thank you very much!

Embedded code: what's the trick?

I am trying to put some embedded Visual Basic code into my report (RS 2005), using the "Code" section in the report properties.

Here's the function I'm trying to use:

Public Shared Function ReportTotal(ByVal IsUnitCost As Boolean,ByVal TotalDirectCosts As Double, ByVal SalaryBenefitsTotal As Double, ByVal IndirectRate As Double, ByVal SS_Screened As Integer, ByVal UnitRate As Double) As Double
If IsUnitCost Then
Return SS_Screened * UnitRate
Else
Return TotalDirectCosts + SalaryBenefitsTotal * IndirectRate
End If
End Function

Supposedly, after entering this you can access it in the expression for a field by typing the following: =Code.ReportTotal(... parameters ...)

However, when I try this, "ReportTalk" does not show up in the intellisense after I type "Code.". If I type it in anyway, a red squiggly line shows up under it, and if I attempt to preview the report, I get the following error: "The definition of report [report name] is invalid. Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessingException' was thrown."

This is not a very helpful error message! I tried with and without "Public" and "Shared" and got the same thing.

What am I doing wrong?


Unfortunately, Custom code is not compiled until the report is published, so any custom methods will not show up in intellisense or be resolved (which results in the red underline) by the report designer.

If you are using RS 2005, then it should be evident in the exception message if the custom code generated the error. So, inorder to help you debug the issue I have a few questions:
What version of Reporting Services are you using?|||

Oh OK, you are right -- when I deploy the report, my code does work! Thank you very much.

You'd think there would be ONE mention of this little fact in SOME documentation, somewhere! It never would have occurred to me that the error was occurring only on preview.

In the SQL Server books online, the following is the entire entry for How to Add Code to a Report:

1. On the Report menu, click Report Properties.

Note: If the Report menu is not available, click within the report design area.

2. On the Code tab, in Custom code, type the code.

I kid you not. Anyway, thank you very much!

Embedded code didnt work

In the code tab of Report Properties window, I pasted the following VB code:

Public Function Divide(Numerator As Double, Denominator As Double)
If Denominator = 0 Then
Return 0
Else
Return Numerator/Denominator
End If
End Function

But when I tried to reference the above function using "Code." in my expression, I saw an "Unrecognized Identifier" when I put my mouse onto this function in the expression edit window. Why? What I did is just copy the above function to the code tab and then start to reference it in the expression, what did I missed? Thanks for your opinion.

Change your function to:

Function Divide(Numerator As Double, Denominator As Double) As Double
If Denominator = 0 Then
Return 0
Else
Return Numerator/Denominator
End If
End Function

When you call it, use:

Code.Divide(10, 5)

Wednesday, March 21, 2012

e-mail setup on SQL 2000 std

Hello All,
I am trying to set up e-mail notification, but when I open SQL Server Agent
(Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
Profile.
I have Outlook 2002 (XP) installed on the machine, and I tried configuring a
profile with POP and IMAP account, but no mather what I do, the Mail Profile
is stil outgreyed. I don't have MAPI access from that machine, but according
to some books I refered to it shouldn't be a must.
As I can see, either it should be a MAPI, or I am missing something that
should be installed on SQL server, a component or something like that.
Any ideas?
Thanx in advance,
Zoran
YOu have t configure the EMail inBox for the service Account SQL Server
Agent is running on. If this is confugured you will be able to see the
Profile. Anyway, if you want to use another program not relying on MAPI, try
the SMTP_Sendmail which is free of charge :-)
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Smeyer.
"Kizetoni" <kizetoni@.mail.ru> schrieb im Newsbeitrag
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>
|||http://www.aspfaq.com/2403
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Kizetoni" <kizetoni@.mail.ru> wrote in message
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>

e-mail setup on SQL 2000 std

Hello All,
I am trying to set up e-mail notification, but when I open SQL Server Agent
(Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
Profile.
I have Outlook 2002 (XP) installed on the machine, and I tried configuring a
profile with POP and IMAP account, but no mather what I do, the Mail Profile
is stil outgreyed. I don't have MAPI access from that machine, but according
to some books I refered to it shouldn't be a must.
As I can see, either it should be a MAPI, or I am missing something that
should be installed on SQL server, a component or something like that.
Any ideas?
Thanx in advance,
ZoranYOu have t configure the EMail inBox for the service Account SQL Server
Agent is running on. If this is confugured you will be able to see the
Profile. Anyway, if you want to use another program not relying on MAPI, try
the SMTP_Sendmail which is free of charge :-)
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Süßmeyer.
"Kizetoni" <kizetoni@.mail.ru> schrieb im Newsbeitrag
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>|||http://www.aspfaq.com/2403
--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Kizetoni" <kizetoni@.mail.ru> wrote in message
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>|||Yes! :o)
Aaron, thanx!
I checked the link you sent me, and I understood that I should be logging on
with SQL service account.
Once I did that, I could configure the whole thing!
Thanx again!
Regards, Zoran
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> skrev i en meddelelse
news:%23MjmN8CQFHA.2680@.TK2MSFTNGP09.phx.gbl...
> http://www.aspfaq.com/2403
> --
> This is my signature. It is a general reminder.
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
>
> "Kizetoni" <kizetoni@.mail.ru> wrote in message
> news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> > Hello All,
> >
> > I am trying to set up e-mail notification, but when I open SQL Server
> > Agent
> > (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> > Profile.
> >
> > I have Outlook 2002 (XP) installed on the machine, and I tried
configuring
> > a
> > profile with POP and IMAP account, but no mather what I do, the Mail
> > Profile
> > is stil outgreyed. I don't have MAPI access from that machine, but
> > according
> > to some books I refered to it shouldn't be a must.
> >
> > As I can see, either it should be a MAPI, or I am missing something that
> > should be installed on SQL server, a component or something like that.
> >
> > Any ideas?
> >
> > Thanx in advance,
> > Zoran
> >
> >
>sql

e-mail setup on SQL 2000 std

Hello All,
I am trying to set up e-mail notification, but when I open SQL Server Agent
(Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
Profile.
I have Outlook 2002 (XP) installed on the machine, and I tried configuring a
profile with POP and IMAP account, but no mather what I do, the Mail Profile
is stil outgreyed. I don't have MAPI access from that machine, but according
to some books I refered to it shouldn't be a must.
As I can see, either it should be a MAPI, or I am missing something that
should be installed on SQL server, a component or something like that.
Any ideas?
Thanx in advance,
ZoranYOu have t configure the EMail inBox for the service Account SQL Server
Agent is running on. If this is confugured you will be able to see the
Profile. Anyway, if you want to use another program not relying on MAPI, try
the SMTP_Sendmail which is free of charge :-)
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Smeyer.
"Kizetoni" <kizetoni@.mail.ru> schrieb im Newsbeitrag
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>|||http://www.aspfaq.com/2403
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Kizetoni" <kizetoni@.mail.ru> wrote in message
news:ODJc24CQFHA.3788@.tk2msftngp13.phx.gbl...
> Hello All,
> I am trying to set up e-mail notification, but when I open SQL Server
> Agent
> (Properties) the Mail Profile is outgreyed, and I cannot choose any Mail
> Profile.
> I have Outlook 2002 (XP) installed on the machine, and I tried configuring
> a
> profile with POP and IMAP account, but no mather what I do, the Mail
> Profile
> is stil outgreyed. I don't have MAPI access from that machine, but
> according
> to some books I refered to it shouldn't be a must.
> As I can see, either it should be a MAPI, or I am missing something that
> should be installed on SQL server, a component or something like that.
> Any ideas?
> Thanx in advance,
> Zoran
>

Friday, March 9, 2012

EM very slow..

Hi all
When I select properties for any object within EM, i have a major delay of
around 10-20secs at times, this is very strange indeed. The sqlserver 2k
sp2 instance is running on a win2000 cluster, san storage, nothing amazing
really. I cant seem to work out what is going on here, will revist profiler
late tomorrow, but anyone else experienced this?
Cheers
CkDo you have Autoclose ON?
--
Andrew J. Kelly
SQL Server MVP
"Chris K" <dsfdsf> wrote in message
news:3f6d3fda$0$23607$5a62ac22@.freenews.iinet.net.au...
> Hi all
> When I select properties for any object within EM, i have a major delay of
> around 10-20secs at times, this is very strange indeed. The sqlserver 2k
> sp2 instance is running on a win2000 cluster, san storage, nothing amazing
> really. I cant seem to work out what is going on here, will revist
profiler
> late tomorrow, but anyone else experienced this?
> Cheers
> Ck
>|||Does it only happen on 1 machine or from any client? Are you using TCPIP
or NetBios?
--
Andrew J. Kelly
SQL Server MVP
"Chris K" <dsfdsf> wrote in message
news:3f6dc101$0$23590$5a62ac22@.freenews.iinet.net.au...
> Hi Andrew
> This is the first option I checked, and no unfortunatly. Ill run some
> traces when I get a chance next.
> Cheers
> Ck
>|||Perhaps you are on a machine where ODBC tracing is on?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Chris K" <dsfdsf> wrote in message news:3f6dc101$0$23590$5a62ac22@.freenews.iinet.net.au...
> Hi Andrew
> This is the first option I checked, and no unfortunatly. Ill run some
> traces when I get a chance next.
> Cheers
> Ck
>|||I still suggest that you check if ODBC tracing turned on the machine which runs EM.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Chris K" <dsfdsf> wrote in message news:3f6e2e82$0$23597$5a62ac22@.freenews.iinet.net.au...
> Hi guys, its a terminal service session to the cluster, even so, a local
> registration is also slow. Again, its a cluster hooked to a SAN. I will
> double check the protocols enabled, i only had 1hr on the box last week
> along with some base line perf tuning! sales guys are truely hopeless at
> times :)
> Cheers
> Ck
>|||Chris
As you don't have the latest service pack this may be
relevent to your problem.
http://support.microsoft.com/default.aspx?scid=kb;en-
us;282416
Hope this helps
John|||Make sure you trace the local client pc to resolve problems like this with
client tools as it's just as likely to be a performance problem on the PC as
the server. As Tibor's already pointed out twice (& you've not responded
yet), I'd also suggest you check ODBC tracing settings as these sometimes
get turned on without your knowledge by new applications you've installed or
network managers etc..
Regards,
Greg Linwood
SQL Server MVP
"Chris K" <dsfdsf> wrote in message
news:3f6dc101$0$23590$5a62ac22@.freenews.iinet.net.au...
> Hi Andrew
> This is the first option I checked, and no unfortunatly. Ill run some
> traces when I get a chance next.
> Cheers
> Ck
>|||Hi all
The fix was disabling netbios in the private nics of the cluster (I think I
had the terminology right).
Ill post the specifics when I get a chance.
Thanks for the help...
Cheers
Ck

Wednesday, March 7, 2012

EM Crashes when I go to Database-> Properties

Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
Now when I go to SQL 2K EM .. And then right click on database and select
properties.. it crashes.. Have any of you observed that ? Let me know how I
can fix it.. I even tried rebooting and it doesnt help
ThanksHassan,
If the database in question is one of the SQL Server 2005 databases, you are
probably out of luck. Some pre-2005 tools will simply not work with SQL Se
rver 2005 because they can't support features that didn't exist when they we
re developed. If EM is broken when used with SQL Server 2000 databases, see
if this advice from Microsoft about a different EM problem helps.
Like the rest of the current version of SQL Express this is a pre-release ve
rsion, the permissions problem is a bug which we have resolved in the B2 bui
ld of SQL Server 2005. If you need to use EM before we update SQLDMO and Exp
ress, then go to the version of SQLDMO.dll thats in SQL Server 2000 director
y and execute regsvr32 sqldmo.dll. This should enable EM to work as it was b
efore against SQL Server 2000 but neither EM nor DMO will work against SQL E
xpress in this case.
If things like this didn't happen, it wouldn't be beta software...
Steve Kass
Drew University
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:OqF$jH6hEHA.1656@.TK2MSFTNGP09.phx.gbl
..
> Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
>
> Now when I go to SQL 2K EM .. And then right click on database and select
> properties.. it crashes.. Have any of you observed that ? Let me know how
I
> can fix it.. I even tried rebooting and it doesnt help
>
> Thanks
>
>

EM Crashes when I go to Database-> Properties

Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
Now when I go to SQL 2K EM .. And then right click on database and select
properties.. it crashes.. Have any of you observed that ? Let me know how I
can fix it.. I even tried rebooting and it doesnt help
Thanks
Hassan,
If the database in question is one of the SQL Server 2005 databases, you are probably out of luck. Some pre-2005 tools will simply not work with SQL Server 2005 because they can't support features that didn't exist when they were developed. If EM is broken when used with SQL Server 2000 databases, see if this advice from Microsoft about a different EM problem helps.
Like the rest of the current version of SQL Express this is a pre-release version, the permissions problem is a bug which we have resolved in the B2 build of SQL Server 2005. If you need to use EM before we update SQLDMO and Express, then go to the version of SQLDMO.dll thats in SQL Server 2000 directory and execute regsvr32 sqldmo.dll. This should enable EM to work as it was before against SQL Server 2000 but neither EM nor DMO will work against SQL Express in this case.
If things like this didn't happen, it wouldn't be beta software...
Steve Kass
Drew University
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:OqF$jH6hEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
> Now when I go to SQL 2K EM .. And then right click on database and select
> properties.. it crashes.. Have any of you observed that ? Let me know how I
> can fix it.. I even tried rebooting and it doesnt help
> Thanks
>

EM Crashes when I go to Database-> Properties

Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
Now when I go to SQL 2K EM .. And then right click on database and select
properties.. it crashes.. Have any of you observed that ? Let me know how I
can fix it.. I even tried rebooting and it doesnt help
ThanksThis is a multi-part message in MIME format.
--=_NextPart_000_02A4_01C4877F.250CD1D0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hassan,
If the database in question is one of the SQL Server 2005 databases, =you are probably out of luck. Some pre-2005 tools will simply not work =with SQL Server 2005 because they can't support features that didn't =exist when they were developed. If EM is broken when used with SQL =Server 2000 databases, see if this advice from Microsoft about a =different EM problem helps.
Like the rest of the current version of SQL Express this is a =pre-release version, the permissions problem is a bug which we have =resolved in the B2 build of SQL Server 2005. If you need to use EM =before we update SQLDMO and Express, then go to the version of =SQLDMO.dll thats in SQL Server 2000 directory and execute regsvr32 =sqldmo.dll. This should enable EM to work as it was before against SQL =Server 2000 but neither EM nor DMO will work against SQL Express in this =case. If things like this didn't happen, it wouldn't be beta software...
Steve Kass
Drew University
"Hassan" <fatima_ja@.hotmail.com> wrote in message =news:OqF$jH6hEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Ive got SQL 2005 Beta 2 installed along with my SQL 2K on my XP PC
> > Now when I go to SQL 2K EM .. And then right click on database and =select
> properties.. it crashes.. Have any of you observed that ? Let me know =how I
> can fix it.. I even tried rebooting and it doesnt help
> > Thanks
> >
--=_NextPart_000_02A4_01C4877F.250CD1D0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Hassan,
If the database in question is one of the SQL =Server 2005 databases, you are probably out of luck. Some pre-2005 tools =will simply not work with SQL Server 2005 because they can't support features =that didn't exist when they were developed. If EM is broken when used =with SQL Server 2000 databases, see if this advice from Microsoft about a =different EM problem helps.
Like the rest of the =current version of SQL Express this is a pre-release version, the permissions =problem is a bug which we have resolved in the B2 build of SQL Server 2005. If =you need to use EM before we update SQLDMO and Express, then go to the =version of SQLDMO.dll thats in SQL Server 2000 directory and execute regsvr32 =sqldmo.dll. This should enable EM to work as it was before against SQL Server 2000 =but neither EM nor DMO will work against SQL Express in this case. If things like this didn't happen, it wouldn't be =beta software...
Steve Kass
Drew University
"Hassan" wrote in =message news:OqF$jH6hEHA.1656@.TK2MSFTNGP09.phx.gbl...> Ive got SQL 2005 Beta 2 =installed along with my SQL 2K on my XP PC> > Now when I go to SQL 2K EM =.. And then right click on database and select> properties.. it =crashes.. Have any of you observed that ? Let me know how I> can fix it.. I even =tried rebooting and it doesnt help> > Thanks> >

--=_NextPart_000_02A4_01C4877F.250CD1D0--

Friday, February 17, 2012

Effective permission for a group

When I click on the properties of a 2005 sql server database and then
permissions.
If I select a group and then effective permission, I got an error,
saying that "cannot execute as the principal server because the 'xxx
\group' does not exist, this type of principal cannot be impersonated,
or you do not have permission (Microsoft SQL Server; Error: 15406)"

I guess the error is valid, since the group does not exist in the
database as a user. If so, how do I get the effective permissions of a
group?akkha1234@.gmail.com (akkha1234@.gmail.com) writes:

Quote:

Originally Posted by

When I click on the properties of a 2005 sql server database and then
permissions.
If I select a group and then effective permission, I got an error,
saying that "cannot execute as the principal server because the 'xxx
\group' does not exist, this type of principal cannot be impersonated,
or you do not have permission (Microsoft SQL Server; Error: 15406)"
>
I guess the error is valid, since the group does not exist in the
database as a user. If so, how do I get the effective permissions of a
group?


I would think the easiest would be to take a user which is a member of that
group, but I was not able to get that to work. Or more precisely, I was
not able to impersonate as such a user.

You can always look directly into sys.database_permissions, but I don't
really know this information is exposed. In SQL 2005 you can grant a
principal a permission on a schema, which then applies to all objects
in that schema. But I don't think there is a row for every object in
the schema, but I have not investigated this.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx