Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sp_help and object explorer showing different

Author  Topic 

sql_msg
Starting Member

13 Posts

Posted - 2014-09-16 : 17:20:00
Hi All,

We have created one Table in DEV and moved to TEST environment. The Data type in Object Explorer and sp_help are both are showing different.

Whats the reason behind it.

Thanks-

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-09-16 : 17:26:04
Refresh object explorer. Right click on the database and refresh.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

sql_msg
Starting Member

13 Posts

Posted - 2014-09-16 : 17:36:46
yes tara i did refresh and even then also it shows the same.

One thing i have observed was only for nvarchar and nchar its doubled meaning that if nvarchar(100) is there on object explorer in sp_help its showing as nvarchar(200).

Seems something with the storage mechanism, if anybody can explain me will be great.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-09-16 : 17:50:36
What you are seeing is correct as sp_help is showing the length in bytes but object explorer is showing the length in characters. Yes this is only for the unicode data types (n*).

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-09-16 : 17:50:52
More info:
https://www.google.com/search?q=sp_help&oq=sp_help&aqs=chrome..69i57j0l5.1304j0j7&sourceid=chrome&es_sm=0&ie=UTF-8#q=sp_help+nvarchar+length

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

sql_msg
Starting Member

13 Posts

Posted - 2014-09-16 : 19:43:54
Thanks Tara ,,,it helped a lot.
Go to Top of Page
   

- Advertisement -