Showing posts with label online. Show all posts
Showing posts with label online. Show all posts

Tuesday, March 27, 2012

changing the sa password in SQL 2005

Hello, All
Is there a way to change the sa password in SQL 2005 without knowing the
existing password?
I tried everything I can find online to change the password but nothing
works.
This is on my test server so I am opened to anything.
Thank you.What is the error message you are getting? Are you connecting as a member of
sysadmin? Try connecting using Windows Authentication as a local
Administrator.
Ben Nevarez, MCDBA, OCP
Database Administrator
"steve" wrote:

> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>
>|||maybe if you are an administrator of SQL Server, you can change the password
of another account. (using the management console)
so if you use the local windows administrator account, then you can
certainly access the server as an administrtor, then you can change the
password.
but if your security model use only SQL accounts and you don't have another
account with enough privilege, then you can't change the password of another
account.
I hope this will help you
"steve" <steve@.nothing.com> wrote in message
news:uifjW6dpGHA.4196@.TK2MSFTNGP04.phx.gbl...
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>|||Hi Steve,
Does this help?
EXEC sp_password NULL, 'newpass','sa'
Need to be a sysadmin to run this however.
David Tan,
Production DBA
Webcentral
www.webcentral.com.au
"steve" wrote:

> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>
>

changing the sa password in SQL 2005

Hello, All
Is there a way to change the sa password in SQL 2005 without knowing the
existing password?
I tried everything I can find online to change the password but nothing
works.
This is on my test server so I am opened to anything.
Thank you.What is the error message you are getting? Are you connecting as a member of
sysadmin? Try connecting using Windows Authentication as a local
Administrator.
Ben Nevarez, MCDBA, OCP
Database Administrator
"steve" wrote:
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>
>|||maybe if you are an administrator of SQL Server, you can change the password
of another account. (using the management console)
so if you use the local windows administrator account, then you can
certainly access the server as an administrtor, then you can change the
password.
but if your security model use only SQL accounts and you don't have another
account with enough privilege, then you can't change the password of another
account.
I hope this will help you
"steve" <steve@.nothing.com> wrote in message
news:uifjW6dpGHA.4196@.TK2MSFTNGP04.phx.gbl...
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>|||Hi Steve,
Does this help?
EXEC sp_password NULL, 'newpass','sa'
Need to be a sysadmin to run this however.
--
David Tan,
Production DBA
Webcentral
www.webcentral.com.au
"steve" wrote:
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>
>
>

Thursday, March 8, 2012

Changing SA Password in SQL 2005

Hello, All
Is there a way to change the sa password in SQL 2005 without knowing the
existing password?
I tried everything I can find online to change the password but nothing
works.
This is on my test server so I am opened to anything.
Thank you."steve" <steve@.nothing.com> wrote in message
news:eFh7v7dpGHA.220@.TK2MSFTNGP05.phx.gbl...
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
>
Connect to SQL Server as a sysadmin and change it.
alter login sa with password='Di55ab1eTh1sAcc0un7'
David

Changing SA Password in SQL 2005

Hello, All
Is there a way to change the sa password in SQL 2005 without knowing the
existing password?
I tried everything I can find online to change the password but nothing
works.
This is on my test server so I am opened to anything.
Thank you."steve" <steve@.nothing.com> wrote in message
news:eFh7v7dpGHA.220@.TK2MSFTNGP05.phx.gbl...
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
>
Connect to SQL Server as a sysadmin and change it.
alter login sa with password='Di55ab1eTh1sAcc0un7'
David

Changing SA Password in SQL 2005

Hello, All
Is there a way to change the sa password in SQL 2005 without knowing the
existing password?
I tried everything I can find online to change the password but nothing
works.
This is on my test server so I am opened to anything.
Thank you.Not one that I've ever known of. That would be a huge security
hole...imagine walking up to any-ol' SQL Server instance and setting your
own 'sa' password.
Bill
"steve" <steve@.nothing.com> wrote in message
news:uG1LP8dpGHA.3600@.TK2MSFTNGP04.phx.gbl...
> Hello, All
> Is there a way to change the sa password in SQL 2005 without knowing the
> existing password?
> I tried everything I can find online to change the password but nothing
> works.
> This is on my test server so I am opened to anything.
> Thank you.
>|||A CONTROL SERVER grantee is able to change the sa password without knowing
the current password. (A sysadmin has CONTROL SERVER.)
Laurentiu Cristofor [MSFT]
Software Design Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bill Blakey" <bill.blakey@.sage.com> wrote in message
news:e75gXhepGHA.516@.TK2MSFTNGP05.phx.gbl...
> Not one that I've ever known of. That would be a huge security
> hole...imagine walking up to any-ol' SQL Server instance and setting your
> own 'sa' password.
> --
> Bill
> "steve" <steve@.nothing.com> wrote in message
> news:uG1LP8dpGHA.3600@.TK2MSFTNGP04.phx.gbl...
>

Sunday, February 12, 2012

Changing Datatype length

Hi all,
I need to change a varchar from 35 to 50. In the SQL Server books on
line it says that SQL Server actually creates a new table when you
change the length. I ran a test in a test database and it appears the
only thing that changes is the length. All the data remains in tact.

The table with the column I want to modify is very critical. Is there
any chance I would loose data if I change the length to a larger size? I
am making a back up of the table just in case. Thanks,
KellyKelly Prendergast (kelly.prendergast@.noaa.gov) writes:
> I need to change a varchar from 35 to 50. In the SQL Server books on
> line it says that SQL Server actually creates a new table when you
> change the length. I ran a test in a test database and it appears the
> only thing that changes is the length. All the data remains in tact.
> The table with the column I want to modify is very critical. Is there
> any chance I would loose data if I change the length to a larger size? I
> am making a back up of the table just in case. Thanks,

If you use "ALTER TABLE tbl ALTER COLUMN col varchar(50)"
all that will happens is that metadata will be updated, which will occur
in a snap. If you were to change a char(35) column to char(50), I
would expect it to be different, because in this case SQL Server would
move around data to leave room for the value.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns9442489D4AB0Yazorman@.127.0.0.1...
> Kelly Prendergast (kelly.prendergast@.noaa.gov) writes:
> > I need to change a varchar from 35 to 50. In the SQL Server books on
> > line it says that SQL Server actually creates a new table when you
> > change the length. I ran a test in a test database and it appears the
> > only thing that changes is the length. All the data remains in tact.
> > The table with the column I want to modify is very critical. Is there
> > any chance I would loose data if I change the length to a larger size? I
> > am making a back up of the table just in case. Thanks,
> If you use "ALTER TABLE tbl ALTER COLUMN col varchar(50)"
> all that will happens is that metadata will be updated, which will occur
> in a snap. If you were to change a char(35) column to char(50), I
> would expect it to be different, because in this case SQL Server would
> move around data to leave room for the value.

I want to add to Erland's answer to address the final question. You will
NOT lose data.

SQL Server treats this as a transactional change so either the change will
complete in full, or nothing will change.

If it DOES create a new table the pseudo-SQL is:

Begin Tran
select into TEMP from FOO
drop table FOO
sp_renameobject TEMP to FOO
if error ROLLBACK Tran
else End tran

So the change is completely atomic. Nothing to worry about.

>
> --
> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp