Saturday, February 25, 2012

Password Change

Dear Friends
I have installed MSDE version on my pc but for the same
it have asked me to change the password of SA now i want
to change the password of SA with OSQL utility as i do
not have the Enterprise mangaer. Plese suggest how i can
change the same.
Your earlier reply will be helpful.
Best regards
ShaileshIn Osql you can use the sp_password system SP. Do please check the syntax in
Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"shailesh" <anonymous@.discussions.microsoft.com> wrote in message
news:7a0d01c3e8d5$a3d6fe80$a101280a@.phx.gbl...
quote:

> Dear Friends
> I have installed MSDE version on my pc but for the same
> it have asked me to change the password of SA now i want
> to change the password of SA with OSQL utility as i do
> not have the Enterprise mangaer. Plese suggest how i can
> change the same.
> Your earlier reply will be helpful.
> Best regards
> Shailesh
|||Hi,
From command prompt execute
OSQL -Usa -Ppassword -Sservername -Q"sp_password oldpassword,newpassword,sa"
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eVhRceN6DHA.1804@.TK2MSFTNGP12.phx.gbl...
quote:

> In Osql you can use the sp_password system SP. Do please check the syntax

in
quote:

> Books OnLine.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "shailesh" <anonymous@.discussions.microsoft.com> wrote in message
> news:7a0d01c3e8d5$a3d6fe80$a101280a@.phx.gbl...
>

Password Change

I am relatively new to SQL and have the developer edition
on my desktop. I think that I may have used the wrong
method of authentication as I have to change my password
on the network every 90 dys and now the SQL server
service will not start and I get a password error. When I
try to view the properties I get an error saying the
password is incorrect.You can also change the Windows service account password for the SQL Server
service under Windows 2000/XP as follows.
Right-click on My Computer and select Manage
Select 'Service and Applications' and then Services
Double-click on 'MSSQLSERVER' (or 'MSSQL$YourInstanceName') from the
services list and clock the 'Log On' tab
Once you've successfully started the SQL Server service, you can change the
service account to the system account via Enterprise Manager so that you
don't need to bother with periodically changing the service password.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike" <mrestall@.superbolt.com> wrote in message
news:965e01c3eb21$359cc320$a101280a@.phx.gbl...
quote:

> I am relatively new to SQL and have the developer edition
> on my desktop. I think that I may have used the wrong
> method of authentication as I have to change my password
> on the network every 90 dys and now the SQL server
> service will not start and I get a password error. When I
> try to view the properties I get an error saying the
> password is incorrect.

Password change

Hi,
I have a pull merge replication configured on two of my servers. These
servers replicate over the internet and use the sa password to connect to the
publisher. I know it is not a good practice to use the sa login for
replication purposes. But it has been configured this way. It would be too
much work to re-configure it. I am not sure about this.
But the question that I want to ask is, if i change my subscribers sa
password, replication stops working.
Can someone tell me what the problem can be?
Thank you in advance.
Regards,
Karthik
try to change also the sqlagent pasword.
zrod
"Karthik" <Karthik@.discussions.microsoft.com> wrote in message
news:CFBAAC11-60D8-4A9F-88D2-D14B98E4ED8D@.microsoft.com...
> Hi,
> I have a pull merge replication configured on two of my servers. These
> servers replicate over the internet and use the sa password to connect to
> the
> publisher. I know it is not a good practice to use the sa login for
> replication purposes. But it has been configured this way. It would be too
> much work to re-configure it. I am not sure about this.
> But the question that I want to ask is, if i change my subscribers sa
> password, replication stops working.
> Can someone tell me what the problem can be?
> Thank you in advance.
> Regards,
> Karthik
|||Your pull subscriber authenticates with the agent locally. You can specify
the account to use as well as its password via agent properties.
I think you want to look at [Distributor/Publisher/Subscriber]SecurityMode
and the logon and password parameters.
You should be able to use the accounts of your choice here.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Karthik" <Karthik@.discussions.microsoft.com> wrote in message
news:CFBAAC11-60D8-4A9F-88D2-D14B98E4ED8D@.microsoft.com...
> Hi,
> I have a pull merge replication configured on two of my servers. These
> servers replicate over the internet and use the sa password to connect to
the
> publisher. I know it is not a good practice to use the sa login for
> replication purposes. But it has been configured this way. It would be too
> much work to re-configure it. I am not sure about this.
> But the question that I want to ask is, if i change my subscribers sa
> password, replication stops working.
> Can someone tell me what the problem can be?
> Thank you in advance.
> Regards,
> Karthik

Password change

Hi,
How do I set up sercurity enforcement to have users change their sql
passwords every 30 days?
Thanksmecn,
SQL Server adopts its policies from the Windows local policies. So, I
believe that you would have to change those.
(But, if your servers are having their policies synchronized with the domain
policies, I don't know if your changes will stick locally.)
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
> Hi,
> How do I set up sercurity enforcement to have users change their sql
> passwords every 30 days?
> Thanks
>|||In 2005 you do it in the CREATE LOGIN 8or change with ALTER LOGIN) command.
In 2000, you can't do
that.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...[v
bcol=seagreen]
> Hi,
> How do I set up sercurity enforcement to have users change their sql
> passwords every 30 days?
> Thanks
>[/vbcol]|||My sql2005 is sql authentication. so the users are not windows based users
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%234wTN0IyHHA.4392@.TK2MSFTNGP04.phx.gbl...
> mecn,
> SQL Server adopts its policies from the Windows local policies. So, I
> believe that you would have to change those.
> (But, if your servers are having their policies synchronized with the
> domain policies, I don't know if your changes will stick locally.)
> RLF
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>|||Thanks all
let me say it clearly, I need to enforce sql 2005 sql (authentication) users
to change their passwords every 30 days.
Is there a setting or check box that i could fill?
I don't know how.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:F6BD45B2-27C2-4E6A-924E-FF9DDA37B970@.microsoft.com...
> In 2005 you do it in the CREATE LOGIN 8or change with ALTER LOGIN)
> command. In 2000, you can't do that.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>|||Yes, I know. For SQL Server logins, SQL Server adopts the policies from the
Windows local server that is running the SQL Server. (Windows does its own
managing of Windows login policies.)
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uvKX38IyHHA.1208@.TK2MSFTNGP03.phx.gbl...
> My sql2005 is sql authentication. so the users are not windows based users
>
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:%234wTN0IyHHA.4392@.TK2MSFTNGP04.phx.gbl...
>|||Did you read about the CREATE LOGIN command in Books Online? If you do, you
will find a parameter
which specifies that the Windows policy password expiration policy should ap
ply to this SQL Server
login.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:u978YDJyHHA.4928@.TK2MSFTNGP03.phx.gbl...[v
bcol=seagreen]
> Thanks all
> let me say it clearly, I need to enforce sql 2005 sql (authentication) use
rs to change their
> passwords every 30 days.
> Is there a setting or check box that i could fill?
> I don't know how.
> Thanks
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:F6BD45B2-27C2-4E6A-924E-FF9DDA37B970@.microsoft.com...
>[/vbcol]

Password change

