Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Friday, March 30, 2012

modifing a running trace

Is there a way to modify a running trace without stopping and re-createing it?
I have a trace running for SOX Audting and I need to add a new user to be
traced.
I created the trace in a script not the GUI in EM.
When I created it I used the following code to ignore this user and now I
need to add him to the trace:
exec sp_trace_setfilter @.TraceID, 11, 0, 7, N'jsisserly'
I have the trace writing out to files, and I am up to approx #1000. If I
stop the trace I will need to move the file out of the directory, and
re-start at #1. I am hoping to avoid renumbering.
TIA,
Joe
jaylou wrote:
> Is there a way to modify a running trace without stopping and
> re-createing it?
> I have a trace running for SOX Audting and I need to add a new user
> to be traced.
> I created the trace in a script not the GUI in EM.
> When I created it I used the following code to ignore this user and
> now I need to add him to the trace:
> exec sp_trace_setfilter @.TraceID, 11, 0, 7, N'jsisserly'
> I have the trace writing out to files, and I am up to approx #1000.
> If I stop the trace I will need to move the file out of the
> directory, and re-start at #1. I am hoping to avoid renumbering.
> TIA,
> Joe
Why not use an auto-numbering scheme for the trace file names or just
add the current date/time to the suffix of the trace file name. You need
to stop the trace in order to change its filter criteria.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Thanks,
That was what I was afraid of
Joe
"David Gugick" wrote:

> jaylou wrote:
> Why not use an auto-numbering scheme for the trace file names or just
> add the current date/time to the suffix of the trace file name. You need
> to stop the trace in order to change its filter criteria.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
|||Hi Jaylou
I have a system that takes care of this & various other SQL Profiler
management issues. It's soon to be released to market but is available for
testing now if you're interested at www.gajsoftware.com (to get the eval,
you simply sig up, activate your account & visit the "editions" page).
Basically it provides for multi-server, schedulable, template based profiler
management. If you change the profiler template (via an easy to use gui),
the background trace management service will automatically re-configure the
trace for you & take care of the file rollover issues.
Regards,
Greg Linwood
SQL Server MVP
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:724A9BBE-FCFC-4401-B42A-91CFF5EA5CD5@.microsoft.com...
> Is there a way to modify a running trace without stopping and re-createing
> it?
> I have a trace running for SOX Audting and I need to add a new user to be
> traced.
> I created the trace in a script not the GUI in EM.
> When I created it I used the following code to ignore this user and now I
> need to add him to the trace:
> exec sp_trace_setfilter @.TraceID, 11, 0, 7, N'jsisserly'
> I have the trace writing out to files, and I am up to approx #1000. If I
> stop the trace I will need to move the file out of the directory, and
> re-start at #1. I am hoping to avoid renumbering.
> TIA,
> Joe

Wednesday, March 28, 2012

model db owner

I have a request to add a user to the model db dbo group.
Can you provide pros/cons to this request
thanks again
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again
Pro:
That user will be created in any new databases you create.
Con:
That user will be created in any new databases you create.
|||What they're asking is for someone to have dbo access to every database ever
created in that server. I suppose if the user is the CEO that might be
justified but that's a lot of privileged access to give to anyone.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again
|||"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ACF4C5D7-F192-4B68-B05D-B1BF5D951204@.microsoft.com...
> What they're asking is for someone to have dbo access to every database
> ever created in that server. I suppose if the user is the CEO that might
> be justified but that's a lot of privileged access to give to anyone.
>
Oops, missed the dbo part. That's probably not a good idea.

> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "stoney" <stoney@.discussions.microsoft.com> wrote in message
> news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com

model db owner

I have a request to add a user to the model db dbo group.
Can you provide pros/cons to this request
thanks again"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again
Pro:
That user will be created in any new databases you create.
Con:
That user will be created in any new databases you create.|||What they're asking is for someone to have dbo access to every database ever
created in that server. I suppose if the user is the CEO that might be
justified but that's a lot of privileged access to give to anyone.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again|||"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ACF4C5D7-F192-4B68-B05D-B1BF5D951204@.microsoft.com...
> What they're asking is for someone to have dbo access to every database
> ever created in that server. I suppose if the user is the CEO that might
> be justified but that's a lot of privileged access to give to anyone.
>
Oops, missed the dbo part. That's probably not a good idea.

> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "stoney" <stoney@.discussions.microsoft.com> wrote in message
> news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com

model db owner

I have a request to add a user to the model db dbo group.
Can you provide pros/cons to this request
thanks again"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again
Pro:
That user will be created in any new databases you create.
Con:
That user will be created in any new databases you create.|||What they're asking is for someone to have dbo access to every database ever
created in that server. I suppose if the user is the CEO that might be
justified but that's a lot of privileged access to give to anyone.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>I have a request to add a user to the model db dbo group.
> Can you provide pros/cons to this request
> thanks again|||"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ACF4C5D7-F192-4B68-B05D-B1BF5D951204@.microsoft.com...
> What they're asking is for someone to have dbo access to every database
> ever created in that server. I suppose if the user is the CEO that might
> be justified but that's a lot of privileged access to give to anyone.
>
Oops, missed the dbo part. That's probably not a good idea.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "stoney" <stoney@.discussions.microsoft.com> wrote in message
> news:DA0A3CE6-26BD-41C9-91D3-1257A1C8B513@.microsoft.com...
>>I have a request to add a user to the model db dbo group.
>> Can you provide pros/cons to this request
>> thanks again
>
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com

model db

Hello,
Question.. why would the model db transaction log be growing and getting ful
l? No new activity such as adding new databases or user defined data has occ
urred.
Thanks!!There's always some activity in the log, like checkpointing etc. Shouldn't b
e much but over a long time
perhaps...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"nupee" <nupee@.discussions.microsoft.com> wrote in message
news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
> Hello,
> Question.. why would the model db transaction log be growing and getting full? No
new activity such as
adding new databases or user defined data has occurred.
> Thanks!!|||Hi,
As Tibor mentioned the growth will be very minimal, can you check the growth
by executing the below procedure during the growth situation
DBCC SQLPERF(LOGSPACE)
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OdP34WuXEHA.1764@.TK2MSFTNGP10.phx.gbl...
> There's always some activity in the log, like checkpointing etc. Shouldn't
be much but over a long time
> perhaps...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "nupee" <nupee@.discussions.microsoft.com> wrote in message
> news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
full? No new activity such as[vbcol=seagreen]
> adding new databases or user defined data has occurred.
>

model db

Hello,
Question.. why would the model db transaction log be growing and getting full? No new activity such as adding new databases or user defined data has occurred.
Thanks!!There's always some activity in the log, like checkpointing etc. Shouldn't be much but over a long time
perhaps...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"nupee" <nupee@.discussions.microsoft.com> wrote in message
news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
> Hello,
> Question.. why would the model db transaction log be growing and getting full? No new activity such as
adding new databases or user defined data has occurred.
> Thanks!!|||Hi,
As Tibor mentioned the growth will be very minimal, can you check the growth
by executing the below procedure during the growth situation
DBCC SQLPERF(LOGSPACE)
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OdP34WuXEHA.1764@.TK2MSFTNGP10.phx.gbl...
> There's always some activity in the log, like checkpointing etc. Shouldn't
be much but over a long time
> perhaps...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "nupee" <nupee@.discussions.microsoft.com> wrote in message
> news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
> > Hello,
> >
> > Question.. why would the model db transaction log be growing and getting
full? No new activity such as
> adding new databases or user defined data has occurred.
> >
> > Thanks!!
>

model db

Hello,
Question.. why would the model db transaction log be growing and getting full? No new activity such as adding new databases or user defined data has occurred.
Thanks!!
There's always some activity in the log, like checkpointing etc. Shouldn't be much but over a long time
perhaps...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"nupee" <nupee@.discussions.microsoft.com> wrote in message
news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
> Hello,
> Question.. why would the model db transaction log be growing and getting full? No new activity such as
adding new databases or user defined data has occurred.
> Thanks!!
|||Hi,
As Tibor mentioned the growth will be very minimal, can you check the growth
by executing the below procedure during the growth situation
DBCC SQLPERF(LOGSPACE)
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OdP34WuXEHA.1764@.TK2MSFTNGP10.phx.gbl...
> There's always some activity in the log, like checkpointing etc. Shouldn't
be much but over a long time[vbcol=seagreen]
> perhaps...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "nupee" <nupee@.discussions.microsoft.com> wrote in message
> news:601B4E8D-7FC8-40BD-B9CD-215260441284@.microsoft.com...
full? No new activity such as
> adding new databases or user defined data has occurred.
>
sql

model databases

Hi,

When i create a new table in Model database how can i automatically create table in other user databeses. Thanks for your answers

FYI, any object you create in the model databas will be automatically created in any user database you create in the future. So say, you create a table named Table1 in your model database, there will be a table named Table1 in all the user databases you create after that|||

The model database is the mold for future databases that are created. There is no mechanism in place to have other databases "inherit" the structures that are put into model after the database is created.

You would want to either A. Run the create script yourself in existing databases or B. Write a tool to cursor through all databases (possibly using sp_MSforeachdb, which is undocumented, but you can find an abundence of info on the web) and create the objects like that.

I would build something in a UI tool that logs your actions personally, as you should need to do this in dev, test, preprod, and/or prod at some time.

Monday, March 26, 2012

mobsync subs, security

Is there a trick to use mobsync at user level security? We have to set winxp
users to power user to allow the subscriptions to show up in sync manager...
Anyone know the individual folder/file permissions to set?
Thanks!
Scott Kramer
CDS Technologies, Inc.
www.clevelanddata.com
www.groundzerolan.com
www.team501.com
you restrict security to pull subscriptions in the pal at the account or
group level.
To do this right click on your publication and select publication properties
and go to the security tab. Enter the accounts or groups here.
Group membership is the way to administer large numbers of users.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:LOtQc.985$Nd7.61@.fe39.usenetserver.com...
> Is there a trick to use mobsync at user level security? We have to set
winxp
> users to power user to allow the subscriptions to show up in sync
manager...
> Anyone know the individual folder/file permissions to set?
> Thanks!
> --
> Scott Kramer
> CDS Technologies, Inc.
> www.clevelanddata.com
> www.groundzerolan.com
> www.team501.com
>
>
|||those are there, I mean the actual sync manager will not show the
subscription if the security level of the logged in winxp user is Users
(works of member of power users or administrators)
we want to lock these machines down (it replicated sales force db) & want to
avoid users being power users +...
-- Original Message --
From: "Hilary Cotter" <hilaryk@.att.net>
Newsgroups: microsoft.public.sqlserver.replication
Sent: Thursday, August 05, 2004 1:50 PM
Subject: Re: mobsync subs, security

> you restrict security to pull subscriptions in the pal at the account or
> group level.
> To do this right click on your publication and select publication
properties
> and go to the security tab. Enter the accounts or groups here.
> Group membership is the way to administer large numbers of users.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
> news:LOtQc.985$Nd7.61@.fe39.usenetserver.com...
> winxp
> manager...
>
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:#82QDUxeEHA.556@.tk2msftngp13.phx.gbl...
> you restrict security to pull subscriptions in the pal at the account or
> group level.
> To do this right click on your publication and select publication
properties
> and go to the security tab. Enter the accounts or groups here.
> Group membership is the way to administer large numbers of users.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
> news:LOtQc.985$Nd7.61@.fe39.usenetserver.com...
> winxp
> manager...
>
|||what happens if you add the users to the local service group?
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:VpwQc.1882$Nd7.684@.fe39.usenetserver.com...
> those are there, I mean the actual sync manager will not show the
> subscription if the security level of the logged in winxp user is Users
> (works of member of power users or administrators)
> we want to lock these machines down (it replicated sales force db) & want
to
> avoid users being power users +...
> -- Original Message --
> From: "Hilary Cotter" <hilaryk@.att.net>
> Newsgroups: microsoft.public.sqlserver.replication
> Sent: Thursday, August 05, 2004 1:50 PM
> Subject: Re: mobsync subs, security
>
> properties
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:#82QDUxeEHA.556@.tk2msftngp13.phx.gbl...
> properties
>
>
|||how do you do that in xp? I do not see that group--? I'm using compmgmt.msc
(not the dumbed down interface)--
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uC$fu8GfEHA.2896@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> what happens if you add the users to the local service group?
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
> news:VpwQc.1882$Nd7.684@.fe39.usenetserver.com...
want[vbcol=seagreen]
> to
or[vbcol=seagreen]
set[vbcol=seagreen]
or[vbcol=seagreen]
set
>
|||In Groups, double click on the group. Click Add, double click service, OK,
Apply, and OK.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:RTNRc.1877$vn3.478@.fe39.usenetserver.com...
> how do you do that in xp? I do not see that group--? I'm using
compmgmt.msc[vbcol=seagreen]
> (not the dumbed down interface)--
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:uC$fu8GfEHA.2896@.TK2MSFTNGP11.phx.gbl...
Users[vbcol=seagreen]
> want
account[vbcol=seagreen]
> or
> set
account
> or
> set
>
>
|||hmmm, ok, tried service & local service, subs still dont show
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:eodYGIjfEHA.140@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> In Groups, double click on the group. Click Add, double click service, OK,
> Apply, and OK.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
> news:RTNRc.1877$vn3.478@.fe39.usenetserver.com...
> compmgmt.msc
> Users
> account
message[vbcol=seagreen]
to[vbcol=seagreen]
sync[vbcol=seagreen]
> account
message[vbcol=seagreen]
to[vbcol=seagreen]
sync
>
|||I'm a little confused. Are you saying you open up mobsync, and don't see any
subscriptions listed to pull?
If they don't show up here, are they local, ie on the local machine?
What happens if you click on the "To select a subscription select this and
then click properties" and then enter the publication and subscription stuff
manually?
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:d4PRc.2031$vn3.1760@.fe39.usenetserver.com...[vbcol=seagreen]
> hmmm, ok, tried service & local service, subs still dont show
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:eodYGIjfEHA.140@.TK2MSFTNGP12.phx.gbl...
OK,[vbcol=seagreen]
&[vbcol=seagreen]
publication[vbcol=seagreen]
users.[vbcol=seagreen]
> message
have[vbcol=seagreen]
> to
> sync
publication[vbcol=seagreen]
users.[vbcol=seagreen]
> message
have
> to
> sync
>
>
|||error writing to registry
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uO6Rg0jfEHA.2604@.TK2MSFTNGP10.phx.gbl...
> I'm a little confused. Are you saying you open up mobsync, and don't see
any
> subscriptions listed to pull?
> If they don't show up here, are they local, ie on the local machine?
> What happens if you click on the "To select a subscription select this
and
> then click properties" and then enter the publication and subscription
stuff[vbcol=seagreen]
> manually?
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
> news:d4PRc.2031$vn3.1760@.fe39.usenetserver.com...
> OK,
message[vbcol=seagreen]
the[vbcol=seagreen]
is[vbcol=seagreen]
db)
> &
> publication
> users.
> have
> publication
> users.
> have
>
|||use regedt32 to grant everyone access to this key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\80\Replication\Subscriptions
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:I66Sc.1470$Tn6.1330@.fe39.usenetserver.com...[vbcol=seagreen]
> error writing to registry
>
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:uO6Rg0jfEHA.2604@.TK2MSFTNGP10.phx.gbl...
> any
> and
> stuff
service,[vbcol=seagreen]
> message
> the
> is
> db)
the[vbcol=seagreen]
here.[vbcol=seagreen]
in[vbcol=seagreen]
set?[vbcol=seagreen]
the[vbcol=seagreen]
here.[vbcol=seagreen]
in[vbcol=seagreen]
set?
>
>

Wednesday, March 21, 2012

Mixed Mode vs. Windows Authentication

I am trying to create a query that can determine if a user id is using mixed mode/windows/both authentication. I need to do this so that it can run on both sql server 2000 and 2005, meaning I can't use any of the sys.* views. Is there a single query could use for both systems?
-Kyle

Hi kschlap,

there is no method for your issue.

but maybe you can try to build a view to select cross these 2 servers.

create view v_loginid_info

as

select 'servname'='mssql2k', loginid

from mssql2k.master.dbo.sysprocesses

union all

select 'servname'='mssql2k05', loginid

from mssql2k05.master.sys.sysprocess

try to think about.

hoping this can help you.

Best Regrads,

Hunt.

|||I have found the query...

select name, is_policy_checked
from sys.sql_logins

When I use this query, it doesn't pick up the windows authenticated users. Is there a way to get it to pick up all users?
-Kyle|||

How about something like this:

select name, isntuser from syslogins

isntuser=1 means Windows authentication

isntuser=0 means SQL Server authentication

Ben

sql

Mixed mode user name conflict

I'm adding a domain user and there appears to be massive confusion within
SQL 2000 Enterprise Manager when the the domain user is the same as the
mixed mode SQL authentication name, as in
Mixed Mode username = myUserName
Windows Domain Name = myDomain\MyUserName
attempting to give database access to the domain user thru the
Security->logins screen results in
Err 21002 SQL-DMO user 'myUserName'already exists
but you can add it through the database/users screen.
I haven't tried it with 2005 yet...Enterprise Manager isn't actually confused - it is just
preventing you from adding duplicate user names in the
database. The problem is that Enterprise Manager uses
different default database names for Windows logins
depending on how you add the user to the database
When you add the user myDomain\MyUserName to a database from
the Logins in Enterprise Manager, the default database user
name will be MyUserName.
When you add it to the database from the Database Users node
in Enterprise Manager, the default database user name is
myDomain\MyUserName.
When you go to add the user through either methods in
Enterprise Manager, you can modify the default user name for
the database. If you have or will have SQL logins with the
same names as Windows logins without the domain, add the
Windows logins to databases using the domain prefix.
Or you can avoid it by using Query Analyzer and using
sp_grantdbacess 'LoginName'
By default, the login name (with the prefix for windows
logins) will be used. You can specify your own database user
name but the default will work in your case.
-Sue
On Wed, 9 Aug 2006 12:13:26 -0600, "mark gross"
<mgross@.deq.idaho.gov> wrote:

>I'm adding a domain user and there appears to be massive confusion within
>SQL 2000 Enterprise Manager when the the domain user is the same as the
>mixed mode SQL authentication name, as in
>Mixed Mode username = myUserName
>Windows Domain Name = myDomain\MyUserName
>attempting to give database access to the domain user thru the
>Security->logins screen results in
> Err 21002 SQL-DMO user 'myUserName'already exists
>but you can add it through the database/users screen.
>I haven't tried it with 2005 yet...
>

Monday, March 19, 2012

Mix Relative and strict dates

I am trying to write a report where I can have a drop down with values like

yesterday,today,lastweek.
But I also want the user to be able to select a specific range, say 7/1/2006 to 7/5/2006.

Also why can't i update the value of a parameter through to an expression? Like set the value to =Today(). It throws an error about the type.

Can someone point me in the right direction here?

Parameters are typed so you cannot mix relative dates with specific ones. So, you will need muliple parameters and way to determine which ones to use. I would use three parameters, the first one is a drop down with the realative dates and an entry like "Specify." The other two are DateTime parameters for specifying the start and end dates.

The "Specify" entry is to indicate that the user wants to specify specific dates. Otherwise, the user would choose the relative date and the specific dates would be ignored.

For the issue about an error being thrown when you are using the expression, =Today(): make sure the parameter's type is set to DateTime or use =Today().ToString() as the expression, if the parameter's type is string.

Ian|||

I normally use = today, no parentheses, in the parameters

99

|||

I cannot assign a parameter of type DateTime, through the web service. SetParameters() to '=Today()'

|||I think the issue is that you are passing the string '=Today()' where a DateTime is expected. Expressions are not evaluated here, so you need to specifiy the actual value, instead of an expression. E.g., DateTime.Today.

Or you can place the "=Today()" expression directly in the Report for the parameter, where it will be evaluated.|||once you deploy the report with an expression for the value of a parameter, can you change that, without re-deploying the report. Is there a call that can be made to change that expression in the report?|||Expressions are compiled at publish-time and cannot be changed without re-publishing the report. This re-publishing can be done programmatically, but I think there are better alternatives.

What are you looking to accomplish with changing the expression?

Ian|||I am trying to get the user be able to select either the relative dates, yesterday, lastweek... OR select a strict date range in a linked report. Also do you know if there is a control which only displays the parameters of the report, which can be used to display them.|||What would be the way to determine which one to use? Can this all be done while designing the report? do you have an example?