Showing posts with label ssms. Show all posts
Showing posts with label ssms. 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 save settings directory on SSMS 2005

when i exit sql server management studio i get the following error:

The automatically saved settings file '\\SERVER\DATA\Sql Server Management Studio\Settings\CurrentSettings-2006-09-21.vssettings' is not available for write. You can change this file on the 'Import and Export Settings' Tools Options page.

i'm guessing this might be because of the corporate policy of pointing everyone's "My Documents" at a read-only folder.

i'd like to follow the advice on the dialog but unfortunately my Tools, Options dialog does not have an 'Import and Export Settings' page.

any ideas?

This problem relates to SSMS being an offshoot of the Visual Studio Shell. I would raise a bug in Connect http://connect.microsoft.com/sqlserver|||

You could try changing the registry I found this key that might be worth looking at

HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell

|||

Probably the folder in which the vssettings file is present is a read-only location and that's why it's not allowing you to over-write it.

But you can very well re-direct your My Documents folder to any location(for which you have write access) and save the settings file will be saved when you close the SSMS.

For redirecting the My Documents folder, right click on it and select Properties and specify the new path in the Target folder location.

Hope that Helps.

Regards,

Rajesh

|||bug raised as https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=208955