Showing posts with label surprised. Show all posts
Showing posts with label surprised. Show all posts

Tuesday, March 27, 2012

Changing column names in SSMS for SQL Server 2005

I changed the name of a column in the Summary pane of SSMS. I was a bit surprised (but pleased) to see that I could make the change there.

When I tried to use the new column name in a Query, I received the error message, "column not found."

When I used "modify" in the Object Explorer pane of SSMS I was able to see that "(int, not null)" had been appended to the column name in the table.

I don't know if this is a BUG, or an undocumented feature.

Have others here run into this? I am using SS2005, with SP1.

Dan

"int, not null" is not appended to a column name, it is part of the syntax for defining a column. If you can see the column in Object Explorer after you added and saved it you should be able to refer to it in a query.

Service Pack 2 is out ...

http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx

|||

lkh,

Yes, I am sorry to say that "(int, not null)" WAS appended to the column name.

When I went into "Modify" in Object Explorer, I found the column name as

[New_name (int, not null)]. The column characteristics were "(int, not null)".

The square brackets were placed there as a result of my editing the name in the Summary pane.

So yes, "(int, not null)" was part of the new name created when I edited the name in the Summary pane.

Dan

Sunday, February 19, 2012

change SAs password

I've searched this forum and was surprised to not find this asked before - Is there any way to change SA's password (we have managed to lose it somehow)? And we do have physical access to our SQL Server of course...if that helps.
thanks in advance,
jamieI know that it has been asked (and answered) a few dozen times in the last year, but right now the forums are a bit confused... Apparently the server had a "melt down" over the weekend, and it isn't fully recovered yet.

The short answer (assuming that your installation is at least vaguely standard) is to:

1. Log onto the server as a Windows Administrator.
2. Connect to SQL Server using Windows Authentication.
3. Change the password for the sa login.

-PatP|||Alright, thanks. I'll try that out.|||Interesting post!!!

But PatP i can understand your steps but got puzzled with you 3rd one - Change the password for the sa login

How to do? Is there any command??|||You can use both - an Enterprise Manager application or sp_password procedure

Hope thiw will help...
Leonid Niraev