Hi,
How do I set up sercurity enforcement to have users change their sql
passwords every 30 days?
Thanksmecn,
SQL Server adopts its policies from the Windows local policies. So, I
believe that you would have to change those.
(But, if your servers are having their policies synchronized with the domain
policies, I don't know if your changes will stick locally.)
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
> Hi,
> How do I set up sercurity enforcement to have users change their sql
> passwords every 30 days?
> Thanks
>|||In 2005 you do it in the CREATE LOGIN 8or change with ALTER LOGIN) command. In 2000, you can't do
that.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
> Hi,
> How do I set up sercurity enforcement to have users change their sql
> passwords every 30 days?
> Thanks
>|||My sql2005 is sql authentication. so the users are not windows based users
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%234wTN0IyHHA.4392@.TK2MSFTNGP04.phx.gbl...
> mecn,
> SQL Server adopts its policies from the Windows local policies. So, I
> believe that you would have to change those.
> (But, if your servers are having their policies synchronized with the
> domain policies, I don't know if your changes will stick locally.)
> RLF
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> How do I set up sercurity enforcement to have users change their sql
>> passwords every 30 days?
>> Thanks
>>
>|||Thanks all
let me say it clearly, I need to enforce sql 2005 sql (authentication) users
to change their passwords every 30 days.
Is there a setting or check box that i could fill?
I don't know how.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:F6BD45B2-27C2-4E6A-924E-FF9DDA37B970@.microsoft.com...
> In 2005 you do it in the CREATE LOGIN 8or change with ALTER LOGIN)
> command. In 2000, you can't do that.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> How do I set up sercurity enforcement to have users change their sql
>> passwords every 30 days?
>> Thanks
>>
>|||Yes, I know. For SQL Server logins, SQL Server adopts the policies from the
Windows local server that is running the SQL Server. (Windows does its own
managing of Windows login policies.)
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uvKX38IyHHA.1208@.TK2MSFTNGP03.phx.gbl...
> My sql2005 is sql authentication. so the users are not windows based users
>
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:%234wTN0IyHHA.4392@.TK2MSFTNGP04.phx.gbl...
>> mecn,
>> SQL Server adopts its policies from the Windows local policies. So, I
>> believe that you would have to change those.
>> (But, if your servers are having their policies synchronized with the
>> domain policies, I don't know if your changes will stick locally.)
>> RLF
>> "mecn" <mecn2002@.yahoo.com> wrote in message
>> news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> How do I set up sercurity enforcement to have users change their sql
>> passwords every 30 days?
>> Thanks
>>
>>
>|||Did you read about the CREATE LOGIN command in Books Online? If you do, you will find a parameter
which specifies that the Windows policy password expiration policy should apply to this SQL Server
login.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:u978YDJyHHA.4928@.TK2MSFTNGP03.phx.gbl...
> Thanks all
> let me say it clearly, I need to enforce sql 2005 sql (authentication) users to change their
> passwords every 30 days.
> Is there a setting or check box that i could fill?
> I don't know how.
> Thanks
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:F6BD45B2-27C2-4E6A-924E-FF9DDA37B970@.microsoft.com...
>> In 2005 you do it in the CREATE LOGIN 8or change with ALTER LOGIN) command. In 2000, you can't do
>> that.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "mecn" <mecn2002@.yahoo.com> wrote in message news:OdDICuIyHHA.5888@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> How do I set up sercurity enforcement to have users change their sql
>> passwords every 30 days?
>> Thanks
>>
>

Password change

Some one has changed all the passwords on the machine (NT4) that runs our
SQL Server 2000 demo. Now the SQL Server service wont start.
I tried changing the password to the new one through Serives in control
panel but get the following error:
Could not start MSSQLServer Service on \\myserver
Error 2140: An internal Windows NT error occured
I have also tried to select Log On With System Account with the same effect.
I have also tried doing all of this thorugh the SQL Server Enterprise
Manager (edit registration properties) but I just get the following message:
Aconnection could not be established to OURSERVER
Reason SQL serevr does not exist or access denied.
Can any one help?
--
Cheers,
elzikoAnything in the SQL Server errorlog?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"elziko" <elziko@.NOTSPAMMINGyahoo.co.uk> wrote in message
news:%23DxXRCogDHA.2400@.TK2MSFTNGP11.phx.gbl...
> Some one has changed all the passwords on the machine (NT4) that runs our
> SQL Server 2000 demo. Now the SQL Server service wont start.
> I tried changing the password to the new one through Serives in control
> panel but get the following error:
> Could not start MSSQLServer Service on \\myserver
> Error 2140: An internal Windows NT error occured
> I have also tried to select Log On With System Account with the same effect.
> I have also tried doing all of this thorugh the SQL Server Enterprise
> Manager (edit registration properties) but I just get the following message:
> Aconnection could not be established to OURSERVER
> Reason SQL serevr does not exist or access denied.
> Can any one help?
> --
> Cheers,
> elziko
>|||Mmm, I dont know which log you are talkign about but I have found a log
folder with several errorlog file inside. And they do happen to say:
"SQL Server evaluation perios has expired."
OK, so my evaluation is up (should have thought of that)! But is this really
my problem? Surely I would get a message to that effect if the service could
even start or is this sort of message normal for an end of eval?
--
Cheers,
elziko|||All I remember when en eval is out is that you can't start the service. I had to go looking in the
eventlog for just such a message before I realized what the problem was.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"elziko" <elziko@.NOTSPAMMINGyahoo.co.uk> wrote in message
news:ewWGadogDHA.2408@.TK2MSFTNGP09.phx.gbl...
> Mmm, I dont know which log you are talkign about but I have found a log
> folder with several errorlog file inside. And they do happen to say:
> "SQL Server evaluation perios has expired."
> OK, so my evaluation is up (should have thought of that)! But is this really
> my problem? Surely I would get a message to that effect if the service could
> even start or is this sort of message normal for an end of eval?
> --
> Cheers,
> elziko
>

password case seasitive configuration

Hi, All,
I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
sql 2005 data, but the password is case seasitive. The sql 2000 is not case
seasitive, anyone knows we can configure sql 2005 user password is not
seasitive?
Thanks for your time,
MartinTo the best of my knowledge, you cannot change to case insensitive passwords in 2005. This behavior
change is documented in:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
> Hi, All,
> I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
> sql 2005 data, but the password is case seasitive. The sql 2000 is not case
> seasitive, anyone knows we can configure sql 2005 user password is not
> seasitive?
> Thanks for your time,
> Martin|||Hi, Tibor Karaszi,
1) if not in Sql 2005, do you know we can configute IIS web server is not
case seasitive?
2) where to see
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ? can you tell how to go there.
Thanks in advance,
Martin
"Tibor Karaszi" wrote:
> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This behavior
> change is documented in:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
> > Hi, All,
> >
> > I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
> > sql 2005 data, but the password is case seasitive. The sql 2000 is not case
> > seasitive, anyone knows we can configure sql 2005 user password is not
> > seasitive?
> >
> > Thanks for your time,
> > Martin
>|||1: SQL Server 2000 and earlier: Whether a password is case sensitive or not is determined by the
collation for the system databases (AFAIK), which was decided when you installed the SQL Server
instances. To change this, you need to use rebuildm.exe which will scratch all the system databases,
and should be performed unless you have good knowledge of the SQL Server architecture and can
determine what such a rebuild will do.
2: This is an URL for the Books Online that comes with SQL Server 2005. It is installed when you
install 2005, and you find an like in the SQL Server program group.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
> Hi, Tibor Karaszi,
> 1) if not in Sql 2005, do you know we can configute IIS web server is not
> case seasitive?
> 2) where to see
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ? can
> you tell how to go there.
> Thanks in advance,
> Martin
>
> "Tibor Karaszi" wrote:
>> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This
>> behavior
>> change is documented in:
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "martin1" <martin1@.discussions.microsoft.com> wrote in message
>> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
>> > Hi, All,
>> >
>> > I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
>> > sql 2005 data, but the password is case seasitive. The sql 2000 is not case
>> > seasitive, anyone knows we can configure sql 2005 user password is not
>> > seasitive?
>> >
>> > Thanks for your time,
>> > Martin
>>|||Hi, Tibor Karaszi,
yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
for sql 2000 or sql 2005?
Thanks
"Tibor Karaszi" wrote:
> 1: SQL Server 2000 and earlier: Whether a password is case sensitive or not is determined by the
> collation for the system databases (AFAIK), which was decided when you installed the SQL Server
> instances. To change this, you need to use rebuildm.exe which will scratch all the system databases,
> and should be performed unless you have good knowledge of the SQL Server architecture and can
> determine what such a rebuild will do.
> 2: This is an URL for the Books Online that comes with SQL Server 2005. It is installed when you
> install 2005, and you find an like in the SQL Server program group.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
> > Hi, Tibor Karaszi,
> >
> > 1) if not in Sql 2005, do you know we can configute IIS web server is not
> > case seasitive?
> > 2) where to see
> > ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ? can
> > you tell how to go there.
> >
> > Thanks in advance,
> > Martin
> >
> >
> > "Tibor Karaszi" wrote:
> >
> >> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This
> >> behavior
> >> change is documented in:
> >> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> >> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
> >> > Hi, All,
> >> >
> >> > I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
> >> > sql 2005 data, but the password is case seasitive. The sql 2000 is not case
> >> > seasitive, anyone knows we can configure sql 2005 user password is not
> >> > seasitive?
> >> >
> >> > Thanks for your time,
> >> > Martin
> >>
> >>
>|||That only applies to 2000, logins are *always* case sensitive in 2005.
If you want to try this (2000): Make sure you test this on a test server first, as I'm not 100%
positive. But be aware that rebuildm does *a lot* of other things as well (it is pretty close to a
re-install). This is why I mentioned that you should be very familiar with what rebuildm does and
the consequences to running it, etc, before attempting this.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:BF694D38-6032-4598-9CB6-4042F7D6BFC0@.microsoft.com...
> Hi, Tibor Karaszi,
> yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
> for sql 2000 or sql 2005?
> Thanks
> "Tibor Karaszi" wrote:
>> 1: SQL Server 2000 and earlier: Whether a password is case sensitive or not is determined by the
>> collation for the system databases (AFAIK), which was decided when you installed the SQL Server
>> instances. To change this, you need to use rebuildm.exe which will scratch all the system
>> databases,
>> and should be performed unless you have good knowledge of the SQL Server architecture and can
>> determine what such a rebuild will do.
>> 2: This is an URL for the Books Online that comes with SQL Server 2005. It is installed when you
>> install 2005, and you find an like in the SQL Server program group.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "martin1" <martin1@.discussions.microsoft.com> wrote in message
>> news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
>> > Hi, Tibor Karaszi,
>> >
>> > 1) if not in Sql 2005, do you know we can configute IIS web server is not
>> > case seasitive?
>> > 2) where to see
>> > ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ?
>> > can
>> > you tell how to go there.
>> >
>> > Thanks in advance,
>> > Martin
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This
>> >> behavior
>> >> change is documented in:
>> >> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "martin1" <martin1@.discussions.microsoft.com> wrote in message
>> >> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
>> >> > Hi, All,
>> >> >
>> >> > I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
>> >> > sql 2005 data, but the password is case seasitive. The sql 2000 is not case
>> >> > seasitive, anyone knows we can configure sql 2005 user password is not
>> >> > seasitive?
>> >> >
>> >> > Thanks for your time,
>> >> > Martin
>> >>
>> >>
>>|||Thank you so much!
Martin
"Tibor Karaszi" wrote:
> That only applies to 2000, logins are *always* case sensitive in 2005.
> If you want to try this (2000): Make sure you test this on a test server first, as I'm not 100%
> positive. But be aware that rebuildm does *a lot* of other things as well (it is pretty close to a
> re-install). This is why I mentioned that you should be very familiar with what rebuildm does and
> the consequences to running it, etc, before attempting this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:BF694D38-6032-4598-9CB6-4042F7D6BFC0@.microsoft.com...
> > Hi, Tibor Karaszi,
> >
> > yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
> > for sql 2000 or sql 2005?
> >
> > Thanks
> >
> > "Tibor Karaszi" wrote:
> >
> >> 1: SQL Server 2000 and earlier: Whether a password is case sensitive or not is determined by the
> >> collation for the system databases (AFAIK), which was decided when you installed the SQL Server
> >> instances. To change this, you need to use rebuildm.exe which will scratch all the system
> >> databases,
> >> and should be performed unless you have good knowledge of the SQL Server architecture and can
> >> determine what such a rebuild will do.
> >>
> >> 2: This is an URL for the Books Online that comes with SQL Server 2005. It is installed when you
> >> install 2005, and you find an like in the SQL Server program group.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> >> news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
> >> > Hi, Tibor Karaszi,
> >> >
> >> > 1) if not in Sql 2005, do you know we can configute IIS web server is not
> >> > case seasitive?
> >> > 2) where to see
> >> > ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ?
> >> > can
> >> > you tell how to go there.
> >> >
> >> > Thanks in advance,
> >> > Martin
> >> >
> >> >
> >> > "Tibor Karaszi" wrote:
> >> >
> >> >> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This
> >> >> behavior
> >> >> change is documented in:
> >> >> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> >> >> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
> >> >> > Hi, All,
> >> >> >
> >> >> > I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
> >> >> > sql 2005 data, but the password is case seasitive. The sql 2000 is not case
> >> >> > seasitive, anyone knows we can configure sql 2005 user password is not
> >> >> > seasitive?
> >> >> >
> >> >> > Thanks for your time,
> >> >> > Martin
> >> >>
> >> >>
> >>
> >>
>

password case seasitive configuration

Hi, All,
I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
sql 2005 data, but the password is case seasitive. The sql 2000 is not case
seasitive, anyone knows we can configure sql 2005 user password is not
seasitive?
Thanks for your time,
MartinTo the best of my knowledge, you cannot change to case insensitive passwords
in 2005. This behavior
change is documented in:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-
cbee8013c995.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
> Hi, All,
> I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
> sql 2005 data, but the password is case seasitive. The sql 2000 is not cas
e
> seasitive, anyone knows we can configure sql 2005 user password is not
> seasitive?
> Thanks for your time,
> Martin|||Hi, Tibor Karaszi,
1) if not in Sql 2005, do you know we can configute IIS web server is not
case seasitive?
2) where to see
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-
cbee8013c995.htm ? can you tell how to go there.
Thanks in advance,
Martin
"Tibor Karaszi" wrote:

> To the best of my knowledge, you cannot change to case insensitive passwor
ds in 2005. This behavior
> change is documented in:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b54
7-cbee8013c995.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
>|||1: SQL Server 2000 and earlier: Whether a password is case sensitive or not
is determined by the
collation for the system databases (AFAIK), which was decided when you insta
lled the SQL Server
instances. To change this, you need to use rebuildm.exe which will scratch a
ll the system databases,
and should be performed unless you have good knowledge of the SQL Server arc
hitecture and can
determine what such a rebuild will do.
2: This is an URL for the Books Online that comes with SQL Server 2005. It i
s installed when you
install 2005, and you find an like in the SQL Server program group.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...[vbcol=seagreen]
> Hi, Tibor Karaszi,
> 1) if not in Sql 2005, do you know we can configute IIS web server is not
> case seasitive?
> 2) where to see
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b54
7-cbee8013c995.htm ? can
> you tell how to go there.
> Thanks in advance,
> Martin
>
> "Tibor Karaszi" wrote:
>|||Hi, Tibor Karaszi,
yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
for sql 2000 or sql 2005?
Thanks
"Tibor Karaszi" wrote:

> 1: SQL Server 2000 and earlier: Whether a password is case sensitive or no
t is determined by the
> collation for the system databases (AFAIK), which was decided when you ins
talled the SQL Server
> instances. To change this, you need to use rebuildm.exe which will scratch
all the system databases,
> and should be performed unless you have good knowledge of the SQL Server a
rchitecture and can
> determine what such a rebuild will do.
> 2: This is an URL for the Books Online that comes with SQL Server 2005. It
is installed when you
> install 2005, and you find an like in the SQL Server program group.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
>|||That only applies to 2000, logins are *always* case sensitive in 2005.
If you want to try this (2000): Make sure you test this on a test server fir
st, as I'm not 100%
positive. But be aware that rebuildm does *a lot* of other things as well (i
t is pretty close to a
re-install). This is why I mentioned that you should be very familiar with w
hat rebuildm does and
the consequences to running it, etc, before attempting this.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"martin1" <martin1@.discussions.microsoft.com> wrote in message
news:BF694D38-6032-4598-9CB6-4042F7D6BFC0@.microsoft.com...[vbcol=seagreen]
> Hi, Tibor Karaszi,
> yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
> for sql 2000 or sql 2005?
> Thanks
> "Tibor Karaszi" wrote:
>|||Thank you so much!
Martin
"Tibor Karaszi" wrote:

> That only applies to 2000, logins are *always* case sensitive in 2005.
> If you want to try this (2000): Make sure you test this on a test server f
irst, as I'm not 100%
> positive. But be aware that rebuildm does *a lot* of other things as well
(it is pretty close to a
> re-install). This is why I mentioned that you should be very familiar with
what rebuildm does and
> the consequences to running it, etc, before attempting this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:BF694D38-6032-4598-9CB6-4042F7D6BFC0@.microsoft.com...
>

password case seasitive configuration

Hi, All,
I just upgrade sql 2000 to sql 2005, and try to run asp webpage to access
sql 2005 data, but the password is case seasitive. The sql 2000 is not case
seasitive, anyone knows we can configure sql 2005 user password is not
seasitive?
Thanks for your time,
Martin
Hi, Tibor Karaszi,
1) if not in Sql 2005, do you know we can configute IIS web server is not
case seasitive?
2) where to see
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm ? can you tell how to go there.
Thanks in advance,
Martin
"Tibor Karaszi" wrote:

> To the best of my knowledge, you cannot change to case insensitive passwords in 2005. This behavior
> change is documented in:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/65eaafa1-9e06-4264-b547-cbee8013c995.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:6108FE0B-D229-4E56-9CC9-9483AA210FC6@.microsoft.com...
>
|||Hi, Tibor Karaszi,
yuo mean sql server case seasitive can be changed by rebuidm.exe, this is
for sql 2000 or sql 2005?
Thanks
"Tibor Karaszi" wrote:

> 1: SQL Server 2000 and earlier: Whether a password is case sensitive or not is determined by the
> collation for the system databases (AFAIK), which was decided when you installed the SQL Server
> instances. To change this, you need to use rebuildm.exe which will scratch all the system databases,
> and should be performed unless you have good knowledge of the SQL Server architecture and can
> determine what such a rebuild will do.
> 2: This is an URL for the Books Online that comes with SQL Server 2005. It is installed when you
> install 2005, and you find an like in the SQL Server program group.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:059E056C-0F3A-4DCE-AADA-9EDE468DAAE6@.microsoft.com...
>
|||Thank you so much!
Martin
"Tibor Karaszi" wrote:

> That only applies to 2000, logins are *always* case sensitive in 2005.
> If you want to try this (2000): Make sure you test this on a test server first, as I'm not 100%
> positive. But be aware that rebuildm does *a lot* of other things as well (it is pretty close to a
> re-install). This is why I mentioned that you should be very familiar with what rebuildm does and
> the consequences to running it, etc, before attempting this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "martin1" <martin1@.discussions.microsoft.com> wrote in message
> news:BF694D38-6032-4598-9CB6-4042F7D6BFC0@.microsoft.com...
>

password cannot be saved

Hi, there;
I have a SSIS package which has SQL2005 as its destination. When I setup the connectionmanager, I'd like to use SQL authentication. But I found that the password field cannot be saved (Checkbox "Save password" is selected).Everytime I open the this package's connectionmanager, that password field is cleard. The result is that my C# application that loads that package to execute failed with "Login failed..."

Did I do something wrong or anybody know how to save that password field?

CheersThe password in a SQL-authenticated connection is considered sensitive data. SSIS wants to encrypt any sensitive data in the package (see ProtectionLevel). By default it does this with your user key. Unless you've changed the ProtectionLevel, you should be able to save the package and reopen it (as the same user) and have it preserve your password. If you're going to be opening it from an application, your best bet for ProtectionLevel is probably to use the "EncryptSensitiveWithPassword" option, which uses a password to encrypt the sensitive data. The application (and any users) will need to supply this password when opening the package.

A good alternative to storing sensitive data in the package is to read the password into the package using a Package Configuration mechanism.
|||

Thanks.

Do you mean I need another password to open my package?

Where can I set the "ProtectionLevel" in the package?

|||See the link that JayH included.|||

Thank you.

I will try.

Password Audit

Hello All,
I am in the process of auditing a SQL server and was checking for NULL
passwords. I ran the following query select name, password from
master..sysxlogins where password is NULL.
It returned the expected windows accounts with NULL passwords, but it also
returned two unknown accounts with NULL for the SID, Name, and Password, and
a status of 192.
Has anyone ever seen this before, and if so, what they might be?
Thanks
DanHi,
Have you tried with C2 Audit ? Password Audit from www.sqlsecurity.com ?
:-)
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com

Password assign on linked server.

Hello,
Is it possible to know a password that was assign in the creation of a
linked server?
I have tha hash of the user password in Oracle and if i change user password
its possible to do the rollback. But in SQL Server if i need to rollback the
operation i dont know what was the old password.
Thanks and best regards.
Is it not possible for you to change the password of the account that
the Linked Server is using to connect with? You don't need to know the
previous password to change it. Obviously this may not be feasible in
your environment but I don't know of how you can retrieve the password
directly.
ALI
|||Hi Ali,
I need to know the password before change it because it might be possible
that i need to rollback this operation. So to change the password i need to
know what is the older password.
Thanks and best regards.
"zashah@.gmail.com" wrote:

> Is it not possible for you to change the password of the account that
> the Linked Server is using to connect with? You don't need to know the
> previous password to change it. Obviously this may not be feasible in
> your environment but I don't know of how you can retrieve the password
> directly.
> ALI
>

Password assign on linked server.

Hello,
Is it possible to know a password that was assign in the creation of a
linked server?
I have tha hash of the user password in Oracle and if i change user password
its possible to do the rollback. But in SQL Server if i need to rollback the
operation i dont know what was the old password.
Thanks and best regards.Is it not possible for you to change the password of the account that
the Linked Server is using to connect with? You don't need to know the
previous password to change it. Obviously this may not be feasible in
your environment but I don't know of how you can retrieve the password
directly.
ALI|||Hi Ali,
I need to know the password before change it because it might be possible
that i need to rollback this operation. So to change the password i need to
know what is the older password.
Thanks and best regards.
"zashah@.gmail.com" wrote:
> Is it not possible for you to change the password of the account that
> the Linked Server is using to connect with? You don't need to know the
> previous password to change it. Obviously this may not be feasible in
> your environment but I don't know of how you can retrieve the password
> directly.
> ALI
>

Password assign on linked server.

Hello,
Is it possible to know a password that was assign in the creation of a
linked server?
I have tha hash of the user password in Oracle and if i change user password
its possible to do the rollback. But in SQL Server if i need to rollback the
operation i dont know what was the old password.
Thanks and best regards.Is it not possible for you to change the password of the account that
the Linked Server is using to connect with? You don't need to know the
previous password to change it. Obviously this may not be feasible in
your environment but I don't know of how you can retrieve the password
directly.
ALI|||Hi Ali,
I need to know the password before change it because it might be possible
that i need to rollback this operation. So to change the password i need to
know what is the older password.
Thanks and best regards.
"zashah@.gmail.com" wrote:

> Is it not possible for you to change the password of the account that
> the Linked Server is using to connect with? You don't need to know the
> previous password to change it. Obviously this may not be feasible in
> your environment but I don't know of how you can retrieve the password
> directly.
> ALI
>

Password and ID

I am building a website in Dreamweaver. I have tried and tried to get a connection to SQL 2005. Everything works on the web except the stuff that requires the use of my SQL tables. WithOPEN_Conn ="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=master" I get an error at the bottom of my page saying this:

Microsoft OLE DB Provider for SQL Servererror '80004005'

Invalid authorization specification

When I add a password and ID to the string the pages become very slow and I get this error:

Microsoft OLE DB Provider for SQL Servererror '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Using windows authentication when logging into SQL Server doesn't have a user id or password so maybe I just don't know what to put there. I have tried a mix of all the passwords and ID's I use on this computer. Do I even have to have the user ID and password and if not how do I fix the first error? All help appreciated.

youdo use ASP.NET, right? if that's the case, why do you se OLEDB provider? use this type of connection string (standard .net provider)

<connectionStrings>

<addname="myConnectionString"connectionString="Data Source=server_name;Initial Catalog=database;Integrated Security=True"providerName="System.Data.SqlClient"/>

</connectionStrings>

|||

I was trying to use inline VB script

|||

ok... I don't know what's wrong with the oledbSad why don't you try ODBC (you must install sql native client first)

check here for a full list of sql server connection strings using various providers?

http://www.connectionstrings.com/?carrier=sqlserver2005

|||

Here is what I have. OPEN_Conn ="Provider=SQLODBC; Server=HES-DSSK071\SQLEXPRESS;Database=master;Trusted_Connection=True;" Then when I save the site to the
Remote server I get this error. It can also be seen at the bottom of openassessment.org. I have SQL Native Client installed.Confused

ADODB.Connectionerror '800a0e7a'

Provider cannot be found. It may not be properly installed.

|||Hi,

Please try to register sqloledb.dll, because you are using sqloledb provider.

1.At a command prompt, change to the C:\Program Files\Common Files\System\Ole DB folder.2.At a command prompt, type the following command:

regsvr32 sqloledb.dll

3.You should receive confirmation that the DLL is registered successfully.

More information, see:http://support.microsoft.com/kb/278604

Hope that helps. Thanks.

|||

When I try

Nai-Dong Jin - MSFT:

C:\Program Files\Common Files\System\Ole DB

I get an error telling me it is not recognized as an internal or external command, operable program or batch file. When I explore to the same address, sqloledb.dll is in the Ole DB folder.

|||

Hi,

Well, it sounds like a path problem. You can use fixpath(see the link) tool to repair the issue with path. And then, try to register sqloledb.dll again.

http://internet.cybermesa.com/~bstewart/misctools.html

Hope that helps. Thanks

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

|||

I'm still pushing forward. I finally got the sqloledb.dll registered. But I still get the same error. Any other ideas.

|||

Hi,

The following KB article may be helpful to you.

Database connectivity fails with local ASP.NET and ASP servers

ASP: When using a local ASP test server running on XP SP2 with Dreamweaver (i.e. the Testing Server URL prefix is set to "http://localhost"), and you specify "Using driver on testing server" or "Using DSN on testing server," database connectivity fails. If you click the Test button in the Custom Connection String or Data Source Name (DSN) dialog box, it says the connection was made successfully. However, if you then try to browse the tables in the Databases panel or create a recordset, the database tables do not display or you get the following error message: "Unable to retrieve tables from this connection, click on the 'Define...' button to test this connection."

From:http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19515&sliceId=1

Thanks.

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

|||

What I have is a very large site that was given to our company. I was given the job of modifying it to fit our needs. All of the files have the .asp extention, but there is not a single asp tag in any of the 200 pages. So the KB article didn't help much. Maybe this question doesn't belong here since its not really asp.net? Any ideas?

Password

How do i get a password from the master database for a sql user account?
Someone created a password for a sql account and forgot what it was...Would you like me to send you a stored procedure that lists all the users and their passwords, and then exports their credit card numbers and bank accounts to a text file and emails it to you, along with the home addresses, telephone numbers, and current salaries of all the business' top officers, and then shuts down the building's alarm system and unlocks the back door while displaying snow on all the closed-circuit TV monitors?

Well you can't have it. 'Cause its a SECRET! That is what a password is for.

ASSUMING you are actually a person of responsibility, and are not just jonesing for help breaking into a system, then with SA authority you can reset their password to whatever you (or they) want it to be.|||How do i get a password from the master database for a sql user account?
Someone created a password for a sql account and forgot what it was...As a member of the sysadmin group (sa, a domain administrator, and possibly others), you can simply use SQL-EM (Enterprise Manager) or sp_password to forcibly reset the password to whatever you choose.

-PatP|||blindman. -- that was pretty harsh words.
i can easily reset the password through enterprise manager but i do not want to break the application.|||perhaps there's an easier way to get it from the application instead?|||blindman. -- that was pretty harsh words.
i can easily reset the password through enterprise manager but i do not want to break the application.I'll conceed that blindman was rather harsh in his response, but consider your request... We don't know you, have no way to know if you are a legitimate admin in a hard place, or yet another teenager that doesn't like the way that their server is being administered and wants to "take it over to run it right".

You can't exactly expect strangers to be forthcoming with the kind of information that you are requesting... At least not if they are even quasi-responsible people.

-PatP|||What kind of application breaks because a password gets reset?|||unfortunately, I can name a few. They're usually also the kind a password is badly maintained/known/etc.|||If I thought real hard I could possibly imagine a more serious design flaw, but I don't have the time right now...|||funny thing is, that these programs are often so bad that the passwords are easy to guess :)|||but I don't have the time right now...

Since when?

Anyway...don't have such a thin skin...you in IT?

Better get used to it...this is a good place (doesn't show up on the review)

Anyway, Are you talking about application, SQL Server, Or Mixed Security?

I wasn't sure.

And of all of these, only SQL Server security might be needed to maintained by the admin...the rest should be done by the user.

What gives?|||P.S.

You didn't think that was funny?

You gotta just get used to it...and since he doesn't know you...how could it be personal?

It's just bd'ness...|||Sorry jcwc888, but you also have to realize you are not the first person to post the question "How do I find out a user's password" on this forum.

Passwords in SQL Server (as in most secure applications) are stored using a one-way encryption algorithm. That means you can't decipher them even if you know the algorithm that was used.|||Sorry jcwc888, but you also have to realize you are not the first person to post the question "How do I find out a user's password" on this forum.

Passwords in SQL Server (as in most secure applications) are stored using a one-way encryption algorithm. That means you can't decipher them even if you know the algorithm that was used.

If you're talking about SQL Server security...then I beg to differ...(the part about not finding out id's and passwords).

But I'm no snitch...|||...Yup, have in my possession a couple (at least) of thingies that would do a pretty good job hacking an SA password. In our 120+ server environment managed to identify a couple of thousands of WEAK passwords for non-SA accounts (SA has a pretty good xx-character pwd).

But that's not the issue. In 6.5 world it was VERY easy, I didn't even save the script because it's too easy to reproduce. In 7.0 and 2K it won't work because as blindman said, it's a "one-way encryption algorythm", so without resetting it you may want to become a hacker for a couple of days (may take longer, depends on the hacking weapon you choose ;))|||What qualified as "weak" passwords? Just the usual "November01", "MyUserName + 01" type of crap?|||Actually worse, when Login=Password or Login=NULL_PASSWORD|||Weak?

That's like a martini left in ice for an hour...

bleach

password

I have a DTS saved as a structered storage file.How can I provide SQL SERVER Logon ID and password for this DTS package and call it within a SP through the LOGON ID and Password?exec master..xp_cmdshell 'dtsrun /Ssql1 /NPublish /E'
--This will execute the DTSRun command line utility with the parameters

/S = SQL Server Host Name
/N = DTS Package Name
You can either use /E for "trusted connection" or /U/P to supply username and passwords

You will need the correct permissions to run xp_cmdshell since it is in the MASTER database.

password

I have lost my password for my mssqlserver can someone help me retrieve it or
should I delete this server and download another.
On Wed, 26 Oct 2005 12:20:02 -0700, RonP wrote:

>I have lost my password for my mssqlserver can someone help me retrieve it or
>should I delete this server and download another.
Hi Ron,
If you are not the DBA, then ask the DBA to reset your password.
If you are the DBA, then log on to the computer with the Administrator
account, then connect to SQL Server using windows authentication (i.e.
you don't specify a SQL Server userid and password; SQL Server relies on
Wondows' authentication that you are indeed "Administrator"). You can
now use sp_password to change the password for your regular account.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)

password

Hi,
Is there any way to show one column(password) values as ***.
One of my table has password field, when you query the table it will give actual value, i wanted to show them as **** or with junk charecters.
FYI..column data type is varchar(50).
Thanks in advance.You could use Pwdencrypt and pwdcompare:

Pwdencrypt and pwdcompare are internal, undocumented functions that SQL Server uses to manage passwords. Pwdencrypt uses a one-way hash that takes a clear string and returns an encrypted version of that string. Pwdcompare compares an unencrypted string to its encrypted representation to see whether they match.

Script below shows how to save and compare passwords:

create table users(
id int identity,
username nvarchar(128) not null unique,
userpassword nvarchar(128) not null
)

insert users(username,userpassword)
select 'tom',pwdencrypt('tom2')

insert users(username,userpassword)
select 'brett',pwdencrypt('brett2')

select Id from users
where pwdcompare('tom2',userpassword)=1
and username='tom'

Id
----
1

(1 row(s) affected)

select Id from users
where pwdcompare('brett3',userpassword)=1
and username='brett'
Id
----

(0 row(s) affected)|||Thanks for your reply.
And is there any way to decrypt the password, if you loose your actual password?
Thanks|||Thanks for your reply.
And is there any way to decrypt the password, if you loose your actual password?
Thanks
Nope ;) just set up new one|||Yeah, the point is to encrypt the password before it is stored in your table. And if it could be decrypted, it wouldn't be very secure, right?

Actually, SQL Server's encryption method has been cracked, and decryption algorythms are available on the web. If you want more security, I have a one-way encryption function you are welcome to use.|||Any leads would be greatly appreciated!!
Thanks|||Here is my pasword encryption algorythm.

The other disadvantage of using SQL Server's PWD_ENCRYPT function is that Microsoft can and has changed the algorythm in subsequent releases of SQL Server, rendering all existing passwords useless.|||Just curious...what sql server security model are you using?

I'm always leary of Application level security that store passwords in the database.|||Mixed mode.
thanks

PASSWORD

I forgot my "sa" password for SQL2000. Is there some place to look to get
it back? (Enterprise Manager or Query Analizer) please help?This is a multi-part message in MIME format.
--=_NextPart_000_0167_01C3A9CF.CEBC57C0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Unless you removed the BUILTIN\Administrators group from the sysadmin role,
you can connect as a local Windows administrator on the server and use
Windows authentication to log into SQL Server. At that time, you can reset
the sa password.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"matta25" <matta125work@.hotmail.com> wrote in message
news:#1wbjkfqDHA.2820@.TK2MSFTNGP10.phx.gbl...
I forgot my "sa" password for SQL2000. Is there some place to look to get
it back? (Enterprise Manager or Query Analizer) please help?
--=_NextPart_000_0167_01C3A9CF.CEBC57C0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Unless you removed the =BUILTIN\Administrators group from the sysadmin role, you can connect as a local Windows =administrator on the server and use Windows authentication to log into SQL =Server. At that time, you can reset the sa password.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"matta25" = wrote in message news:#1wbjkfqDHA.2820=@.TK2MSFTNGP10.phx.gbl...I forgot my "sa" password for SQL2000. Is there some place to look =to getit back? (Enterprise Manager or Query Analizer) please help?

--=_NextPart_000_0167_01C3A9CF.CEBC57C0--

Pass-through to SAS

Is it possible from sql to use SAS as an object? And if so how?

