Hi,
Is there is a method to reset the 'sa' password? I have a
server that moved between few different domains and I am
not sure which domain accounts have access to it. And We
do not know the 'sa' password.
I thought there was a registry key that could be removed
to reset the password? Is that possible?
Thanks,If you log onto the server with a different system admin user, or a
local/domain windows administrator, you can use master..sp_password.
--
http://www.aspfaq.com/
(Reverse address to reply.)
<anonymous@.discussions.microsoft.com> wrote in message
news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,|||anonymous@.discussions.microsoft.com wrote:
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
You need to connect using another admin account and then reset the
password on the "sa" account. If you do not have any other admin
accounts, I don't think you can reset the password. You may have to
reinstall SQL Server and restore/reattach your databases.
--
David G.|||If you can not connect via sa and you have removed
the 'builtin\administrators' account, you are going to be
out-of-luck.
It seems that you have to re-install and get your db's
back from backups.
hth
DeeJay
>--Original Message--
>Hi,
>Is there is a method to reset the 'sa' password? I have a
>server that moved between few different domains and I am
>not sure which domain accounts have access to it. And We
>do not know the 'sa' password.
>I thought there was a registry key that could be removed
>to reset the password? Is that possible?
>Thanks,
>.
>|||Well, you should be able to shut SQL Server down gracefully from the
Services control panel applet, so you might only have to re-attach your
existing MDF/LDF files after you reinstall.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:c99901c48a0b$49ccfa20$a601280a@.phx.gbl...
> If you can not connect via sa and you have removed
> the 'builtin\administrators' account, you are going to be
> out-of-luck.
> It seems that you have to re-install and get your db's
> back from backups.
> hth
> DeeJay
> >--Original Message--
> >Hi,
> >
> >Is there is a method to reset the 'sa' password? I have a
> >server that moved between few different domains and I am
> >not sure which domain accounts have access to it. And We
> >do not know the 'sa' password.
> >
> >I thought there was a registry key that could be removed
> >to reset the password? Is that possible?
> >
> >Thanks,
> >.
> >|||> It seems that you have to re-install and get your db's
> back from backups.
Or rebuildm.exe, which is essentially a reinstall without the file-copy phase... :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message news:c99901c48a0b$49ccfa20$a601280a@.phx.gbl...
> If you can not connect via sa and you have removed
> the 'builtin\administrators' account, you are going to be
> out-of-luck.
> It seems that you have to re-install and get your db's
> back from backups.
> hth
> DeeJay
> >--Original Message--
> >Hi,
> >
> >Is there is a method to reset the 'sa' password? I have a
> >server that moved between few different domains and I am
> >not sure which domain accounts have access to it. And We
> >do not know the 'sa' password.
> >
> >I thought there was a registry key that could be removed
> >to reset the password? Is that possible?
> >
> >Thanks,
> >.
> >|||I thought the db's have to detached to be re-attached?
Also, attaching the db's is not going to help resolve
the 'sa' password. But it will keep downtime to minimum,
if he/she is able to attach the db's.
DeeJay
>--Original Message--
>Well, you should be able to shut SQL Server down
gracefully from the
>Services control panel applet, so you might only have to
re-attach your
>existing MDF/LDF files after you reinstall.
>--
>http://www.aspfaq.com/
>(Reverse address to reply.)
>
>
>"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
>news:c99901c48a0b$49ccfa20$a601280a@.phx.gbl...
>> If you can not connect via sa and you have removed
>> the 'builtin\administrators' account, you are going to
be
>> out-of-luck.
>> It seems that you have to re-install and get your db's
>> back from backups.
>> hth
>> DeeJay
>> >--Original Message--
>> >Hi,
>> >
>> >Is there is a method to reset the 'sa' password? I
have a
>> >server that moved between few different domains and I
am
>> >not sure which domain accounts have access to it. And
We
>> >do not know the 'sa' password.
>> >
>> >I thought there was a registry key that could be
removed
>> >to reset the password? Is that possible?
>> >
>> >Thanks,
>> >.
>> >
>
>.
>|||> I thought the db's have to detached to be re-attached?
In many cases, attaching work even if you didn't detach first. But you are right in saying that this is *not*
something to count on.
> Also, attaching the db's is not going to help resolve
> the 'sa' password.
It depends on which database we are talking about.
Sa is a login, stored in master.
You can rebuild the master database.
You now have a known password for sa.
And just attach the user databases.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message news:c90f01c48a20$9de73b60$a401280a@.phx.gbl...
> I thought the db's have to detached to be re-attached?
> Also, attaching the db's is not going to help resolve
> the 'sa' password. But it will keep downtime to minimum,
> if he/she is able to attach the db's.
> DeeJay
> >--Original Message--
> >Well, you should be able to shut SQL Server down
> gracefully from the
> >Services control panel applet, so you might only have to
> re-attach your
> >existing MDF/LDF files after you reinstall.
> >
> >--
> >http://www.aspfaq.com/
> >(Reverse address to reply.)
> >
> >
> >
> >
> >"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> >news:c99901c48a0b$49ccfa20$a601280a@.phx.gbl...
> >> If you can not connect via sa and you have removed
> >> the 'builtin\administrators' account, you are going to
> be
> >> out-of-luck.
> >>
> >> It seems that you have to re-install and get your db's
> >> back from backups.
> >>
> >> hth
> >>
> >> DeeJay
> >> >--Original Message--
> >> >Hi,
> >> >
> >> >Is there is a method to reset the 'sa' password? I
> have a
> >> >server that moved between few different domains and I
> am
> >> >not sure which domain accounts have access to it. And
> We
> >> >do not know the 'sa' password.
> >> >
> >> >I thought there was a registry key that could be
> removed
> >> >to reset the password? Is that possible?
> >> >
> >> >Thanks,
> >> >.
> >> >
> >
> >
> >.
> >|||That's true. I assumed we are talking about user databases
because its generally not a good idea to detach and attach
the system databases to a different server, is it?
Also, I was not sure what rebuilding the master db do the
sa login. Once the master db is rebuilt, what is the
password for 'sa'? blank? or initial password used during
sw installation?
DeeJay
>--Original Message--
>> I thought the db's have to detached to be re-attached?
>In many cases, attaching work even if you didn't detach
first. But you are right in saying that this is *not*
>something to count on.
>
>> Also, attaching the db's is not going to help resolve
>> the 'sa' password.
>It depends on which database we are talking about.
>Sa is a login, stored in master.
>You can rebuild the master database.
>You now have a known password for sa.
>And just attach the user databases.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:c90f01c48a20$9de73b60$a401280a@.phx.gbl...
>> I thought the db's have to detached to be re-attached?
>> Also, attaching the db's is not going to help resolve
>> the 'sa' password. But it will keep downtime to minimum,
>> if he/she is able to attach the db's.
>> DeeJay
>> >--Original Message--
>> >Well, you should be able to shut SQL Server down
>> gracefully from the
>> >Services control panel applet, so you might only have
to
>> re-attach your
>> >existing MDF/LDF files after you reinstall.
>> >
>> >--
>> >http://www.aspfaq.com/
>> >(Reverse address to reply.)
>> >
>> >
>> >
>> >
>> >"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
>> >news:c99901c48a0b$49ccfa20$a601280a@.phx.gbl...
>> >> If you can not connect via sa and you have removed
>> >> the 'builtin\administrators' account, you are going
to
>> be
>> >> out-of-luck.
>> >>
>> >> It seems that you have to re-install and get your
db's
>> >> back from backups.
>> >>
>> >> hth
>> >>
>> >> DeeJay
>> >> >--Original Message--
>> >> >Hi,
>> >> >
>> >> >Is there is a method to reset the 'sa' password? I
>> have a
>> >> >server that moved between few different domains and
I
>> am
>> >> >not sure which domain accounts have access to it.
And
>> We
>> >> >do not know the 'sa' password.
>> >> >
>> >> >I thought there was a registry key that could be
>> removed
>> >> >to reset the password? Is that possible?
>> >> >
>> >> >Thanks,
>> >> >.
>> >> >
>> >
>> >
>> >.
>> >
>
>.
>|||> I thought the db's have to detached to be re-attached?
I'm pretty sure that if SQL Server is allowed to be shut down successfully,
that the files will be detached successfully. No guarantee, of course, but
it has worked in all cases where I tried it.
> Also, attaching the db's is not going to help resolve
> the 'sa' password.
No, and that's not why I mentioned it. I was only commenting on the
"re-install and get your db's back from backups" comment.
--
http://www.aspfaq.com/
(Reverse address to reply.)|||Sounds Good!
>--Original Message--
>> I thought the db's have to detached to be re-attached?
>I'm pretty sure that if SQL Server is allowed to be shut
down successfully,
>that the files will be detached successfully. No
guarantee, of course, but
>it has worked in all cases where I tried it.
>> Also, attaching the db's is not going to help resolve
>> the 'sa' password.
>No, and that's not why I mentioned it. I was only
commenting on the
>"re-install and get your db's back from backups" comment.
>--
>http://www.aspfaq.com/
>(Reverse address to reply.)
>
>.
>|||I lost my password for sa. So, I do the following, but it doesn't seem to
work.
1) I login to SQL Server thru the query analyzer using Windows
Authentication.
2) sp_password NULL, 'password', 'sa'
3) It indicates with "Password changed"
4) I log out from the query analyzer.
5) I try login to SQL Server thru query analyzer using SQL Server
authentication.
6) It indicates with a login error, and it says "Reason: Not associated
with a trusted SQL Server connection.
Does anyone shine some light?
Thanks.
J
"Aaron [SQL Server MVP]" wrote:
> If you log onto the server with a different system admin user, or a
> local/domain windows administrator, you can use master..sp_password.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> > Hi,
> >
> > Is there is a method to reset the 'sa' password? I have a
> > server that moved between few different domains and I am
> > not sure which domain accounts have access to it. And We
> > do not know the 'sa' password.
> >
> > I thought there was a registry key that could be removed
> > to reset the password? Is that possible?
> >
> > Thanks,
>
>|||Already answered in another thread...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"thejackofall" <thejackofall@.discussions.microsoft.com> wrote in message
news:05AFF2D7-8F2A-4D75-9A0F-83DFB40E17CF@.microsoft.com...
> I lost my password for sa. So, I do the following, but it doesn't seem to
> work.
> 1) I login to SQL Server thru the query analyzer using Windows
> Authentication.
> 2) sp_password NULL, 'password', 'sa'
> 3) It indicates with "Password changed"
> 4) I log out from the query analyzer.
> 5) I try login to SQL Server thru query analyzer using SQL Server
> authentication.
> 6) It indicates with a login error, and it says "Reason: Not associated
> with a trusted SQL Server connection.
> Does anyone shine some light?
> Thanks.
> J
> "Aaron [SQL Server MVP]" wrote:
> > If you log onto the server with a different system admin user, or a
> > local/domain windows administrator, you can use master..sp_password.
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >
> >
> > <anonymous@.discussions.microsoft.com> wrote in message
> > news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> > > Hi,
> > >
> > > Is there is a method to reset the 'sa' password? I have a
> > > server that moved between few different domains and I am
> > > not sure which domain accounts have access to it. And We
> > > do not know the 'sa' password.
> > >
> > > I thought there was a registry key that could be removed
> > > to reset the password? Is that possible?
> > >
> > > Thanks,
> >
> >
> >
Showing posts with label domains. Show all posts
Showing posts with label domains. Show all posts
Monday, March 26, 2012
reset sa password
Hi,
Is there is a method to reset the 'sa' password? I have a
server that moved between few different domains and I am
not sure which domain accounts have access to it. And We
do not know the 'sa' password.
I thought there was a registry key that could be removed
to reset the password? Is that possible?
Thanks,
If you log onto the server with a different system admin user, or a
local/domain windows administrator, you can use master..sp_password.
http://www.aspfaq.com/
(Reverse address to reply.)
<anonymous@.discussions.microsoft.com> wrote in message
news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
|||anonymous@.discussions.microsoft.com wrote:
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
You need to connect using another admin account and then reset the
password on the "sa" account. If you do not have any other admin
accounts, I don't think you can reset the password. You may have to
reinstall SQL Server and restore/reattach your databases.
David G.
|||I lost my password for sa. So, I do the following, but it doesn't seem to
work.
1) I login to SQL Server thru the query analyzer using Windows
Authentication.
2) sp_password NULL, 'password', 'sa'
3) It indicates with "Password changed"
4) I log out from the query analyzer.
5) I try login to SQL Server thru query analyzer using SQL Server
authentication.
6) It indicates with a login error, and it says "Reason: Not associated
with a trusted SQL Server connection.
Does anyone shine some light?
Thanks.
J
"Aaron [SQL Server MVP]" wrote:
> If you log onto the server with a different system admin user, or a
> local/domain windows administrator, you can use master..sp_password.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
>
>
|||Already answered in another thread...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"thejackofall" <thejackofall@.discussions.microsoft.com> wrote in message
news:05AFF2D7-8F2A-4D75-9A0F-83DFB40E17CF@.microsoft.com...[vbcol=seagreen]
> I lost my password for sa. So, I do the following, but it doesn't seem to
> work.
> 1) I login to SQL Server thru the query analyzer using Windows
> Authentication.
> 2) sp_password NULL, 'password', 'sa'
> 3) It indicates with "Password changed"
> 4) I log out from the query analyzer.
> 5) I try login to SQL Server thru query analyzer using SQL Server
> authentication.
> 6) It indicates with a login error, and it says "Reason: Not associated
> with a trusted SQL Server connection.
> Does anyone shine some light?
> Thanks.
> J
> "Aaron [SQL Server MVP]" wrote:
Is there is a method to reset the 'sa' password? I have a
server that moved between few different domains and I am
not sure which domain accounts have access to it. And We
do not know the 'sa' password.
I thought there was a registry key that could be removed
to reset the password? Is that possible?
Thanks,
If you log onto the server with a different system admin user, or a
local/domain windows administrator, you can use master..sp_password.
http://www.aspfaq.com/
(Reverse address to reply.)
<anonymous@.discussions.microsoft.com> wrote in message
news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
|||anonymous@.discussions.microsoft.com wrote:
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
You need to connect using another admin account and then reset the
password on the "sa" account. If you do not have any other admin
accounts, I don't think you can reset the password. You may have to
reinstall SQL Server and restore/reattach your databases.
David G.
|||I lost my password for sa. So, I do the following, but it doesn't seem to
work.
1) I login to SQL Server thru the query analyzer using Windows
Authentication.
2) sp_password NULL, 'password', 'sa'
3) It indicates with "Password changed"
4) I log out from the query analyzer.
5) I try login to SQL Server thru query analyzer using SQL Server
authentication.
6) It indicates with a login error, and it says "Reason: Not associated
with a trusted SQL Server connection.
Does anyone shine some light?
Thanks.
J
"Aaron [SQL Server MVP]" wrote:
> If you log onto the server with a different system admin user, or a
> local/domain windows administrator, you can use master..sp_password.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
>
>
|||Already answered in another thread...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"thejackofall" <thejackofall@.discussions.microsoft.com> wrote in message
news:05AFF2D7-8F2A-4D75-9A0F-83DFB40E17CF@.microsoft.com...[vbcol=seagreen]
> I lost my password for sa. So, I do the following, but it doesn't seem to
> work.
> 1) I login to SQL Server thru the query analyzer using Windows
> Authentication.
> 2) sp_password NULL, 'password', 'sa'
> 3) It indicates with "Password changed"
> 4) I log out from the query analyzer.
> 5) I try login to SQL Server thru query analyzer using SQL Server
> authentication.
> 6) It indicates with a login error, and it says "Reason: Not associated
> with a trusted SQL Server connection.
> Does anyone shine some light?
> Thanks.
> J
> "Aaron [SQL Server MVP]" wrote:
Friday, March 23, 2012
reset sa password
Hi,
Is there is a method to reset the 'sa' password? I have a
server that moved between few different domains and I am
not sure which domain accounts have access to it. And We
do not know the 'sa' password.
I thought there was a registry key that could be removed
to reset the password? Is that possible?
Thanks,If you log onto the server with a different system admin user, or a
local/domain windows administrator, you can use master..sp_password.
http://www.aspfaq.com/
(Reverse address to reply.)
<anonymous@.discussions.microsoft.com> wrote in message
news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,|||anonymous@.discussions.microsoft.com wrote:
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
You need to connect using another admin account and then reset the
password on the "sa" account. If you do not have any other admin
accounts, I don't think you can reset the password. You may have to
reinstall SQL Server and restore/reattach your databases.
David G.|||I lost my password for sa. So, I do the following, but it doesn't seem to
work.
1) I login to SQL Server thru the query analyzer using Windows
Authentication.
2) sp_password NULL, 'password', 'sa'
3) It indicates with "Password changed"
4) I log out from the query analyzer.
5) I try login to SQL Server thru query analyzer using SQL Server
authentication.
6) It indicates with a login error, and it says "Reason: Not associated
with a trusted SQL Server connection.
Does anyone shine some light?
Thanks.
J
"Aaron [SQL Server MVP]" wrote:
> If you log onto the server with a different system admin user, or a
> local/domain windows administrator, you can use master..sp_password.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
>
>|||Already answered in another thread...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"thejackofall" <thejackofall@.discussions.microsoft.com> wrote in message
news:05AFF2D7-8F2A-4D75-9A0F-83DFB40E17CF@.microsoft.com...[vbcol=seagreen]
> I lost my password for sa. So, I do the following, but it doesn't seem to
> work.
> 1) I login to SQL Server thru the query analyzer using Windows
> Authentication.
> 2) sp_password NULL, 'password', 'sa'
> 3) It indicates with "Password changed"
> 4) I log out from the query analyzer.
> 5) I try login to SQL Server thru query analyzer using SQL Server
> authentication.
> 6) It indicates with a login error, and it says "Reason: Not associated
> with a trusted SQL Server connection.
> Does anyone shine some light?
> Thanks.
> J
> "Aaron [SQL Server MVP]" wrote:
>
Is there is a method to reset the 'sa' password? I have a
server that moved between few different domains and I am
not sure which domain accounts have access to it. And We
do not know the 'sa' password.
I thought there was a registry key that could be removed
to reset the password? Is that possible?
Thanks,If you log onto the server with a different system admin user, or a
local/domain windows administrator, you can use master..sp_password.
http://www.aspfaq.com/
(Reverse address to reply.)
<anonymous@.discussions.microsoft.com> wrote in message
news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,|||anonymous@.discussions.microsoft.com wrote:
> Hi,
> Is there is a method to reset the 'sa' password? I have a
> server that moved between few different domains and I am
> not sure which domain accounts have access to it. And We
> do not know the 'sa' password.
> I thought there was a registry key that could be removed
> to reset the password? Is that possible?
> Thanks,
You need to connect using another admin account and then reset the
password on the "sa" account. If you do not have any other admin
accounts, I don't think you can reset the password. You may have to
reinstall SQL Server and restore/reattach your databases.
David G.|||I lost my password for sa. So, I do the following, but it doesn't seem to
work.
1) I login to SQL Server thru the query analyzer using Windows
Authentication.
2) sp_password NULL, 'password', 'sa'
3) It indicates with "Password changed"
4) I log out from the query analyzer.
5) I try login to SQL Server thru query analyzer using SQL Server
authentication.
6) It indicates with a login error, and it says "Reason: Not associated
with a trusted SQL Server connection.
Does anyone shine some light?
Thanks.
J
"Aaron [SQL Server MVP]" wrote:
> If you log onto the server with a different system admin user, or a
> local/domain windows administrator, you can use master..sp_password.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:53e001c48a07$3ad358b0$a301280a@.phx.gbl...
>
>|||Already answered in another thread...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"thejackofall" <thejackofall@.discussions.microsoft.com> wrote in message
news:05AFF2D7-8F2A-4D75-9A0F-83DFB40E17CF@.microsoft.com...[vbcol=seagreen]
> I lost my password for sa. So, I do the following, but it doesn't seem to
> work.
> 1) I login to SQL Server thru the query analyzer using Windows
> Authentication.
> 2) sp_password NULL, 'password', 'sa'
> 3) It indicates with "Password changed"
> 4) I log out from the query analyzer.
> 5) I try login to SQL Server thru query analyzer using SQL Server
> authentication.
> 6) It indicates with a login error, and it says "Reason: Not associated
> with a trusted SQL Server connection.
> Does anyone shine some light?
> Thanks.
> J
> "Aaron [SQL Server MVP]" wrote:
>
Friday, March 9, 2012
Req help with data types/domains
Hi,
I have a data type called ModelElement_t, the type contains 2 attributes: name & visibility. name can be represented as a string, only visibility is to be represented as an adt visibilityKind
CREATE TYPE ModelElement_t AS (name varchar, visibility visibilityKind)
CREATE TYPE visibilityKind_t AS (??
visibilitykind can be of 5 possible settings:vk_public, vk_protected, vk_private, vk_package, & vk_notapplicable. the default setting is vk_public.
could anyone give me any suggestions how to represent this, in conformance with the relational model? Im wondering if an array may be appropriate (only im not sure how to do this) or use constraint settings. I'd be appreciative if someone could display the SQL code. Any suggestions welcome.
Thanks in advance,
FAC51 :)I believe the SQL approach would be like:
create domain visibilityKind_t varchar2(16)
constraint visibilityKind_chk check value in ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable');
I am less clear about the OO "create type" approach. This tends to vary from vendor to vendor. The way it works in Oracle, there can be no constraint on the TYPE itself, only on columns of the TYPE - i.e.:
CREATE TYPE visibilityKind_t AS OBJECT (kind VARCHAR2(16));
CREATE TYPE ModelElement_t AS OBJECT (name varchar, visibility visibilityKind);
CREATE TABLE x (id INT, ModelElement ModelElement_t,
CONSTRAINT visibilityKind_chk CHECK ModelElement.kind IN ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable')
);
... which is poor, in my opinion.|||hi andrew, thanks for your reply, it was quite a tricky one i put out, i have a much better understanding now, thanks!
I believe the SQL approach would be like:
create domain visibilityKind_t varchar2(16)
constraint visibilityKind_chk check value in ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable');
I am less clear about the OO "create type" approach. This tends to vary from vendor to vendor. The way it works in Oracle, there can be no constraint on the TYPE itself, only on columns of the TYPE - i.e.:
CREATE TYPE visibilityKind_t AS OBJECT (kind VARCHAR2(16));
CREATE TYPE ModelElement_t AS OBJECT (name varchar, visibility visibilityKind);
CREATE TABLE x (id INT, ModelElement ModelElement_t,
CONSTRAINT visibilityKind_chk CHECK ModelElement.kind IN ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable')
);
... which is poor, in my opinion.
I have a data type called ModelElement_t, the type contains 2 attributes: name & visibility. name can be represented as a string, only visibility is to be represented as an adt visibilityKind
CREATE TYPE ModelElement_t AS (name varchar, visibility visibilityKind)
CREATE TYPE visibilityKind_t AS (??
visibilitykind can be of 5 possible settings:vk_public, vk_protected, vk_private, vk_package, & vk_notapplicable. the default setting is vk_public.
could anyone give me any suggestions how to represent this, in conformance with the relational model? Im wondering if an array may be appropriate (only im not sure how to do this) or use constraint settings. I'd be appreciative if someone could display the SQL code. Any suggestions welcome.
Thanks in advance,
FAC51 :)I believe the SQL approach would be like:
create domain visibilityKind_t varchar2(16)
constraint visibilityKind_chk check value in ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable');
I am less clear about the OO "create type" approach. This tends to vary from vendor to vendor. The way it works in Oracle, there can be no constraint on the TYPE itself, only on columns of the TYPE - i.e.:
CREATE TYPE visibilityKind_t AS OBJECT (kind VARCHAR2(16));
CREATE TYPE ModelElement_t AS OBJECT (name varchar, visibility visibilityKind);
CREATE TABLE x (id INT, ModelElement ModelElement_t,
CONSTRAINT visibilityKind_chk CHECK ModelElement.kind IN ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable')
);
... which is poor, in my opinion.|||hi andrew, thanks for your reply, it was quite a tricky one i put out, i have a much better understanding now, thanks!
I believe the SQL approach would be like:
create domain visibilityKind_t varchar2(16)
constraint visibilityKind_chk check value in ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable');
I am less clear about the OO "create type" approach. This tends to vary from vendor to vendor. The way it works in Oracle, there can be no constraint on the TYPE itself, only on columns of the TYPE - i.e.:
CREATE TYPE visibilityKind_t AS OBJECT (kind VARCHAR2(16));
CREATE TYPE ModelElement_t AS OBJECT (name varchar, visibility visibilityKind);
CREATE TABLE x (id INT, ModelElement ModelElement_t,
CONSTRAINT visibilityKind_chk CHECK ModelElement.kind IN ('vk_public', 'vk_protected', 'vk_private', 'vk_package', 'vk_notapplicable')
);
... which is poor, in my opinion.
Labels:
attributes,
contains,
database,
domains,
microsoft,
modelelement_t,
mysql,
oracle,
represented,
req,
server,
sql,
string,
type,
types,
visibility
Subscribe to:
Posts (Atom)