Showing posts with label nobody. Show all posts
Showing posts with label nobody. Show all posts

Thursday, March 22, 2012

ATL smart pointers with SQL-DMO

I can't believe that nobody knows this? And what does the "commitment to
respond within two business days" mean? I am reposting this after three days
:
According to the comments in Smartptr.cpp (the SQL-DMO smartpointer sample
application), it should be possible to use CComPtr or CComQIPtr instead.
However, I get the error message: "error C2787: 'IWSQLDMOApplication' : no
GUID has been associated with this object" when I try to compile the
following:
#include <initguid.h>
#include "C:\Program Files\Microsoft SQL
Server\80\Tools\Devtools\Include\Sqldmoi
d.h"
#include "C:\Program Files\Microsoft SQL
Server\80\Tools\Devtools\Include\Sqldmo.h"
void CSQLDMOManager::FillDatabaseList()
{
CComPtr<ISQLDMOApplication> pSQLDMOApplication;
pSQLDMOApplication. CoCreateInstance(CLSID_SQLDMOApplication
); // error here!
What do I need to do to make this work?
Thanks,
-PeterFor the "commitment to respond within two business days", you must be a
registered MSDN user and use your registered MSDN email account to post your
message. Maybe it's just that jpstewart@.discussion.microsoft.com is not
your registered MSDN email account.
S. L.
"jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
news:2E8ED74C-1873-493E-9CB5-4F821A642E97@.microsoft.com...
>I can't believe that nobody knows this? And what does the "commitment to
> respond within two business days" mean? I am reposting this after three
> days:
> According to the comments in Smartptr.cpp (the SQL-DMO smartpointer sample
> application), it should be possible to use CComPtr or CComQIPtr instead.
> However, I get the error message: "error C2787: 'IWSQLDMOApplication' : no
> GUID has been associated with this object" when I try to compile the
> following:
> #include <initguid.h>
> #include "C:\Program Files\Microsoft SQL
> Server\80\Tools\Devtools\Include\Sqldmoi
d.h"
> #include "C:\Program Files\Microsoft SQL
> Server\80\Tools\Devtools\Include\Sqldmo.h"
> void CSQLDMOManager::FillDatabaseList()
> {
> CComPtr<ISQLDMOApplication> pSQLDMOApplication;
> pSQLDMOApplication. CoCreateInstance(CLSID_SQLDMOApplication
); // error
> here!
> What do I need to do to make this work?
> Thanks,
> -Peter
>|||Hmmm... Maybe I've missed something somewhere, but does this mean that I
can't both take advantage of the spam protection of a a false display
e-mail address and get my answers within two days?
-Peter
P.S. And I am a registered MSDN user.
"Sylvain Lafontaine" wrote:

> For the "commitment to respond within two business days", you must be a
> registered MSDN user and use your registered MSDN email account to post yo
ur
> message. Maybe it's just that jpstewart@.discussion.microsoft.com is not
> your registered MSDN email account.
> S. L.
> "jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
> news:2E8ED74C-1873-493E-9CB5-4F821A642E97@.microsoft.com...
>
>|||How else do you expect MS to know you are a MSDN subscriber or not? I
understand you not wanting to get spam but short of them being mind
readers<g> they do need a way to identify you. Unfortunately I don't know
the answer to your original question or I would have responded sooner.
Hopefully someone from MSDN team will see this and respond to you.
Andrew J. Kelly SQL MVP
"jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
news:AE1783B2-D226-479D-B2D0-3D0922A49FB6@.microsoft.com...
> Hmmm... Maybe I've missed something somewhere, but does this mean that I
> can't both take advantage of the spam protection of a a false display
> e-mail address and get my answers within two days?
> -Peter
> P.S. And I am a registered MSDN user.
> "Sylvain Lafontaine" wrote:
>|||Go to the MSDN Subscribers Download section, then click on the word "here"
that you will find at the end of the following section:
...
Get Unlimited Free PSS Support for Technical Issues!
Unlimited free support is available now to MSDN subscribers via the MSDN
Managed Newsgroups. In over 200 developer newsgroups, Microsoft will assure
that you receive a response to your posts within 2 business days. This
services is included as a benefit of your active subscription. You can get
started by registering here.
...
From there, register your personal false display e-mail address for MSDN
subscribers. I suggest that under Outlook Express, you create a second
account to use with this e-mail address so that only your must important
posting will get monitored.
S. L.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23yBCL24DFHA.464@.TK2MSFTNGP15.phx.gbl...
> How else do you expect MS to know you are a MSDN subscriber or not? I
> understand you not wanting to get spam but short of them being mind
> readers<g> they do need a way to identify you. Unfortunately I don't know
> the answer to your original question or I would have responded sooner.
> Hopefully someone from MSDN team will see this and respond to you.
> --
> Andrew J. Kelly SQL MVP
>
> "jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
> news:AE1783B2-D226-479D-B2D0-3D0922A49FB6@.microsoft.com...
>|||Cool. I din't know they had that. Thanks
Andrew J. Kelly SQL MVP
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:Oxir1v5DFHA.3256@.tk2msftngp13.phx.gbl...
> Go to the MSDN Subscribers Download section, then click on the word "here"
> that you will find at the end of the following section:
> ...
> Get Unlimited Free PSS Support for Technical Issues!
> Unlimited free support is available now to MSDN subscribers via the MSDN
> Managed Newsgroups. In over 200 developer newsgroups, Microsoft will
> assure that you receive a response to your posts within 2 business days.
> This services is included as a benefit of your active subscription. You
> can get started by registering here.
> ...
> From there, register your personal false display e-mail address for MSDN
> subscribers. I suggest that under Outlook Express, you create a second
> account to use with this e-mail address so that only your must important
> posting will get monitored.
> S. L.
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%23yBCL24DFHA.464@.TK2MSFTNGP15.phx.gbl...
>|||A little thing before finishing: you are better to wait one or two days
before using your new account, otherwise their system may got mixed about
you. Some people had this problem some months ago and I don't know if it
has been repaired since then.
S. L.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:uuxUG87DFHA.3992@.tk2msftngp13.phx.gbl...
> Cool. I din't know they had that. Thanks
> --
> Andrew J. Kelly SQL MVP
>
> "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
> wrote in message news:Oxir1v5DFHA.3256@.tk2msftngp13.phx.gbl...
>

Saturday, February 25, 2012

ASPState Select Permission Denied

I've been scouring the 'Net and I'm surprised to not find any info on this. Apparently I've screwed up something that nobody else has managed to screw up.

Using Win03EE and SQL2005.

I created the ASPState database using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Aspnet_regsql.exe" using "-sstype p" to put the data in ASPState instead of tempdb.

During the creation I used an admin SQL login (let's call it "MyAdmin") that has full admin permissions. (MyAdmin is a SQL login, not a domain account.) I then created an "ASPState" SQL login (not domain) and gave it full permissions within the ASPState database.

I should probably note that the Win03EE server is also a domain controller even though the SQL logins I'm using are non-domain. This is because, currently, the development workstations are not part of the server's domain. Since the entire environment is strictly for research and development, optimum security is not the first concern at this point.

When I run the ASP.NET 2.0 web application with the connection string set to use the MyAdmin account, everything works fine. I can even poke around in ASPState with SSMS and see the session entries being inserted in the tables.

When I run the application with the connection string set to use the "ASPState" login, I get "SELECT permission denied on object 'sysobjects', database 'mssqlsystemresource', schema 'sys'".

If I give ASPState sysadmin priviledges, it works. Of course, I don't want to give ASPState sysadmin priviledges.

I have seen non-ASPState issues posted on the 'Net involving permission denied and mssqlsystemresource. From those I've come to understand that this likely has to do with the changes made to SQL2005 that are probably not anticipated by the current version of aspnet_reqsql.

So... can anyone help me save what's left of my hair from being pulled out any further? I've been clicking various permission settings on and off all day long with no results. The lack of correlation between mssqlsystemresource and what permission setting is needed where is pretty frustrating.

In addition to the solution to this problem, I'd really appreciate any info anyone has on a great place to go read about security setting adjustment considerations in light of the changes made in SQL2005. In particular, what changes from SQL2000 to SQL2005 impact the operation of existing SQL2000 code and what an admin should know about adjusting security settings.

Thanks!

I was about to explain the reason with a resolution by referring a KBA, but found this interesting page http://idunno.org/dotNet/sessionState.aspx on web in this regard.