473,588 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net insists on using dbo. to call aspnet_* stored procedures

I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.

On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:

Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '

Now, the common sense answer here is that the remote database was not
primed properly with:

C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_regsql. exe

But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.

Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.

Thanks,

Pedro Vera
http://veraperez.com

Mar 30 '07 #1
5 1793
dbo is the schema used in SQL Server and, even if removed from queries, is
technically still there. Unless, of course, you have created a new schema
and own the objects in question. It sounds more like a permissions error or
connectivity problem than a dbo problem.

Is SQL Server on the same box as your application? If not, turn on the SQL
Browser service. If this is a default install, you may also have to turn on
a protocol other than Managed Local (or whatever it is called). TCP/IP is a
good one to turn on in most cases; you can also try named pipes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Pedro Vera" <pe********@gma il.comwrote in message
news:11******** *************@n 76g2000hsh.goog legroups.com...
>I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.

On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:

Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '

Now, the common sense answer here is that the remote database was not
primed properly with:

C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_regsql. exe

But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.

Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.

Thanks,

Pedro Vera
http://veraperez.com
Mar 30 '07 #2
Thanks so much for the almost instant reply!

Here is a bit more info:

Local version:

XP Pro SP2, SQL Server 2000 developer in same machine. The connection
string is setup to use the sa login and password. Everything works
peachy.

Remote version:

2003 server, no idea SP. SQL Server 2000 in a different machine. The
connection string is setup to use the sql login assigned to the
hosting account, call it "mysql_logi n". At least the connection string
works, because I am not getting a bad connection string error.

Here is what I don't understand. I would assume that if I am user
mysql_login, and I create an object, then if I use that login then
dbo.myobject should be the same as mysql_login.myo bject, right? In my
usual projects at work I have not run into this issue, so I should
start checking if maybe that host has screwed up the sql server
permissions.

Thanks,

Pedro Vera
http://veraperez.com
On Mar 30, 10:08 am, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo... @comcast.netNoS pamMwrote:
dbo is the schema used in SQL Server and, even if removed from queries, is
technically still there. Unless, of course, you have created a new schema
and own the objects in question. It sounds more like a permissions error or
connectivity problem than a dbo problem.

Is SQL Server on the same box as your application? If not, turn on the SQL
Browser service. If this is a default install, you may also have to turn on
a protocol other than Managed Local (or whatever it is called). TCP/IP is a
good one to turn on in most cases; you can also try named pipes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBAhttp://gregorybeamer.s paces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** *************** "Pedro Vera" <pedro.v...@gma il.comwrote in message

news:11******** *************@n 76g2000hsh.goog legroups.com...
I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.
On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:
Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '
Now, the common sense answer here is that the remote database was not
primed properly with:

>
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_regsql. exe
But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.
Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.
Thanks,
Pedro Vera
http://veraperez.com

Mar 30 '07 #3
dbo.myobject should be the same as mysql_login.myo bject, right?

No. They are technically two different objects. You could have a table,
dbo.mytable and it will be completely different from mysql_login.tab le. Even
if they are technically identical they are not because each exists within
the particular schema.

The easiest way to get around this is to use the sp_changeobject owner stored
procedure which will let you change the object ownere for any object. You
could to:

sp_changeobject owner 'myprocedure',' dbo' to change it to the database owner
to dbo on the object myprocedure.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Pedro Vera" <pe********@gma il.comwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
Thanks so much for the almost instant reply!

Here is a bit more info:

Local version:

XP Pro SP2, SQL Server 2000 developer in same machine. The connection
string is setup to use the sa login and password. Everything works
peachy.

Remote version:

2003 server, no idea SP. SQL Server 2000 in a different machine. The
connection string is setup to use the sql login assigned to the
hosting account, call it "mysql_logi n". At least the connection string
works, because I am not getting a bad connection string error.

Here is what I don't understand. I would assume that if I am user
mysql_login, and I create an object, then if I use that login then
dbo.myobject should be the same as mysql_login.myo bject, right? In my
usual projects at work I have not run into this issue, so I should
start checking if maybe that host has screwed up the sql server
permissions.

Thanks,

Pedro Vera
http://veraperez.com
On Mar 30, 10:08 am, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo... @comcast.netNoS pamMwrote:
>dbo is the schema used in SQL Server and, even if removed from queries,
is
technically still there. Unless, of course, you have created a new schema
and own the objects in question. It sounds more like a permissions error
or
connectivity problem than a dbo problem.

