Not able to see the user tables....

  • Hi All,

    I have .mdf and .ldf files (of a database which has many user tables and sp), when I attached this files to my server (by detaching the existing DB and attaching the .mdf & .ldf and attching as new DB) , but in both cases Im not able to see any of the user tables...

    Can any one help me to know the posible reasons for the above issue..

    Thanks,

    Mithun

    Thanks & Regards,
    MC

  • I presume you mean you cannot see them through the application?

    did you also copy across the logins to your new server? If not you need to do so, best way is by using sp_help_revlogin.

    If you have copied over\recreated logins and you use sql logins perhaps the database users are orphaned. Use sp_change_users_login to resolve that.

    ---------------------------------------------------------------------

  • Hi , thanks for the reply,

    If you dont mind could you please make it more clear..?, what i did is i got the .mdf and .ldf files(actualy my friend had send these to me ), so I right clicking the database folder I gave attach, and selected the .mdf, then gave some name for the " attach as " option.

    Then when I checked the table folder it not showing the user tables..

    Regards,

    MC

    Thanks & Regards,
    MC

  • Hi

    One more thing I forgot to tell is that Im able to create new tables to that DB.

    Regarads,

    MC

    Thanks & Regards,
    MC

  • only4mithunc (7/5/2009)


    Hi , thanks for the reply,

    If you dont mind could you please make it more clear..?, what i did is i got the .mdf and .ldf files(actualy my friend had send these to me ), so I right clicking the database folder I gave attach, and selected the .mdf, then gave some name for the " attach as " option.

    Then when I checked the table folder it not showing the user tables..

    Regards,

    MC

    May be your friend sent you an empty database(database not containing any tables). Can you ask him to re-confirm. If database is successfully attached, you'll be able to see all objects including tables. You can try this yourself by creating a table in the database and detach/reattach.

    I hope you're able to connect to the database as George suspected the problem may be related to orphaned users.

    If not, then try connecting using administrator privilages and fix the orphaned users using sp_change_users_login



    Pradeep Singh

  • in addition to what ps said, maybe your friend sent you a backup file which contains more than one backup, and you restored only the first backup in the file, which was made before most of the objects were created.

    check the file and see if it has more than one backup in it.

    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!

  • Ok... thanks to every one...

    Regards

    MC

    Thanks & Regards,
    MC

  • I'm interested in knowing if really the problem was related to what some of us predicted, or was it something else?



    Pradeep Singh

  • Sure.., Im also interested for the same, I had send mail to that friend , once he confirmed whether it had any table or not , I will let you know...

    Regards,

    MC

    Thanks & Regards,
    MC

Viewing 9 posts - 1 through 8 (of 8 total)

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