473,513 Members | 4,022 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_CheckSchemaVersion'

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

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_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 1783
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********@gmail.comwrote in message
news:11*********************@n76g2000hsh.googlegro ups.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_CheckSchemaVersion'

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

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_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_login". 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.myobject, 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.netNoSpamMwrote:
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.spaces.live.com

*********************************************
Think outside the box!
*********************************************"Pedr o Vera" <pedro.v...@gmail.comwrote in message

news:11*********************@n76g2000hsh.googlegro ups.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_CheckSchemaVersion'
Now, the common sense answer here is that the remote database was not
primed properly with:

>
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_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.myobject, right?

No. They are technically two different objects. You could have a table,
dbo.mytable and it will be completely different from mysql_login.table. 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_changeobjectowner stored
procedure which will let you change the object ownere for any object. You
could to:

sp_changeobjectowner '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********@gmail.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.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_login". 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.myobject, 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.netNoSpamMwrote:
>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.spaces.live.com

*********************************************
Think outside the box!
*********************************************"Ped ro Vera"
<pedro.v...@gmail.comwrote in message

news:11*********************@n76g2000hsh.googlegr oups.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_CheckSchemaVersion'
Now, the common sense answer here is that the remote database was not
primed properly with:


>>
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_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_changeobjectowner stored procedure
The changedbowner stored procedure will work, too :

EXEC sp_changedbowner '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******@fitzme.comwrote in message
news:e$*************@TK2MSFTNGP04.phx.gbl...
>dbo.myobject should be the same as mysql_login.myobject, right?

No. They are technically two different objects. You could have a table, dbo.mytable and it will be
completely different from mysql_login.table. 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_changeobjectowner stored procedure which will
let you change the object ownere for any object. You could to:

sp_changeobjectowner '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********@gmail.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.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_login". 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.myobject, 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.netNoSpamMwrote:
>>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.spaces.live.com

*********************************************
Think outside the box!
*********************************************"Pe dro Vera" <pedro.v...@gmail.comwrote in
message

news:11*********************@n76g2000hsh.googleg roups.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_CheckSchemaVersion'

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


>>>
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\asp net_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.myobject, 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_changedbowner '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********@gmail.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.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_login". 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.myobject, 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.netNoSpamMwrote:
>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.spaces.live.com

*********************************************
Think outside the box!
*********************************************"Ped ro Vera" <pedro.v...@gmail.comwrote in message

news:11*********************@n76g2000hsh.googlegr oups.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_CheckSchemaVersion'
Now, the common sense answer here is that the remote database was not
primed properly with:


>>
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_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
7310
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
23973
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...
18
10249
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
2793
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...
2
9197
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
2630
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...
1
13634
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
990
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
2930
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
7270
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...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
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. ...
1
7125
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...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4757
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...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.