I need to be able to drop all user from one database in script...can someon
e point me in the right direction or if its really simple, tell me how?you have to select the spid 's from sysprocesses table that related to db yo
u want and then run kill (spid) command for that spid's.
I think there are some sample scripts to do that on the web like www.databasejorna
l.com etc..
"Jamie Elliott" wrote:
> I need to be able to drop all user from one database in script...can someone poin
t me in the right direction or if its really simple, tell me how?|||Hi,
Did you meant to drop the users or disconnect all users from database.
Disconnenct all users in a database:-
alter database <dbname> set single_user with rollback immediate
Drop the users:-
sp_dropuser <user_name>
You could write a script based on sysusers table.
select 'sp_dropuser ' +name +char(10)+'go' from sysusers where uid>4
Execute the below script with text result and copy the result and paste in a
new window to drop all users apart from system created users.
The drop user will fail if the user owns any object. In that case you have
to change the object owner using sp_changeobjectowner system procedure
(See books online)
Thanks
Hari
MCDBA
"Jamie Elliott" <JamieElliott@.discussions.microsoft.com> wrote in message
news:126F63B8-31B4-4F21-9903-6489C4F862F3@.microsoft.com...
> I need to be able to drop all user from one database in script...can
someone point me in the right direction or if its really simple, tell me
how?
2012年3月19日星期一
disconnect users from a database
I need to be able to drop all user from one database in script...can someone point me in the right direction or if its really simple, tell me how?
you have to select the spid 's from sysprocesses table that related to db you want and then run kill (spid) command for that spid's.
I think there are some sample scripts to do that on the web like www.databasejornal.com etc..
"Jamie Elliott" wrote:
> I need to be able to drop all user from one database in script...can someone point me in the right direction or if its really simple, tell me how?
|||Hi,
Did you meant to drop the users or disconnect all users from database.
Disconnenct all users in a database:-
alter database <dbname> set single_user with rollback immediate
Drop the users:-
sp_dropuser <user_name>
You could write a script based on sysusers table.
select 'sp_dropuser ' +name +char(10)+'go' from sysusers where uid>4
Execute the below script with text result and copy the result and paste in a
new window to drop all users apart from system created users.
The drop user will fail if the user owns any object. In that case you have
to change the object owner using sp_changeobjectowner system procedure
(See books online)
Thanks
Hari
MCDBA
"Jamie Elliott" <JamieElliott@.discussions.microsoft.com> wrote in message
news:126F63B8-31B4-4F21-9903-6489C4F862F3@.microsoft.com...
> I need to be able to drop all user from one database in script...can
someone point me in the right direction or if its really simple, tell me
how?
you have to select the spid 's from sysprocesses table that related to db you want and then run kill (spid) command for that spid's.
I think there are some sample scripts to do that on the web like www.databasejornal.com etc..
"Jamie Elliott" wrote:
> I need to be able to drop all user from one database in script...can someone point me in the right direction or if its really simple, tell me how?
|||Hi,
Did you meant to drop the users or disconnect all users from database.
Disconnenct all users in a database:-
alter database <dbname> set single_user with rollback immediate
Drop the users:-
sp_dropuser <user_name>
You could write a script based on sysusers table.
select 'sp_dropuser ' +name +char(10)+'go' from sysusers where uid>4
Execute the below script with text result and copy the result and paste in a
new window to drop all users apart from system created users.
The drop user will fail if the user owns any object. In that case you have
to change the object owner using sp_changeobjectowner system procedure
(See books online)
Thanks
Hari
MCDBA
"Jamie Elliott" <JamieElliott@.discussions.microsoft.com> wrote in message
news:126F63B8-31B4-4F21-9903-6489C4F862F3@.microsoft.com...
> I need to be able to drop all user from one database in script...can
someone point me in the right direction or if its really simple, tell me
how?
2012年3月8日星期四
Disappearing point labels
I have deployed a number of reports with bar charts. Most of these bar
charts have numeric point labels. On some charts the upper most and lowest
bars do not display the point labels in preview or report manager. I have
experimented with font size and style, point label position as well as chart
size but I cannot seem to find a consistant solution.
Appreciate any help with this problem.This is a known issue in the chart control and we will look into providing a
fix in a future release.
Current workaround: Turn on margins for the x-axis (which is shown as
vertical axis in bar charts) and the labels will work consistently.
As you have noticed resizing the entire chart or using different font sizes
is not reliable. You may also try turning on 3D mode.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"O8" <andrew.stokes@.vodafone.net> wrote in message
news:usaRaTKpEHA.3848@.tk2msftngp13.phx.gbl...
> I have deployed a number of reports with bar charts. Most of these bar
> charts have numeric point labels. On some charts the upper most and lowest
> bars do not display the point labels in preview or report manager. I have
> experimented with font size and style, point label position as well as
chart
> size but I cannot seem to find a consistant solution.
>
> Appreciate any help with this problem.
>
>
charts have numeric point labels. On some charts the upper most and lowest
bars do not display the point labels in preview or report manager. I have
experimented with font size and style, point label position as well as chart
size but I cannot seem to find a consistant solution.
Appreciate any help with this problem.This is a known issue in the chart control and we will look into providing a
fix in a future release.
Current workaround: Turn on margins for the x-axis (which is shown as
vertical axis in bar charts) and the labels will work consistently.
As you have noticed resizing the entire chart or using different font sizes
is not reliable. You may also try turning on 3D mode.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"O8" <andrew.stokes@.vodafone.net> wrote in message
news:usaRaTKpEHA.3848@.tk2msftngp13.phx.gbl...
> I have deployed a number of reports with bar charts. Most of these bar
> charts have numeric point labels. On some charts the upper most and lowest
> bars do not display the point labels in preview or report manager. I have
> experimented with font size and style, point label position as well as
chart
> size but I cannot seem to find a consistant solution.
>
> Appreciate any help with this problem.
>
>
订阅:
评论 (Atom)