July 5, 2009 at 5:52 am
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
July 5, 2009 at 6:00 am
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.
---------------------------------------------------------------------
July 5, 2009 at 6:42 am
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
July 5, 2009 at 6:48 am
Hi
One more thing I forgot to tell is that Im able to create new tables to that DB.
Regarads,
MC
Thanks & Regards,
MC
July 5, 2009 at 10:03 am
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
July 5, 2009 at 11:35 am
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
July 6, 2009 at 5:57 am
Ok... thanks to every one...
Regards
MC
Thanks & Regards,
MC
July 6, 2009 at 6:00 am
I'm interested in knowing if really the problem was related to what some of us predicted, or was it something else?
July 6, 2009 at 6:20 am
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