3

I have a table called 'employees', with column names 'Employee_Number', 'Location', 'Salary' and 'Birthday'.

On the left of the Management Studio page, under the Object Explorer, there are the options to view the Columns, Keys, Constraints, etc. of my 'employees' table.

Each option expands when double-clicked, except the 'Columns' tab. Apparently, the table does not have any columns in it. I have checked to see if my table is still there, using SELECT * FROM employees;. From which, all columns are shown.

I wanted to access one of these columns manually, so I can rename it, without using code. Why is the Columns section of the Object Explorer returning no values?

All keys and constraints I had made on the table are still there on Object Explorer.

CrashBandicoot
  • 399
  • 2
  • 7
  • 21
  • 1
    Is your user/login/group denied VIEW DEFINITION permission on that table/schema/database/instance? Although I would have thought that would have prevented you from seeing the "components" other than columns too... might be better placed to ask this over at [DBA.se](http://dba.stackexchange.com) – Bridge Mar 17 '17 at 11:47
  • I used to be able to view the Columns before. I must have pressed something, now that it appears blank. – CrashBandicoot Mar 17 '17 at 11:57
  • Could you have simply lost connection or something? Have you tried disconnecting/reconnecting object explorer? – Bridge Mar 17 '17 at 12:17
  • I have logged off the system and logged back on. No difference. – CrashBandicoot Mar 17 '17 at 12:54
  • Try checking your permissions then - something like this: http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database – Bridge Mar 17 '17 at 13:42
  • So, I just copy and paste that massive bit of quote and run it to check the permissions? – CrashBandicoot Mar 17 '17 at 14:38
  • Yeah and look to see if you're specifically denied access to anything on that table – Bridge Mar 17 '17 at 15:54
  • I restarted the program and it suddenly shows all the columns. I must've pressed something to get rid of it by accident. – CrashBandicoot Mar 24 '17 at 12:15
  • Glad you found a resolution - the convention is to please post as an answer (and accept it) to make this issue as resolved. – Bridge Mar 24 '17 at 12:52
  • So you want me to post what you wrote? – CrashBandicoot Mar 24 '17 at 14:06
  • I don't think I actually helped in the end - just that it resolved itself with a restart of SSMS – Bridge Mar 24 '17 at 14:31

1 Answers1

2
  1. One of the reasons could be lack of permission to VIEW DEFINITION on the particular table.

  2. Another could be that I had lost connection at some point while trying to run a large query.

Restarting the system seemed to fix the problem, along with making sure you're not denied access to anything on the table.

CrashBandicoot
  • 399
  • 2
  • 7
  • 21