I was recently tasked with Data Profiling and sitting next to me is a SAS developer, who just has to run a couple of functions, to do what has taken me days (and I haven't finished!). If I could call out to SAS and run the SAS functions it would be great. I have looked on the net and can see SAS calling out to SQL but not the other way round. Technically I'm probably not up to this but I don't want this to hold me back... so any help would be great.It probably is possible, and the method depends on exactly what you want to do. I'm sorry I can't be more specific, but without more to go on that is the best I can do.

If you have the ODBC driver for SAS, that would help a lot. If not, but you can execute master.dbo.xp_cmdshell and put the SAS client on the server, that might help too.

-PatP|||Uhmmm, what are you trying to do? Maybe there is a faster method that you are not aware of...|||Sorry for the delay I've been away....

I'm going to leave the communication to SAS from SQL for now, but I had a look at another thread 'Cursor or temp table' which seemed appropriate, I'm well aware coming from Foxpro to SQL I have a lot to learn.

I was tasked with data profiling on our warehouse and so set to writing some generic functions to gather some basic statistics on the dml layer. (Looked at what SAS could provide and it was just over the top)

1. How many nulls
2. Frequency on values
3. Min & Max values

I gathered the database info from information_schema, added an extra column to tag the tables and columns I was interested in and then used this to run the MAX(), MIN() and COUNT(*) functions and then stored the results to a table.

My questions are: I'm I missing something, could I have done this without a cursor? 2) Would it have been faster and better to create a temp table and then skipped thru that? 3) I couldn't have done all this in a select could I?|||Yeah, you could probably do it all in a SELECT, unless there are some odd complications you not telling us about.

Pass-Through Authentication won't work when replicating via the ActiveX Library?

Hi all,
My sql2000 to sql2000 merge replication via internet is run via an
application on the subscriber using activex library.
I read about setting up pass-through authentication so that the user
accounts don't need to be on the same domain. So, I set up Sql Server
and Sql Agent to run on a user account set up identically on each
machine. But, it doesn't seem like the Sql Agent is even involved in
the communication on the subscriber.
Authentication at the publisher fails because it is trying to
authenticate - not the account that sql server and sql agent services
are running under - but the current windows account running on the
subscriber.
ie:
- sql server and sql agent running under "serviceAccount"
- windows user on subscriber machine logged in as "Joe"
- error at publisher = cannot authenticate Joe.
Now, if I create a Joe user on the publisher, with the same password as
on the subscriber, everything works. But this is an impossible setup to
work with because of course there will be many different unknown users.
Please, can anyone help with this? I can't find this problem
anywhere...
JJ
Its probably using the security context of the account you are logged in
under. If you were to run this program/script as a job spawned by SQL Server
agent it would work. Another option would be to use the run as command (have
a look at runas from the command prompt).
I think your best bet would be to use sql authentication though.
This could also be an rights issue when you connect to the snapshot share -
exactly what error message are you getting?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"JJ" <joe.jabour@.gmail.com> wrote in message
news:1121742075.969113.19600@.z14g2000cwz.googlegro ups.com...
> Hi all,
> My sql2000 to sql2000 merge replication via internet is run via an
> application on the subscriber using activex library.
> I read about setting up pass-through authentication so that the user
> accounts don't need to be on the same domain. So, I set up Sql Server
> and Sql Agent to run on a user account set up identically on each
> machine. But, it doesn't seem like the Sql Agent is even involved in
> the communication on the subscriber.
> Authentication at the publisher fails because it is trying to
> authenticate - not the account that sql server and sql agent services
> are running under - but the current windows account running on the
> subscriber.
> ie:
> - sql server and sql agent running under "serviceAccount"
> - windows user on subscriber machine logged in as "Joe"
> - error at publisher = cannot authenticate Joe.
> Now, if I create a Joe user on the publisher, with the same password as
> on the subscriber, everything works. But this is an impossible setup to
> work with because of course there will be many different unknown users.
>
> Please, can anyone help with this? I can't find this problem
> anywhere...
> JJ
>
|||Yes I'm pretty sure that it's a rights issue - i was seeing error 1326
(unknown user or bad password). Like you said, it's likely because it's
using the security context of the account that I am logged in under on
the subscriber. In fact, I know that's the issue, b/c if I change the
username and password of my windows account that i am logged in under
on the subscriber to match the publisher, everything works like a
charm. But this is an impossible setup for me.
The issue here is that this is supposed to be an installable
application (unknown users)using MSDE on the subscriber, and the
application is using the ActiveX library - so anything outside of the
control of what can be set up by an installation app won't be feasible.
Re SQL authentication, are you saying that if I change the SQL Server
setup on the subscriber to use SQL authentication instead of windows
authentication, that it might work?
JJ
|||Yes, I am suggesting you do both (SQL authentication on the publisher and
subscriber). You can also use a com component and have this component run
under different security credentials than the account the user is logged on
under.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"JJ" <joe.jabour@.gmail.com> wrote in message
news:1121776681.002861.67670@.o13g2000cwo.googlegro ups.com...
> Yes I'm pretty sure that it's a rights issue - i was seeing error 1326
> (unknown user or bad password). Like you said, it's likely because it's
> using the security context of the account that I am logged in under on
> the subscriber. In fact, I know that's the issue, b/c if I change the
> username and password of my windows account that i am logged in under
> on the subscriber to match the publisher, everything works like a
> charm. But this is an impossible setup for me.
> The issue here is that this is supposed to be an installable
> application (unknown users)using MSDE on the subscriber, and the
> application is using the ActiveX library - so anything outside of the
> control of what can be set up by an installation app won't be feasible.
>
> Re SQL authentication, are you saying that if I change the SQL Server
> setup on the subscriber to use SQL authentication instead of windows
> authentication, that it might work?
> JJ
>
|||SQL auth on both didn't work - It was still using the credentials of
the windows login on the subscriber.
Solution - I created a "launcher" application that starts the
application under credentials that match the publisher.
Thanks for the help.
|||Well, it worked on my LAN, but not when i tested it from outside the
LAN. Again, permission problems. Do I need to upgrade the server to a
domain controller?
JJ

Passqord Policy on SQL Server

Hello,
I'm new to SQL Server and I was wondering if I'm using SQL Server
authentication then how I configure the password policies such as password
age and password complexity.
Thanks
Manish
SQL Server 2000 does not support password age / complexity in regards to SQL
Server logins, but future versions probably will.
Keith
"MJ" <MJ@.discussions.microsoft.com> wrote in message
news:9EF4FED3-9C01-47FC-8765-4BFFD7272AE2@.microsoft.com...
> Hello,
> I'm new to SQL Server and I was wondering if I'm using SQL Server
> authentication then how I configure the password policies such as password
> age and password complexity.
> Thanks
> Manish
>

Passport sign out from this forum

Just lately I have noticed that I am periodically getting signed out of this forum. When I try and sign back in I get directed to an error page saying:

We apologize, but an unknown error has occured in the forums.

This error has been logged.

I would say this has been happening for a couple of weeks now at least.

Has anyone else expereienced this?

Thanks

Jamie

Not seen the error, but I am always having to sign back in, several times a day on the same machine.

Passphrase lost after moving users

I know something like this was addressed before on this forum but I am unable to locate it at all...
Anyone know the solution ?
Problem :
After you move databases to a new server, users may not be able to log in to the new server:
Used DTS ...
Thanks..checkout sp_change_users_login in BOL

sp_change_users_login [ @.Action = ] 'action'
[ , [ @.UserNamePattern = ] 'user' ]
[ , [ @.LoginName = ] 'login' ]
[ , [ @.Password = ] 'password' ]

Passive node starting the SQL Server services - services set to ma

Hello all,
I have a very bizarre situation with a single instance/two node/W2K3
cluster. The issue I am seeing is that the passive node is starting the sql
server services even though the resources are not owned by that node. The
restarts are occuring every five minutes. The system log shows the SYSTEM
account starting MSSQLSERVER. Then, 3 seconds later, I get a message stating
the service stopped. About 5-8 seconds later, I get a message that the
SQLSERVERAGENT could not be started because sqlservr.exe is not running. The
cluster log is not showing anything being started/stopped. The applicaiton
log is complaining about the errorlog being unavailable. However, this is
correct because the resources are not on this node.
The SQL Server services are set to manual on both nodes. Both nodes have
been rebooted in the past 24 hours due to EMC PowerPath upgrades. The only
thing that is a little bizare is that the SQL Server resource group and SQL
Server resource have the preferred owners/possible owners in reverse order.
IE (SQL Server resource group has NODE1/NODE2; SQL Server Resource has
NODE2/NODE1). Right now all resources are on NODE1.
Any ideas would be greatly appreciated.
Thanks in advance
Chris.
Manual start for services is correct for a cluster. The cluster should
control the services on each node. Look at the applicaiotn logs on both
nodes. Check the failover/failback settings. You may be seeing a failback
condition due to different preferred node settings.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Christopher" <Christopher@.discussions.microsoft.com> wrote in message
news:E5873D57-2A8F-4B7B-B76C-7146B8A629DD@.microsoft.com...
> Hello all,
> I have a very bizarre situation with a single instance/two node/W2K3
> cluster. The issue I am seeing is that the passive node is starting the
> sql
> server services even though the resources are not owned by that node. The
> restarts are occuring every five minutes. The system log shows the SYSTEM
> account starting MSSQLSERVER. Then, 3 seconds later, I get a message
> stating
> the service stopped. About 5-8 seconds later, I get a message that the
> SQLSERVERAGENT could not be started because sqlservr.exe is not running.
> The
> cluster log is not showing anything being started/stopped. The
> applicaiton
> log is complaining about the errorlog being unavailable. However, this is
> correct because the resources are not on this node.
> The SQL Server services are set to manual on both nodes. Both nodes have
> been rebooted in the past 24 hours due to EMC PowerPath upgrades. The
> only
> thing that is a little bizare is that the SQL Server resource group and
> SQL
> Server resource have the preferred owners/possible owners in reverse
> order.
> IE (SQL Server resource group has NODE1/NODE2; SQL Server Resource has
> NODE2/NODE1). Right now all resources are on NODE1.
> Any ideas would be greatly appreciated.
> Thanks in advance
> Chris.

passing the value of the Name property from a textbox to a parameter ?

Hi All,
I'd like to pass the name or label of a textbox to a parameter but I
am not sure of how to get it done.
I have a table (the PK is on Language and Field)
Language(PK)
Field (PK)
FieldName
and a data set query:
"SELECT * from table
WHERE Language = @.Language AND Field = @.Field"
The parameter @.LanguageCode is based on user input and I want the
parameter @.Field to be based on the Name of a textbox (or eq. object
in the report)
(@.Field=Fields!Field.Name, "table")
The Value of the textbox should be set to the appropriate fieldname
based on the users choice of language and the identifier of the
textbox...
...something like:
=IIF(Parameters!Language.Value = 1, Fields!FieldName.Value, "table",
IIF(Parameters!Language.Value = 2, Fields!FieldName.Value, "table",
'Not Translated!'))
Anyone got any ideas?
Thanks a million in advance!
Regards NickWell...
I dynamically transposed the data in the table in order to use the
First() function in RS, problem solved.
Still I wonder how do you use labels and such from the report to
filter data in the data set?
/n|||You'd have to use parameters or fields from a dataset. Report items cannot
be used in filter expressions.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Niklas W" <niklas.westerholm@.intellibis.se> wrote in message
news:655bff8b.0408130442.754cd47f@.posting.google.com...
> Well...
> I dynamically transposed the data in the table in order to use the
> First() function in RS, problem solved.
> Still I wonder how do you use labels and such from the report to
> filter data in the data set?
> /n

Passing the User ID and AD group as Parameter

Hi...
I have a requirement where I need to pass the Users Windows userID and the AD group through which he is associated to the database so that I can get appropiate data.

Is there a way I can pass the Windows user ID and the AD group(through which he is authenticated in Reporting Serivces) through the Reporting Serivces as a parameter so that it can be used in the Reporting Query.

Thanks,
siaj

The UserID parameter in the report holds the username information including the logged on domainor machine. getting the AD Group in which the user is authenticated to view the report is a bit different as the user can be in multiple groups, though it can′t be identified which group the user has granted the effective permissions to the report. (if you are hit by a machine gun you probably won′t know which bullet killed you at the end :-) )

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

As Jens says, UserID is just available using the internal object. For the AD group you should consider writing a custom assembly that performs the operation according to your business rules to decide which is THE group among the ones the user may pertain. I've not checked how difficult it will be to write such code in .Net but sounds not much complicated.

Best regards,
Jordi Rambla
MVP SQL Server
SolidQualityLearning|||Hi Siaj,

Were you able to figure this out? I am in need of the same functionality. I undertand .Net has a 'IsInGroup()' function that can check if a user is in a group but I am not sure how it goes...

Thanks,
Ben|||test|||Have you figured this out? I am in the same situation...

Thanks,
Ben

Passing the User ID and AD group as Parameter

Hi...
I have a requirement where I need to pass the Users Windows userID and the AD group through which he is associated to the database so that I can get appropiate data.

Is there a way I can pass the Windows user ID and the AD group(through which he is authenticated in Reporting Serivces) through the Reporting Serivces as a parameter so that it can be used in the Reporting Query.

Thanks,
siaj

The UserID parameter in the report holds the username information including the logged on domainor machine. getting the AD Group in which the user is authenticated to view the report is a bit different as the user can be in multiple groups, though it can′t be identified which group the user has granted the effective permissions to the report. (if you are hit by a machine gun you probably won′t know which bullet killed you at the end :-) )

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

As Jens says, UserID is just available using the internal object. For the AD group you should consider writing a custom assembly that performs the operation according to your business rules to decide which is THE group among the ones the user may pertain. I've not checked how difficult it will be to write such code in .Net but sounds not much complicated.

Best regards,
Jordi Rambla
MVP SQL Server
SolidQualityLearning|||Hi Siaj,

Were you able to figure this out? I am in need of the same functionality. I undertand .Net has a 'IsInGroup()' function that can check if a user is in a group but I am not sure how it goes...

Thanks,
Ben|||test|||Have you figured this out? I am in the same situation...

Thanks,
Ben

Passing the same variable into a few SQL queries & join them

I have a table that has these fields:
AgentID, Address, RegNo, CnNo, IssueDt, SubmitDt, NoOfDays

Example of data is:

AgentID Address RegNo CnNo IssueDt SubmitDt NoOfDays
1 No 5, Jln Abc KL123 11111 4/12/03 4/15/03 3
1 No 5, Jln Abc KL123 12345 5/10/03 5/20/03 10
1 No 5, Jln Abc KL123 13000 6/13/03 6/13/03 0
1 No 5, Jln Abc KL123 15123 8/15/03 8/16/03 1

NoOfDays actually is DateDiff("d", IssueDt, SubmitDt)

I have to build a report for each Quarter that contains the following:

Agent: 1
Address: No 5, Jln Abc
RegNo: KL123
Total of CN: 3
Total of CN(with Days>0): 2
Days (Min): 3
Days (Max) : 10

This is based on the 2nd quarter (from April to June).

What I did is, I created 3 views.
1)A view that gets Count(CnNo) GROUP BY all the fields HAVING DatePart("quarter", IssueDt) = varQuarter
2)A view that gets Count(CnNo) GROUP BY all the fields HAVING DatePart("quarter", IssueDt) = varQuarter AND NoOfDays > 0
3)A view that gets Min(NoOfDays), Max(NoOfDays) GROUP BY .....HAVING DatePart("quarter", IssueDt) = varQuarter

Right now, I hard code the varQuarter as 2.
After creating all these views, I joined them together to become a view & put all the info in the crystal report to produce the report.

My problem is to make the report dynamic.
I don't know how to pass the Quarter variable into these views.Take the sql for each of the views, place them into a stored procedure, and do the appropriate joins. Replace all your hardcoded varQuarter with @.VarQuarter and define @.VarQuarter as an input parameter for the stored procedure.

Then call it like this:


EXEC BigReportQuery @.VarQuarter=3

The definition of BigReportQuery would start like this:

CREATE PROCEDURE [dbo].[BigReportQuery]
@.VarQuarter int
AS
SELECT x,y,z FROM SomeTable INNER JOIN ... HAVING DatePart("quarter",IssueDt)=@.VarQuarter ... etc.
GO

Alternatively, just combine calls to each of the existing views but from within the stored procedure.

Passing text parameters

Hello Guys,

create procedure spsCheckMsg(
@.sTyp as varchar(100),
@.tMsg as text) as
select @.tMsg = md_body from tbl_msgdef where msgname = @.sTyp

Parameters of the type text can be used in stored procedures. So I wanted to get the text data (md_body) by a select statement and pass it to the parameter @.tMsg. This code doesn't work. I always get the message "The assignment operation can't have a text datatype as argument" which refers to the select statement.

Does anyone have a solution for this?Howdy

If I have understood correctly, try :

-------------------
Create Procedure spsCheckMsg
(
@.sTyp as varchar(1000),
@.tMsg as varchar(1000)
)

AS

set @.tMsg =
( select convert(varchar(1000),md_body) from tbl_msgdef where msgname = @.sTyp )
-------------------

Cheers,

SG

Passing Text in parameter dropdown

I have a month drop down list.

In my dataset I have the code which generates month name for all months.

In my parameter list I want the functionality of the user able to select 'All' as Month name.

How can I achieve this in the query and parameter.

Code for month generation is as.

SELECT DISTINCTSUBSTRING(DATENAME(mm, T1.OPEN_TIME), 0,4) AS Month,
DATENAME(mm, T1.OPEN_TIME) AS MONTH_NAME_FULL,
DATEPART(mm, T1.OPEN_TIME) AS MONTH_NUM
FROM APPS237.Cats.dbo.Pd T1
Order By
DATEPART(mm, T1.OPEN_TIME)

Thanks,

Kiran.


You can use the UNION ALL clause to add the 'All' entry to the beginning of the table generated by your query. For example,

SELECT DISTINCT SUBSTRING(DATENAME(mm, T1.OPEN_TIME), 0,4) AS Month,
DATENAME(mm, T1.OPEN_TIME) AS MONTH_NAME_FULL,
DATEPART(mm, T1.OPEN_TIME) AS MONTH_NUM
FROM APPS237.Cats.dbo.Pd T1
UNION ALL
SELECT 'All', 'All', 0
Order By MONTH_NUM

Ian

Passing Temp Table Values into a UDF

This one is interesting...

Is there any way to pass a joined parameter into a UDF as I'm attempting below?

I have a temp table that I'm trying to create:

create table #t3
(bmkPerson int primary key,
LangCode nchar(5),
SName varchar(1000)
)
insert into #t3
select t2.bmkPerson, t2.LangCode,
select SName from SName_trans_udf(t2.LangCode)
from #t2 t2

Thanks in advance,

Renae
hilary321@.yahoo.comRenae (hilary321@.yahoo.com) writes:
> Is there any way to pass a joined parameter into a UDF as I'm attempting
> below?
> I have a temp table that I'm trying to create:
> create table #t3
> ( bmkPerson int primary key,
> LangCode nchar(5),
> SName varchar(1000)
> )
> insert into #t3
> select t2.bmkPerson, t2.LangCode,
> select SName from SName_trans_udf(t2.LangCode)
> from #t2 t2

No, you cannot pass a column value to a table-valued UDF. And when you
think of it it is logical: what result would you get? For each column
you get a whole table back. A scalar UDF works fine, because it's a
scalar value you need here.

SQL 2005 however does permit you to pass a column to a table-valued
UDF, but there is a special syntax for this. (Which I have not explored
yet, so I cannot give any examples.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Passing table-type variables to SP?

Sorry about posting twice, but I had some trouble with setting the date on
this machine...
I would like to write a stored procedure that takes a table (i.e. table
variable) as its parameter.
E.g.:
DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
SP_MYPROC @.mytable
What should SP_MYPROC's signature look like? I can't seem to be able to find
anything about this in the documenation.
I guess it would look something like this:
ALTER PROCEDURE SP_MYPROC
(@.t TABLE)
or
ALTER PROCEDURE SP_MYPROC
(@.t TABLE(ID INT, NAME VARCHAR(50)))
Actually, how big is the freedom when taking such a parameter? Is it enough
to use the first version and treat the table whatever way I would like to?
E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
any tables the second column of which is of type VARCHAR of any size.
Hi
You can not pass a table data type to a stored procedure. You may want to
use temporary tables instead.
From Books online "Create procedure" topic
CREATE PROC [ EDURE ] [ owner. ] procedure_name [ ; number ]
[ { @.parameter data_type }
[ VARYING ] [ = default ] [ OUTPUT ]
] [ ,...n ]
[ WITH
{ RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
[ FOR REPLICATION ]
AS sql_statement [ ...n ]
data_type
Is the parameter data type. All data types, except the table data type, can
be used as a parameter for a stored procedure. However, the cursor data type
can be used only on OUTPUT parameters. When you specify a data type of
cursor, the VARYING and OUTPUT keywords must also be specified. For more
information about SQL Server - supplied data types and their syntax, see
Data Types.
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:OppBdMHtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> Sorry about posting twice, but I had some trouble with setting the date on
> this machine...
> I would like to write a stored procedure that takes a table (i.e. table
> variable) as its parameter.
> E.g.:
> DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
> SP_MYPROC @.mytable
> What should SP_MYPROC's signature look like? I can't seem to be able to
find
> anything about this in the documenation.
> I guess it would look something like this:
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE)
> or
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE(ID INT, NAME VARCHAR(50)))
> Actually, how big is the freedom when taking such a parameter? Is it
enough
> to use the first version and treat the table whatever way I would like to?
> E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
> any tables the second column of which is of type VARCHAR of any size.
>
>
|||You cannot pass a table variable from one sp to another.
This article discuss the options to share data between procs.
http://www.sommarskog.se/share_data.html
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:OppBdMHtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> Sorry about posting twice, but I had some trouble with setting the date on
> this machine...
> I would like to write a stored procedure that takes a table (i.e. table
> variable) as its parameter.
> E.g.:
> DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
> SP_MYPROC @.mytable
> What should SP_MYPROC's signature look like? I can't seem to be able to
> find
> anything about this in the documenation.
> I guess it would look something like this:
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE)
> or
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE(ID INT, NAME VARCHAR(50)))
> Actually, how big is the freedom when taking such a parameter? Is it
> enough
> to use the first version and treat the table whatever way I would like to?
> E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
> any tables the second column of which is of type VARCHAR of any size.
>
>

Passing table-type variables to SP?

Sorry about posting twice, but I had some trouble with setting the date on
this machine... :)
I would like to write a stored procedure that takes a table (i.e. table
variable) as its parameter.
E.g.:
DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
SP_MYPROC @.mytable
What should SP_MYPROC's signature look like? I can't seem to be able to find
anything about this in the documenation.
I guess it would look something like this:
ALTER PROCEDURE SP_MYPROC
(@.t TABLE)
or
ALTER PROCEDURE SP_MYPROC
(@.t TABLE(ID INT, NAME VARCHAR(50)))
Actually, how big is the freedom when taking such a parameter? Is it enough
to use the first version and treat the table whatever way I would like to?
E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
any tables the second column of which is of type VARCHAR of any size.Hi
You can not pass a table data type to a stored procedure. You may want to
use temporary tables instead.
From Books online "Create procedure" topic
CREATE PROC [ EDURE ] [ owner. ] procedure_name [ ; number ]
[ { @.parameter data_type }
[ VARYING ] [ = default ] [ OUTPUT ]
] [ ,...n ]
[ WITH
{ RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
[ FOR REPLICATION ]
AS sql_statement [ ...n ]
data_type
Is the parameter data type. All data types, except the table data type, can
be used as a parameter for a stored procedure. However, the cursor data type
can be used only on OUTPUT parameters. When you specify a data type of
cursor, the VARYING and OUTPUT keywords must also be specified. For more
information about SQL Server - supplied data types and their syntax, see
Data Types.
John
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:OppBdMHtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> Sorry about posting twice, but I had some trouble with setting the date on
> this machine... :)
> I would like to write a stored procedure that takes a table (i.e. table
> variable) as its parameter.
> E.g.:
> DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
> SP_MYPROC @.mytable
> What should SP_MYPROC's signature look like? I can't seem to be able to
find
> anything about this in the documenation.
> I guess it would look something like this:
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE)
> or
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE(ID INT, NAME VARCHAR(50)))
> Actually, how big is the freedom when taking such a parameter? Is it
enough
> to use the first version and treat the table whatever way I would like to?
> E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
> any tables the second column of which is of type VARCHAR of any size.
>
>|||You cannot pass a table variable from one sp to another.
This article discuss the options to share data between procs.
http://www.sommarskog.se/share_data.html
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Agoston Bejo" <gusz1@.freemail.hu> wrote in message
news:OppBdMHtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> Sorry about posting twice, but I had some trouble with setting the date on
> this machine... :)
> I would like to write a stored procedure that takes a table (i.e. table
> variable) as its parameter.
> E.g.:
> DECLARE @.mytable = TABLE(ID INT, NAME VARCHAR(50))
> SP_MYPROC @.mytable
> What should SP_MYPROC's signature look like? I can't seem to be able to
> find
> anything about this in the documenation.
> I guess it would look something like this:
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE)
> or
> ALTER PROCEDURE SP_MYPROC
> (@.t TABLE(ID INT, NAME VARCHAR(50)))
> Actually, how big is the freedom when taking such a parameter? Is it
> enough
> to use the first version and treat the table whatever way I would like to?
> E.g. not assuming that the 'NAME' column is a VARCHAR(50), but taking
> any tables the second column of which is of type VARCHAR of any size.
>
>