myLittleTools Community Forum

Welcome Guest Search | Active Topics | Members | Log In | Register

Could not find stored procedure... Options · View
Tula
Posted: Monday, August 31, 2009 10:44:31 PM
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

elian
Posted: Tuesday, September 01, 2009 4:40:31 AM

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.
Tula
Posted: Tuesday, September 01, 2009 7:59:55 AM
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!
elian
Posted: Tuesday, September 01, 2009 9:28:05 AM

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

Tula
Posted: Tuesday, September 01, 2009 9:44:32 AM
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...
elian
Posted: Tuesday, September 01, 2009 10:08:40 AM

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?
Tula
Posted: Tuesday, September 01, 2009 10:21:26 AM
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
elian
Posted: Tuesday, September 01, 2009 10:26:40 AM

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?
Tula
Posted: Tuesday, September 01, 2009 10:40:56 AM
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'" ...

:(
elian
Posted: Tuesday, September 01, 2009 10:45:18 AM

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
Tula
Posted: Tuesday, September 01, 2009 11:02:43 AM
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?
elian
Posted: Tuesday, September 01, 2009 11:08:22 AM

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?
Tula
Posted: Tuesday, September 01, 2009 11:12:30 AM
Rank: Member
Groups: Member

Joined: 8/31/2009
Posts: 7
Points: 21
Location: Israel
SQL2005 server
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Theme created by myLittleTools
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.