Object

  • when i run the select statement : SELECT name from .dbo.sysobjects where xtype = 'U' then the list of table names appears. One of the table names listed in the result is lester. I want to see if that table (lester) has an index or not so i used this piece of command : sp_helpindex 'lester' and when executed it gives me this error message : Object lester does not exist in database LESTERDB

    Question:

    Is this possible? i manage to view the table name if it exists in that database but when I used sp_helpindex it says that the object name does no exists in the database??? does anyone have this similar experience?? or has an explanation on this kind of behavior??

    The server is MSSQL 2000 with no sp in it and the server is restored in another location...

    "-=Still Learning=-"

    Lester Policarpio

  • double check the table...it's problebly owned by a non dbo user...

    so the table is referenced by select * from lesterlogin.lester, and not dbo.lester.

    since sp_help doesn't like the owner name in the table, you can't do exec sp_help lesterlogin.lester, and since your in as sa, there's no dbo.lester table, so it fails with object doesn't exist, because of the implied owner name .

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • THanks lowell!!!!!!! found out that the table is not owned by dbo

    "-=Still Learning=-"

    Lester Policarpio

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply