|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
hi i'm new here, i hope someone can help me with this: I restored my .bak file and got this msg: "Restore successfully performed." "User mapping failed for the following users: ..."
when i try to use any stored procedure from the code i get this msg: "Could not find stored procedure 'dbo.SP_Name' ... " when i look at the DB i can see this SP but without the "dbo." before the name of the SP as i can see in my local SQL all my SP are dbo (db owners)
what is the problem here? 10x
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
You restored a backup file from server A over a database on server B. Thus the user mapping failed and you have to manually restore it. You can do that in T-SQL by using the WITH LOGIN clause of the ALTER USER command, or use the deprecated system sp sp_change_users_login.
When you have to restore a backup from server A to server B, the easiest solution is to use myLittleBackup (http://www.mylittlebackup.com), as it will do all this tricky steps automatically for you.
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
hi I did use myLittleBackup for that, but still...
can u please explain "step by step" how can I "do that in T-SQL by using the WITH LOGIN clause of the ALTER USER command, or use the deprecated system sp sp_change_users_login."
thank you!
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
For info, could you please tell me which version of myLittleBackup you used?
About fixing user mapping manually: EXEC sp_change_users_login 'Update_One', username, login
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
myLittleBackup : Version 1.3
I got this from the query: "Changed database context to 'vps120_xxx'.
EXEC sp_change_users_login 'Update_One', bxxx, vps120_xxx Msg 15063, Level 16, State 1, Line number 143 The login already has an account under a different user name. "
i think i didnt understand what i need to write in "username, login"...
please help...
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
Current release is v1.6. It would be nice if you (or your webhoster) could upgrade to the latest release. There is something I missed in your first message. You wrote: Quote:i can see this SP but without the "dbo." before the name of the SP as i can see in my local SQL Do you mean the sp are not owned by any schema?
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
hi, this is the error i get: "Could not find stored procedure 'dbo.LogInManager'. "
in my DB: under the "Name" column i have only the SP name, like "LogInManager" under the "schema" column i have "dbo"
but the code looking for 'dbo.LogInManager' ?? or is it another problem? 10x
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
Are you using the same login/pwd with your app and to connect to myLittleAdmin?
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
yes. in my app, i defined the login in the web.config file:
<connectionStrings> <add name="ConnectionString1" connectionString="Data Source=SQL_IP; User Id=vps_xxx;Password=xxx;" /> </connectionStrings>
in my app, i have DataSet file to connect the DB, with the commandText : "dbo.SP_Name"
and same login/pwd to connect to myLittleAdmin.
still dont understand way i get "Could not find stored procedure 'dbo.LogInManager'" ...
:(
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
Quite strange. If you can see it into myLittleAdmin then your app should be able to use it too
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
yep.... should i restore the db again? is there anything else to do or check?
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
are you restoring a SQL2000 db on a SQL2005 server?
|
|
Rank: Member Groups: Member
Joined: 8/31/2009 Posts: 7 Points: 21 Location: Israel
|
SQL2005 server
|
|
Guest |