Is SQL Server on the same box as your application? If not, turn on the
SQL
Browser service. If this is a default install, you may also have to turn
on
a protocol other than Managed Local (or whatever it is called). TCP/IP is
a
good one to turn on in most cases; you can also try named pipes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBAhttp://gregorybeamer.s paces.live.com

************** *************** *************** *
Think outside the box!
************** *************** *************** *"Pedro Vera"
<pedro.v...@gm ail.comwrote in message

news:11******* **************@ n76g2000hsh.goo glegroups.com.. .
>I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.
On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:
Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '
Now, the common sense answer here is that the remote database was not
primed properly with:


>>
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_regsql. exe
But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.
Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.
Thanks,
Pedro Vera
http://veraperez.com


Mar 30 '07 #4
re:
No. They are technically two different objects.
Correct, as explained in the reply just sent before seeing yours.

re:
The easiest way to get around this is to use the sp_changeobject owner stored procedure
The changedbowner stored procedure will work, too :

EXEC sp_changedbowne r 'mysql_login'


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:e$******** *****@TK2MSFTNG P04.phx.gbl...
>dbo.myobject should be the same as mysql_login.myo bject, right?

No. They are technically two different objects. You could have a table, dbo.mytable and it will be
completely different from mysql_login.tab le. Even if they are technically identical they are not
because each exists within the particular schema.

The easiest way to get around this is to use the sp_changeobject owner stored procedure which will
let you change the object ownere for any object. You could to:

sp_changeobject owner 'myprocedure',' dbo' to change it to the database owner to dbo on the object
myprocedure.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Pedro Vera" <pe********@gma il.comwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
>Thanks so much for the almost instant reply!

Here is a bit more info:

Local version:

XP Pro SP2, SQL Server 2000 developer in same machine. The connection
string is setup to use the sa login and password. Everything works
peachy.

Remote version:

2003 server, no idea SP. SQL Server 2000 in a different machine. The
connection string is setup to use the sql login assigned to the
hosting account, call it "mysql_logi n". At least the connection string
works, because I am not getting a bad connection string error.

Here is what I don't understand. I would assume that if I am user
mysql_login, and I create an object, then if I use that login then
dbo.myobject should be the same as mysql_login.myo bject, right? In my
usual projects at work I have not run into this issue, so I should
start checking if maybe that host has screwed up the sql server
permissions.

Thanks,

Pedro Vera
http://veraperez.com
On Mar 30, 10:08 am, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo.. .@comcast.netNo SpamMwrote:
>>dbo is the schema used in SQL Server and, even if removed from queries, is
technically still there. Unless, of course, you have created a new schema
and own the objects in question. It sounds more like a permissions error or
connectivit y problem than a dbo problem.

Is SQL Server on the same box as your application? If not, turn on the SQL
Browser service. If this is a default install, you may also have to turn on
a protocol other than Managed Local (or whatever it is called). TCP/IP is a
good one to turn on in most cases; you can also try named pipes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBAhttp://gregorybeamer.s paces.live.com

************* *************** *************** **
Think outside the box!
************* *************** *************** **"Pedro Vera" <pedro.v...@gma il.comwrote in
message

news:11****** *************** @n76g2000hsh.go oglegroups.com. ..

I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.

On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:

Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '

Now, the common sense answer here is that the remote database was not
primed properly with:


>>>
C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\aspnet_regsql .exe

But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.

Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.

Thanks,

Pedro Vera
http://veraperez.com



Mar 30 '07 #5
re:
!dbo.myobject should be the same as mysql_login.myo bject, right?

No. mysql_login is one account and the dbo is another account,
unless you use the changedbowner stored procedure to change
database ownership from dbo to mysql_login.

Try this in the query analyzer :

EXEC sp_changedbowne r 'mysql_login'

That will, effectively, make the mysql_login the dbo and should end your problems.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Pedro Vera" <pe********@gma il.comwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
Thanks so much for the almost instant reply!

Here is a bit more info:

Local version:

XP Pro SP2, SQL Server 2000 developer in same machine. The connection
string is setup to use the sa login and password. Everything works
peachy.

Remote version:

2003 server, no idea SP. SQL Server 2000 in a different machine. The
connection string is setup to use the sql login assigned to the
hosting account, call it "mysql_logi n". At least the connection string
works, because I am not getting a bad connection string error.

Here is what I don't understand. I would assume that if I am user
mysql_login, and I create an object, then if I use that login then
dbo.myobject should be the same as mysql_login.myo bject, right? In my
usual projects at work I have not run into this issue, so I should
start checking if maybe that host has screwed up the sql server
permissions.

Thanks,

Pedro Vera
http://veraperez.com
On Mar 30, 10:08 am, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo... @comcast.netNoS pamMwrote:
>dbo is the schema used in SQL Server and, even if removed from queries, is
technically still there. Unless, of course, you have created a new schema
and own the objects in question. It sounds more like a permissions error or
connectivity problem than a dbo problem.

Is SQL Server on the same box as your application? If not, turn on the SQL
Browser service. If this is a default install, you may also have to turn on
a protocol other than Managed Local (or whatever it is called). TCP/IP is a
good one to turn on in most cases; you can also try named pipes.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBAhttp://gregorybeamer.s paces.live.com

************** *************** *************** *
Think outside the box!
************** *************** *************** *"Pedro Vera" <pedro.v...@gma il.comwrote in message

news:11******* **************@ n76g2000hsh.goo glegroups.com.. .
>I am helping somebody setup one of the asp.net starter kits. I
converted it from sql express to sql server with no real issues, and I
got it running local perfectly.
On my first attempt to run it remotely I noticed that a lot of the
queries had dbo. hardcoded and that SQL server on the remote server
was not allowing my sql account access to these. I removed all
mentions of dbo. and again it still runs local. I have posted it to
the remote server once again, but I still get errors like this:
Could not find stored procedure 'dbo.aspnet_Che ckSchemaVersion '
Now, the common sense answer here is that the remote database was not
primed properly with:


>>
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_regsql. exe
But this is not true. The remote db was primed properly and I can run
aspnet_* stored procedures from enterprise manager logged in using the
same account used in the connection string.
Any idea how I can go around this? My worst case scenario is to grab a
clean copy of the starter kit and instead of removing dbo., changing
it from dbo. to mysqlusername. and see if that helps.
Thanks,
Pedro Vera
http://veraperez.com


Mar 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7317
by: Yves Touze | last post by:
Hi All, I'm trying to migrate from SQL Server 7.0 to SQL Server 2000. I've got some ASP page which call VB components that retrieve shaped recordsets from SQL Server using the MSDATASHAPE provider. Precisely, here is the code i have Dim Cmdobj As New ADODB.Command Cmdobj.ActiveConnection = oconn Cmdobj.CommandType = adCmdStoredProc
3
23990
by: Mariusz | last post by:
I want to write function to call another function which name is parameter to first function. Other parameters should be passed to called function. If I call it function('f1',10) it should call f1(10). If I call it function('f2',5) it should call f2(5). So far i tried something like CREATE FUNCTION . (@f varchar(50),@m money) RETURNS varchar(50) AS
18
10261
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the date and time, but my script is erroring. '-- Get login date and time cmdLoginDate = Date() cmdLoginTime = Time()
2
2805
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the code in stored procedures (im advocating encryption of them). When deploying an application however stored procedure seem to add another level of complexity to installation. In future we also plan to have an basic ASP app with some of the...
2
9216
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
0
2637
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how to call them from an ASP.Net page Every modern database system has a stored procedure language. SQL Server is no different and has a relatively sophisticated and easy to use system. This article will not attempt to go into depth in explaining...
1
13647
by: deepdata | last post by:
Hi, I am trying to fetch data from db2 (express version) database by calling stored procedure. I have tried to use both cursor and for loop but still i am getting error. --======Start procedure============= Create PROCEDURE get_timedout_scripts (
0
992
by: Keith | last post by:
Why can't my ASP.NET application run custom stored procedures against the aspnet_Users table. For example, the aspnet_Users table has 2 records and yet the following stored procedure ALTER PROCEDURE . AS SELECT ApplicationId, UserId, UserName, LoweredUserName, MobileAlias, IsAnonymous, LastActivityDate FROM aspnet_Users
6
2933
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1) Constraint pk_table1 Primary Key,
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5729
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.