Wednesday, March 7, 2012

restore a mssql2005 DB to another sql2005 server authentication pr

Hi.
I want to restore a db that is created on a 2005 server to another 2005
server. From my isp i got a .BAK file.
I created a new DB on the new server with same login information as the old
database. I restored the database to the other server all went fine.
Now when i want to login on the database via web, or via enterprisemanager
(SQL authentication), it says that login failed. I tried to change the
password from the user, but that does not work.
Can anyone help me, on how to restore a db to another server?
thanks.Hi
Take a look at sp_change_users_login (Transact-SQL) in the BOL
Or you can DROP USER in the new restored database and then recreate him
mapped to the existing LOGIN
"janwillem" <janwillem@.discussions.microsoft.com> wrote in message
news:21CECAD4-CEFC-430F-A860-6F70098D3981@.microsoft.com...
> Hi.
> I want to restore a db that is created on a 2005 server to another 2005
> server. From my isp i got a .BAK file.
> I created a new DB on the new server with same login information as the
> old
> database. I restored the database to the other server all went fine.
> Now when i want to login on the database via web, or via enterprisemanager
> (SQL authentication), it says that login failed. I tried to change the
> password from the user, but that does not work.
> Can anyone help me, on how to restore a db to another server?
> thanks.|||thanks. the problem also is that when i try to delete the user in the
existing DB, i get the following error:
Drop failed for user 'xxx'
The database principal owns a schema in the database, and cannot be dropped
( microsoft SQL server, Error: 15138)
"Uri Dimant" wrote:
> Hi
> Take a look at sp_change_users_login (Transact-SQL) in the BOL
> Or you can DROP USER in the new restored database and then recreate him
> mapped to the existing LOGIN
>
> "janwillem" <janwillem@.discussions.microsoft.com> wrote in message
> news:21CECAD4-CEFC-430F-A860-6F70098D3981@.microsoft.com...
> > Hi.
> >
> > I want to restore a db that is created on a 2005 server to another 2005
> > server. From my isp i got a .BAK file.
> >
> > I created a new DB on the new server with same login information as the
> > old
> > database. I restored the database to the other server all went fine.
> >
> > Now when i want to login on the database via web, or via enterprisemanager
> > (SQL authentication), it says that login failed. I tried to change the
> > password from the user, but that does not work.
> >
> > Can anyone help me, on how to restore a db to another server?
> >
> > thanks.
>
>|||Hi
Yep, you first, need to drop a SCHEMA that owned by the user
"janwillem" <janwillem@.discussions.microsoft.com> wrote in message
news:E38A99E6-1414-47FF-9526-190F49F0CEED@.microsoft.com...
> thanks. the problem also is that when i try to delete the user in the
> existing DB, i get the following error:
>
> Drop failed for user 'xxx'
> The database principal owns a schema in the database, and cannot be
> dropped
> ( microsoft SQL server, Error: 15138)
>
> "Uri Dimant" wrote:
>> Hi
>> Take a look at sp_change_users_login (Transact-SQL) in the BOL
>> Or you can DROP USER in the new restored database and then recreate him
>> mapped to the existing LOGIN
>>
>> "janwillem" <janwillem@.discussions.microsoft.com> wrote in message
>> news:21CECAD4-CEFC-430F-A860-6F70098D3981@.microsoft.com...
>> > Hi.
>> >
>> > I want to restore a db that is created on a 2005 server to another 2005
>> > server. From my isp i got a .BAK file.
>> >
>> > I created a new DB on the new server with same login information as the
>> > old
>> > database. I restored the database to the other server all went fine.
>> >
>> > Now when i want to login on the database via web, or via
>> > enterprisemanager
>> > (SQL authentication), it says that login failed. I tried to change the
>> > password from the user, but that does not work.
>> >
>> > Can anyone help me, on how to restore a db to another server?
>> >
>> > thanks.
>>

No comments:

Post a Comment