Showing posts with label users. Show all posts
Showing posts with label users. Show all posts

Wednesday, March 28, 2012

How to remove domain admins from SRS

Hi
In our IT dept all IT users are members of the domain admin group (not my
idea). Is there a way to prevent them from seeing reports/folders? We only
want admins to see reports if they are given explicit permissions.
thanksThe reason this is happening is not because they are in the domain admin
group, it is because the domain admin group is in the local Adminstrators
group. This is the group that RS uses. So, on the server that is running RS
remove the domain admin group from the local group. Create new groups that
you put in the appropriate users and then assign the appropriate roles. Only
put true RS admins in the local admin group.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"darwin" <darwin@.discussions.microsoft.com> wrote in message
news:6722153F-A8A5-4B77-8DFA-772ADCFB7145@.microsoft.com...
> Hi
> In our IT dept all IT users are members of the domain admin group (not my
> idea). Is there a way to prevent them from seeing reports/folders? We
> only
> want admins to see reports if they are given explicit permissions.
> thanks|||Thanks Bruce ;)
"Bruce L-C [MVP]" wrote:
> The reason this is happening is not because they are in the domain admin
> group, it is because the domain admin group is in the local Adminstrators
> group. This is the group that RS uses. So, on the server that is running RS
> remove the domain admin group from the local group. Create new groups that
> you put in the appropriate users and then assign the appropriate roles. Only
> put true RS admins in the local admin group.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "darwin" <darwin@.discussions.microsoft.com> wrote in message
> news:6722153F-A8A5-4B77-8DFA-772ADCFB7145@.microsoft.com...
> > Hi
> > In our IT dept all IT users are members of the domain admin group (not my
> > idea). Is there a way to prevent them from seeing reports/folders? We
> > only
> > want admins to see reports if they are given explicit permissions.
> >
> > thanks
>
>

Monday, March 26, 2012

How to release user connections?

I'm in the process of moving our database server to new hardware, but when I
try to use the Copy Database Wizard it finds to concurrent users and won't
allow for the copy. How can I find out who is on and then disconnect them?exec sp_who2 to find them
KILL spid to close them
You only need to kill the spid's where the spid is greater than 50
http://sqlservercode.blogspot.com/|||EXEC sp_who for discovering who is connected
KILL spid for killing a connection
Both are documented in Books On Line
--
Med Bouchenafa
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>|||Another method for forcibly terminate database connections is:
ALTER DATABASE MyDatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
and then back to normal:
ALTER DATABASE MyDatabase
SET MULTI_USER
See the Books Online for more information.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>|||I find that stopping and starting the SQL services usually does the
trick. Nice and easy too.|||Thats a hard one if you have more than one userdatabase one your
server, because ALL serverusers will be wiped out of the system, so
better altering the database like DAN stated would be the best (it is
also my perferable solution, for a hard kick-off)
HTH, jens Suessmeyer.

How to release user connections?

I'm in the process of moving our database server to new hardware, but when I
try to use the Copy Database Wizard it finds to concurrent users and won't
allow for the copy. How can I find out who is on and then disconnect them?
exec sp_who2 to find them
KILL spid to close them
You only need to kill the spid's where the spid is greater than 50
http://sqlservercode.blogspot.com/
|||EXEC sp_who for discovering who is connected
KILL spid for killing a connection
Both are documented in Books On Line
Med Bouchenafa
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>
|||Another method for forcibly terminate database connections is:
ALTER DATABASE MyDatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
and then back to normal:
ALTER DATABASE MyDatabase
SET MULTI_USER
See the Books Online for more information.
Hope this helps.
Dan Guzman
SQL Server MVP
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>
|||I find that stopping and starting the SQL services usually does the
trick. Nice and easy too.
|||Thats a hard one if you have more than one userdatabase one your
server, because ALL serverusers will be wiped out of the system, so
better altering the database like DAN stated would be the best (it is
also my perferable solution, for a hard kick-off)
HTH, jens Suessmeyer.

How to release user connections?

I'm in the process of moving our database server to new hardware, but when I
try to use the Copy Database Wizard it finds to concurrent users and won't
allow for the copy. How can I find out who is on and then disconnect them?exec sp_who2 to find them
KILL spid to close them
You only need to kill the spid's where the spid is greater than 50
http://sqlservercode.blogspot.com/|||EXEC sp_who for discovering who is connected
KILL spid for killing a connection
Both are documented in Books On Line
Med Bouchenafa
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>|||Another method for forcibly terminate database connections is:
ALTER DATABASE MyDatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
and then back to normal:
ALTER DATABASE MyDatabase
SET MULTI_USER
See the Books Online for more information.
Hope this helps.
Dan Guzman
SQL Server MVP
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:2D491056-49C8-4061-BE1E-5E1F6F77D722@.microsoft.com...
> I'm in the process of moving our database server to new hardware, but when
> I
> try to use the Copy Database Wizard it finds to concurrent users and won't
> allow for the copy. How can I find out who is on and then disconnect them?
>|||I find that stopping and starting the SQL services usually does the
trick. Nice and easy too.|||Thats a hard one if you have more than one userdatabase one your
server, because ALL serverusers will be wiped out of the system, so
better altering the database like DAN stated would be the best (it is
also my perferable solution, for a hard kick-off)
HTH, jens Suessmeyer.

Monday, March 19, 2012

How to re-create DB users, roles and members, and their permissions on secondary

Since the secondary is in no-recovery mode after mirroring, and cannot
be connected to, how is one supposed to re-create DB users, roles and
members, and their permissions on secondary? I have a script to do
this, but cannot run it? Is this something I would have to run
manually on the secondary after a failover?
Thanks in advance for any advice.You could have run that script before configuring DBM, also you can
failover and do the same now. AFAIK, i dont think there is any other
way to do when the DB is in No-Recovery Mode
HTH,
Dinesh|||> how is one supposed to re-create DB users, roles and
> members, and their permissions on secondary?
No need to. All this is inside the database, copied over from the primary. What you do need to
handle, though are the logins. Easiest, IMO is to use sp_help_revlogin (Google for it).
And of course you might need other things not in the user database. Like linked servers,
sp_configure settings, jobs, operators, alerts etc.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"JRoughgarden" <jroughgarden@.gmail.com> wrote in message
news:1185322213.737415.190810@.z24g2000prh.googlegroups.com...
> Since the secondary is in no-recovery mode after mirroring, and cannot
> be connected to, how is one supposed to re-create DB users, roles and
> members, and their permissions on secondary? I have a script to do
> this, but cannot run it? Is this something I would have to run
> manually on the secondary after a failover?
> Thanks in advance for any advice.
>|||Tibor,
Thanks for the response. The logins have been re-created on the mirror. It
has generally been my experience that when restoring a DB from a backup file,
one has to drop and re-create the DB users, roles, and privileges. I had
expected the same would be true for DM. But if you say it is not, then great!
Thanks.
Jeff|||> It
> has generally been my experience that when restoring a DB from a backup file,
> one has to drop and re-create the DB users, roles, and privileges.
No, that is not required. All those things are actually inside the database, so they are restored
with your database. So no work on these has to be done, unless you want to change something, of
course. What usually happens is that you don't have the same logins on the target server, with the
same SID number, so your users are orphaned, and you might *believe* that you need to redo your
users etc...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Jeffrey Roughgarden" <JeffreyRoughgarden@.discussions.microsoft.com> wrote in message
news:50CB10DD-83BA-49AC-B510-C21D3CC63697@.microsoft.com...
> Tibor,
> Thanks for the response. The logins have been re-created on the mirror. It
> has generally been my experience that when restoring a DB from a backup file,
> one has to drop and re-create the DB users, roles, and privileges. I had
> expected the same would be true for DM. But if you say it is not, then great!
> Thanks.
> Jeff

How to re-create DB users, roles and members, and their permissions on secondary

Since the secondary is in no-recovery mode after mirroring, and cannot
be connected to, how is one supposed to re-create DB users, roles and
members, and their permissions on secondary? I have a script to do
this, but cannot run it? Is this something I would have to run
manually on the secondary after a failover?
Thanks in advance for any advice.
You could have run that script before configuring DBM, also you can
failover and do the same now. AFAIK, i dont think there is any other
way to do when the DB is in No-Recovery Mode
HTH,
Dinesh
|||> how is one supposed to re-create DB users, roles and
> members, and their permissions on secondary?
No need to. All this is inside the database, copied over from the primary. What you do need to
handle, though are the logins. Easiest, IMO is to use sp_help_revlogin (Google for it).
And of course you might need other things not in the user database. Like linked servers,
sp_configure settings, jobs, operators, alerts etc.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"JRoughgarden" <jroughgarden@.gmail.com> wrote in message
news:1185322213.737415.190810@.z24g2000prh.googlegr oups.com...
> Since the secondary is in no-recovery mode after mirroring, and cannot
> be connected to, how is one supposed to re-create DB users, roles and
> members, and their permissions on secondary? I have a script to do
> this, but cannot run it? Is this something I would have to run
> manually on the secondary after a failover?
> Thanks in advance for any advice.
>
|||Tibor,
Thanks for the response. The logins have been re-created on the mirror. It
has generally been my experience that when restoring a DB from a backup file,
one has to drop and re-create the DB users, roles, and privileges. I had
expected the same would be true for DM. But if you say it is not, then great!
Thanks.
Jeff
|||> It
> has generally been my experience that when restoring a DB from a backup file,
> one has to drop and re-create the DB users, roles, and privileges.
No, that is not required. All those things are actually inside the database, so they are restored
with your database. So no work on these has to be done, unless you want to change something, of
course. What usually happens is that you don't have the same logins on the target server, with the
same SID number, so your users are orphaned, and you might *believe* that you need to redo your
users etc...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Jeffrey Roughgarden" <JeffreyRoughgarden@.discussions.microsoft.com> wrote in message
news:50CB10DD-83BA-49AC-B510-C21D3CC63697@.microsoft.com...
> Tibor,
> Thanks for the response. The logins have been re-created on the mirror. It
> has generally been my experience that when restoring a DB from a backup file,
> one has to drop and re-create the DB users, roles, and privileges. I had
> expected the same would be true for DM. But if you say it is not, then great!
> Thanks.
> Jeff

