Attach&detach Problem

  • Hello everybody....

    Did anybody can help me regarding attach detach step???

    1. I did create new database and the data

    file located at default directory(under

    SQL directory)

    2. I would like to change the ddata file to

    different directory so I'm using detach

    and attach functionality.

    3. In order to do so, I have to go to Query

    analyzer and connected using sa account.

    4. I did run detach function first and

    attach function after that.

    5. every thing goes okey but when I access

    to the new database that I already attach

    using my loging id, I cannot make a

    query. the message was said that 'that

    table does not exist' . below is the

    query statement ' select * from AGENCY'

    but if I wrriten like this ' select *

    from eservices.AGENCY' then result will

    return value.

    6. How to query using first statement

    instead of second statement coz it effect

    of my component.

    7. Please help me.....

    kenari


    kenari

  • Let me make sure here but the table owner is eservices or is it the name of the database. It is always considered an unwise idea to have any object owned by anyone other than dbo and I would suggest changing to be owned as such. However you state that before the detach and attach it worked fine the otherway which I would have to say I wonder why if owner as should have always required qualification of this. But if your problem is eservices is the database name then you just need to make sure that when you detached and reattached that the user account is still defaulted to the database (someone once said that it changed to either master or the first db name on the server when they did this previously as well).

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

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

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