Wednesday, March 28, 2012
question about removing logins at server level
I created a login 'Network service' at server level in Management Studio
express.
I use windows authentification.
Then i defined an user for my database which is associated to login 'Network
service', because the application asp.net uses that account (IIS 6.0). This
user received db_read and db_write roles.
This works.
Now i experimented a little bit and i removed from the logins at server
level the login 'Network service'.
Result: the application still works.
.
Then i removed the Builtin\users login from the login list at server level.
Result: i get the error: "login failed for Network service".
I recreated then the login 'Network Service' at server level but not the
Builtin\users login.
Result: it works again.
My conclusion is: one of the two logins must be in the list: Network Service
or Builtin\users
Is this right?
Why do i get that error when both logins are removed and not only when
Network Service is removed?
Thanks
JeanBecause you're using Windows Authentication. From what you described it
doesn't sound like the connection to the db server ever came in using the
Network Service login, but rather came in using Builtin\users.
"Jean" wrote:
> Hi,
> I created a login 'Network service' at server level in Management Studio
> express.
> I use windows authentification.
> Then i defined an user for my database which is associated to login 'Network
> service', because the application asp.net uses that account (IIS 6.0). This
> user received db_read and db_write roles.
> This works.
> Now i experimented a little bit and i removed from the logins at server
> level the login 'Network service'.
> Result: the application still works.
> ..
> Then i removed the Builtin\users login from the login list at server level.
> Result: i get the error: "login failed for Network service".
> I recreated then the login 'Network Service' at server level but not the
> Builtin\users login.
> Result: it works again.
> My conclusion is: one of the two logins must be in the list: Network Service
> or Builtin\users
> Is this right?
> Why do i get that error when both logins are removed and not only when
> Network Service is removed?
> Thanks
> Jean
>
>|||Thanks, but after deleting the login Network Service, the user still is
mapped to Network Service account, no? If i delete that user, then the
application fails.
"Hurme" <michael.geles@.thomson.com> schreef in bericht
news:1F40DC8A-A258-4900-BD8B-1B312F151ED4@.microsoft.com...
> Because you're using Windows Authentication. From what you described it
> doesn't sound like the connection to the db server ever came in using the
> Network Service login, but rather came in using Builtin\users.
>
> "Jean" wrote:
>> Hi,
>> I created a login 'Network service' at server level in Management Studio
>> express.
>> I use windows authentification.
>> Then i defined an user for my database which is associated to login
>> 'Network
>> service', because the application asp.net uses that account (IIS 6.0).
>> This
>> user received db_read and db_write roles.
>> This works.
>> Now i experimented a little bit and i removed from the logins at server
>> level the login 'Network service'.
>> Result: the application still works.
>> ..
>> Then i removed the Builtin\users login from the login list at server
>> level.
>> Result: i get the error: "login failed for Network service".
>> I recreated then the login 'Network Service' at server level but not the
>> Builtin\users login.
>> Result: it works again.
>> My conclusion is: one of the two logins must be in the list: Network
>> Service
>> or Builtin\users
>> Is this right?
>> Why do i get that error when both logins are removed and not only when
>> Network Service is removed?
>> Thanks
>> Jean
>>|||I'm not sure about whether or not the Network Service id would still be
mapped or not, but I just did a test on one of my sql servers. I previously
did not have the BUILTIN\Users login and tried to login with a domain account
login that did not exist on the sql server nor the windows 2003 server. When
I tried to login access was denied. Once I created the BUILTIN\Users login on
hte sql server I was able to get in.
"Jean" wrote:
> Thanks, but after deleting the login Network Service, the user still is
> mapped to Network Service account, no? If i delete that user, then the
> application fails.
> "Hurme" <michael.geles@.thomson.com> schreef in bericht
> news:1F40DC8A-A258-4900-BD8B-1B312F151ED4@.microsoft.com...
> > Because you're using Windows Authentication. From what you described it
> > doesn't sound like the connection to the db server ever came in using the
> > Network Service login, but rather came in using Builtin\users.
> >
> >
> >
> > "Jean" wrote:
> >
> >> Hi,
> >>
> >> I created a login 'Network service' at server level in Management Studio
> >> express.
> >> I use windows authentification.
> >> Then i defined an user for my database which is associated to login
> >> 'Network
> >> service', because the application asp.net uses that account (IIS 6.0).
> >> This
> >> user received db_read and db_write roles.
> >>
> >> This works.
> >>
> >> Now i experimented a little bit and i removed from the logins at server
> >> level the login 'Network service'.
> >> Result: the application still works.
> >> ..
> >> Then i removed the Builtin\users login from the login list at server
> >> level.
> >> Result: i get the error: "login failed for Network service".
> >>
> >> I recreated then the login 'Network Service' at server level but not the
> >> Builtin\users login.
> >> Result: it works again.
> >>
> >> My conclusion is: one of the two logins must be in the list: Network
> >> Service
> >> or Builtin\users
> >>
> >> Is this right?
> >> Why do i get that error when both logins are removed and not only when
> >> Network Service is removed?
> >>
> >> Thanks
> >> Jean
> >>
> >>
> >>
>
>|||Ok, thanks
"Hurme" <michael.geles@.thomson.com> schreef in bericht
news:6D07EA51-00F3-4787-91A8-95C6BF5C2B4C@.microsoft.com...
> I'm not sure about whether or not the Network Service id would still be
> mapped or not, but I just did a test on one of my sql servers. I
> previously
> did not have the BUILTIN\Users login and tried to login with a domain
> account
> login that did not exist on the sql server nor the windows 2003 server.
> When
> I tried to login access was denied. Once I created the BUILTIN\Users login
> on
> hte sql server I was able to get in.
>
> "Jean" wrote:
>> Thanks, but after deleting the login Network Service, the user still is
>> mapped to Network Service account, no? If i delete that user, then the
>> application fails.
>> "Hurme" <michael.geles@.thomson.com> schreef in bericht
>> news:1F40DC8A-A258-4900-BD8B-1B312F151ED4@.microsoft.com...
>> > Because you're using Windows Authentication. From what you described
>> > it
>> > doesn't sound like the connection to the db server ever came in using
>> > the
>> > Network Service login, but rather came in using Builtin\users.
>> >
>> >
>> >
>> > "Jean" wrote:
>> >
>> >> Hi,
>> >>
>> >> I created a login 'Network service' at server level in Management
>> >> Studio
>> >> express.
>> >> I use windows authentification.
>> >> Then i defined an user for my database which is associated to login
>> >> 'Network
>> >> service', because the application asp.net uses that account (IIS 6.0).
>> >> This
>> >> user received db_read and db_write roles.
>> >>
>> >> This works.
>> >>
>> >> Now i experimented a little bit and i removed from the logins at
>> >> server
>> >> level the login 'Network service'.
>> >> Result: the application still works.
>> >> ..
>> >> Then i removed the Builtin\users login from the login list at server
>> >> level.
>> >> Result: i get the error: "login failed for Network service".
>> >>
>> >> I recreated then the login 'Network Service' at server level but not
>> >> the
>> >> Builtin\users login.
>> >> Result: it works again.
>> >>
>> >> My conclusion is: one of the two logins must be in the list: Network
>> >> Service
>> >> or Builtin\users
>> >>
>> >> Is this right?
>> >> Why do i get that error when both logins are removed and not only when
>> >> Network Service is removed?
>> >>
>> >> Thanks
>> >> Jean
>> >>
>> >>
>> >>
>>
Monday, March 26, 2012
Question about optimization
I have a 40GB database being hosted on a NAS device (Network Appliance -
http://www.netapp.com/). The log file for this database grows at a rate of
5GB per day. So I do a log cutting on this database on a weekly basis to
free up space on my NAS device.
I have created two separate Q-Trees on the NAS device and I store the main
data file on one of the Q-Trees and the log file on the other Q-Tree.
I ONLY have a PRIMARY FILEGROUP. Should I change this to optimize my
database performance?
I also have a table in the database with approximately 12 million records.
The indexing on the table is well done - using covered index for better
querying. The table gets defragged quite often. So I do defrag the Indexes
on this table once a month (using DBCC DEFRAG).
What else can I do better the performance of my database?
Thank you,
SR"SR" <yosonu@.socal.rr.com> wrote in message
news:ba4c21f6.0310052349.283deaa@.posting.google.co m...
> Guys,
> I have a 40GB database being hosted on a NAS device (Network Appliance -
> http://www.netapp.com/). The log file for this database grows at a rate of
> 5GB per day. So I do a log cutting on this database on a weekly basis to
> free up space on my NAS device.
Not sure what you mean by "log cutting" Please explain.
> I have created two separate Q-Trees on the NAS device and I store the main
> data file on one of the Q-Trees and the log file on the other Q-Tree.
Well, I'm not familiar with Q-Trees (should be by the end of this week
ironically :-).
But the real answer comes down to physical disks.
> I ONLY have a PRIMARY FILEGROUP. Should I change this to optimize my
> database performance?
"Maybe". If your other filegroups would end up being on the same PHYSICAL
disks (even if logically they appear different) then no, you probably would
not notice a difference. (Assuming SQL 2000.)
> I also have a table in the database with approximately 12 million records.
> The indexing on the table is well done - using covered index for better
> querying. The table gets defragged quite often. So I do defrag the Indexes
> on this table once a month (using DBCC DEFRAG).
> What else can I do better the performance of my database?
Use Profiler, find out where any bottlenecks would be.
It's hard to say how to improve performance when a) we don't know how slow
it is now and how fast you need it to be, B) what other bottlenecks may
be... disk I/O, CPU, memory, etc.
> Thank you,
> SR|||SR (yosonu@.socal.rr.com) writes:
> I have a 40GB database being hosted on a NAS device (Network Appliance -
> http://www.netapp.com/). The log file for this database grows at a rate of
> 5GB per day. So I do a log cutting on this database on a weekly basis to
> free up space on my NAS device.
Don't you backup the transaction log more frequently than that?
> I also have a table in the database with approximately 12 million records.
> The indexing on the table is well done - using covered index for better
> querying. The table gets defragged quite often. So I do defrag the Indexes
> on this table once a month (using DBCC DEFRAG).
> What else can I do better the performance of my database?
As Greg said, since we don't know what you think is slow, and how fast
you want it to be, it is difficult to say. But running Profiler to
catch queries with duration > 1000 ms (or what may be suitable) could be
a start.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Friday, March 23, 2012
question about login at database level
Hi,
i created at general database level a login 'Network service' (windows
server 2003).
At level of 'mydb' database, i created an user 'aspnet' and i associated it
to the login 'Network service'. That user 'aspnet' receives the necessary
schemas (db_read /db_write) rrquired by the application.
Now, i removed the login 'Network Service' at general database level (not
the user 'aspnet') but the application still runs properly.
My question is: is it allowed to remove a defined login at general database
level (in my case the login 'Network Service')?
Thanks
Jean
You delete the login without affecting the database user.
But at the end you will have a login mapped to a database user
So, yes it is allowed to remove the login.
Good luck.
|||Thanks
|||Sorry, i was too fast in my answer.
I did the same on a XP prof. box (removing the login at server level, after defining an user associated to that login at database level).
But now, i get the error :" login failed for user servename\aspnet"
If i recreate that login, it works again.
So it seems that the login cannot be removed at server level?
|||
tartuffe2:
Sorry, i was too fast in my answer.
I did the same on a XP prof. box (removing the login at server level, after defining an user associated to that login at database level).
But now, i get the error :" login failed for user servename\aspnet"
If i recreate that login, it works again.
So it seems that the login cannot be removed at server level?
I guess this is because theservername\aspnet account is not "trusted" by your SQL Server. TSo, the NT account must be granted permission to use your SQL Server database.
You can implement impersonation, and grant that account the needed access.
Check out this link:http://support.microsoft.com/?id=316989
|||
ok, thanks
sqlWednesday, March 21, 2012
question about installing sql server express
During installation process of sql server2005 express, i had to choose
between three options:
install sql server as:
local system
Network Service
local service
Can somebody explain me the pro/contra? What should i take?
Thanks in advance
BartUnless you are a security freak, use the Local System account. For more
info, see:
http://msdn2.microsoft.com/en-us/library/ms143170.aspx
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Bart" <b@.sdq.dc> wrote in message
news:%23BcrcumbHHA.4808@.TK2MSFTNGP04.phx.gbl...
> Hi,
> During installation process of sql server2005 express, i had to choose
> between three options:
> install sql server as:
> local system
> Network Service
> local service
> Can somebody explain me the pro/contra? What should i take?
> Thanks in advance
> Bart
>|||Thanks
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
schreef in bericht news:eexS5hpbHHA.2300@.TK2MSFTNGP06.phx.gbl...
> Unless you are a security freak, use the Local System account. For more
> info, see:
> http://msdn2.microsoft.com/en-us/library/ms143170.aspx
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
> E-mail: sylvain aei ca (fill the blanks, no spam please)
>
> "Bart" <b@.sdq.dc> wrote in message
> news:%23BcrcumbHHA.4808@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> During installation process of sql server2005 express, i had to choose
>> between three options:
>> install sql server as:
>> local system
>> Network Service
>> local service
>> Can somebody explain me the pro/contra? What should i take?
>> Thanks in advance
>> Bart
>sql