Wednesday, March 7, 2012

How to read IIS log files to get the hit count and distinct users information?

Hi All,
I am trying to read IIS log file to find out the hit count of the
application and also to find the user base (number of different users
who access our application).
Log files are created on a daily basis.
I am using DTS package to import IIS log files into the database but I
am finding difficulty in analyzing the data. My objective is to get the
users information and hit count on a daily basis so that I can then
consolidate it to find the hit count for the w/month and users who
accessed it during that period.
Thanks,
NareshNaresh,
Can you post the destination table DDL+sample rows+desired output?
Thanks
Jerry
"Naresh" <thatsnaresh@.gmail.com> wrote in message
news:1130169058.111355.64750@.g43g2000cwa.googlegroups.com...
> Hi All,
> I am trying to read IIS log file to find out the hit count of the
> application and also to find the user base (number of different users
> who access our application).
> Log files are created on a daily basis.
> I am using DTS package to import IIS log files into the database but I
> am finding difficulty in analyzing the data. My objective is to get the
> users information and hit count on a daily basis so that I can then
> consolidate it to find the hit count for the w/month and users who
> accessed it during that period.
> Thanks,
> Naresh
>|||
Hi Jerry,
I imported the IIS log file, Sql server automatically creates the table
during the import process.
Following is the extract from IIS log file
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2005-10-24 07:00:26
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query
s-port cs-username c-ip cs(User-Agent) cs(Referer) cs-host sc-status
sc-win32-status sc-bytes cs-bytes time-taken
It contains the columns information that is being logged.
Just curious to know whether each entry in IIS log file a HIT to the
application? i.e., can I treat the number of rows in the log file as the
hit count of the application?
As already requested I also wanted to find out different users who had
accessed the application?
Thanks much in advance.
Regards,
Naresh
*** Sent via Developersdex http://www.examnotes.net ***

Sunday, February 19, 2012

How to Query a nested Hierarchy in TSQL

All:
I have a table called Users and there is a column called ParentID that
either contains 0 or another valid userID. This is what I want to do: When I
have a userID, I want to retrieve all UserIDs until ParentID for a searched
user is 0.
Script to simulate the environment:
create table users
(userID Int,
parentID Int)
insert into users
select 1, 0
union all
select 2, 1
union all
select 3, 2
union all
select 4, 3
union all
select 5, 4
union all
select 6, 4
union all
select 7, 5
union all
select 8, 6
union all
select 9, 7
union all
select 10, 8
Situation: I will be supplied with a specific user ID and I need to retun
all userIDs in comma delimited format until ParentID becomes 0 in the
hierarchy.
Example:
UserID 1 should return only one row as the ParentID is 0 for userID 1
UserID 8 should return following userIDs
6,4, 3, 2, 1
I hope everything is clear.This article may give you some idea.
http://www.windowsitpro.com/Article...5715/15715.html
Regards
Mark wrote:
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
I
> have a userID, I want to retrieve all UserIDs until ParentID for a searche
d
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.|||This article may give you some idea.
http://www.windowsitpro.com/Article...5715/15715.html
Regards
Mark wrote:
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
I
> have a userID, I want to retrieve all UserIDs until ParentID for a searche
d
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.|||Mark,
Try this function:
create function dbo.fn_getpath(@.uid as int) returns varchar(8000)
as
begin
declare @.path as varchar(8000);
set @.path = cast(@.uid as varchar(10));
while @.uid <> 0
begin
set @.uid = (select parentid from users where userid = @.uid);
set @.path = @.path + ',' + cast(@.uid as varchar(10));
end
return @.path;
end
go
select dbo.fn_getpath(5)
BG, SQL Server MVP
www.SolidQualityLearning.com
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:1C6A7C66-191E-41A7-AD3C-33E84232CCF6@.microsoft.com...
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
> I
> have a userID, I want to retrieve all UserIDs until ParentID for a
> searched
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.
>|||Look at this example:
http://milambda.blogspot.com/2005/0...or-monkeys.html
ML
http://milambda.blogspot.com/|||"Muhammad Akhter" <mnadeemakhter@.gmail.com> wrote in message
news:1134511951.052763.116790@.g44g2000cwa.googlegroups.com...
> This article may give you some idea.
> http://www.windowsitpro.com/Article...5715/15715.html
Lets just count the *years* that this kind of approach is the only one
available:(:)|||Get a copy of TREES & HIERARCHIES IN SQL for several approaches to this
problem.
Why do you wish to destroy First Normal Form (1NF)? It is the
foundation of RDBMS, after all.
Why are you formatting data in the back end? The basic principle of a
tiered architecture is that display is done in the front end and never
in the back end. This a more basic programming principle than just SQL
and RDBMS.|||"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1134875755.271066.18350@.g44g2000cwa.googlegroups.com...
> Get a copy of TREES & HIERARCHIES IN SQL for several approaches to this
> problem.
Good luck with the book...although some may wonder why
it still is appropriate in the 21st century:)