Home All Groups Group Topic Archive Search About

Finding the 2005 migration quite challenging

Author
2 Dec 2005 5:43 PM
Richard K Bethell
The first experiments we ran in the migration to SQL Server 2005 were quite
successful. .NET written applications all worked pretty much flawlessly.

However, when testing our most important internal application, we quickly
discovered it did not do nearly so well. This is what we had done.

- Made a copy of a SQL 2000 production server
- Upgraded it in place, all services included, to SQL 2005.
- Modified the connection strings to the new server.

As I said, the .NET apps and asp.net apps are fine. But they are a bit less
sophisticated. The line of business app, written in vb6 and using ADO 2.7,
at first choked on the way the application started up - a call to a fully
qualified table name barfed up a message about "the security principle *
cannot access the database under the current security context" (the
connection string uses a SQL account..) Removing the fully qualified name
gets us past this.

However, then the application trips up on something almost unimaginable to
me - it makes a "select *" to a table - and the ADODB.Recordset that gets
filled by that statement returns EOF!! Now, the table in question is not
empty, and we have verified that. And using the debugger, it is quite
apparent the right connection string is hitting the right database - its
just not returning any records.

Is it my imagination, or should something like that just never happen in a
database? I'd be really nervous about taking this migration past the testing
phase, if we can expect much of this sort of thing...

Author
2 Dec 2005 7:57 PM
Trey Walpole
were there errors on the select?

could you post the connection string used? (minus proprietary info, of
course).
i tried duplicating using different settings, but couldn't reproduce;
i'd like to see if it's due to certain settings.


Richard K Bethell wrote:
Show quote
> The first experiments we ran in the migration to SQL Server 2005 were quite
> successful. .NET written applications all worked pretty much flawlessly.
>
> However, when testing our most important internal application, we quickly
> discovered it did not do nearly so well. This is what we had done.
>
> - Made a copy of a SQL 2000 production server
> - Upgraded it in place, all services included, to SQL 2005.
> - Modified the connection strings to the new server.
>
> As I said, the .NET apps and asp.net apps are fine. But they are a bit less
> sophisticated. The line of business app, written in vb6 and using ADO 2.7,
> at first choked on the way the application started up - a call to a fully
> qualified table name barfed up a message about "the security principle *
> cannot access the database under the current security context" (the
> connection string uses a SQL account..) Removing the fully qualified name
> gets us past this.
>
> However, then the application trips up on something almost unimaginable to
> me - it makes a "select *" to a table - and the ADODB.Recordset that gets
> filled by that statement returns EOF!! Now, the table in question is not
> empty, and we have verified that. And using the debugger, it is quite
> apparent the right connection string is hitting the right database - its
> just not returning any records.
>
> Is it my imagination, or should something like that just never happen in a
> database? I'd be really nervous about taking this migration past the testing
> phase, if we can expect much of this sort of thing...
>
>
Author
2 Dec 2005 8:11 PM
Richard K Bethell
"Trey Walpole" <treypole@newsgroups.nospam> wrote in message
news:ug8ymo39FHA.3340@TK2MSFTNGP12.phx.gbl...
> were there errors on the select?

That's the sort of behaviour you would expect. An error would be a lot safer
from an app perspective - but no, the result is for the Recordset object to
return without error, but as though the table is empty. There are no "WHERE"
clauses or qualifications of any sort, so it isn't as though the data is
being narrowed in some way. I've just never heard of a result like this...

> could you post the connection string used? (minus proprietary info, of
> course).
> i tried duplicating using different settings, but couldn't reproduce; i'd
> like to see if it's due to certain settings.

"Driver={SQL Server};Server=****;db=****;uid=****;pwd=****"  is the style
used.
Author
2 Dec 2005 9:08 PM
Richard K Bethell
"Richard K Bethell" <softdev@spammingisevil.bad> wrote in message
news:OLA7Ny39FHA.3808@TK2MSFTNGP10.phx.gbl...
> "Trey Walpole" <treypole@newsgroups.nospam> wrote in message
> news:ug8ymo39FHA.3340@TK2MSFTNGP12.phx.gbl...
>> were there errors on the select?
>
> That's the sort of behaviour you would expect. An error would be a lot
> safer from an app perspective - but no, the result is for the Recordset
> object to return without error, but as though the table is empty. There
> are no "WHERE" clauses or qualifications of any sort, so it isn't as
> though the data is being narrowed in some way. I've just never heard of a
> result like this...

It gets weirder - a colleague went to access this database using the Query
Analyzer tool (from 2000.) Using Windows authentication, the application
behaves as expected. But using the username and password of the SQL account,
the Query Engine sort of lets you run queries against the tables.... but
queries that return no records, even when you know they have records. So its
not just this one application.

What's going on here? The word on the street was SQL 2005 was ready for
prime time... had been tested thoroughly.

R.
Author
2 Dec 2005 10:00 PM
Trey Walpole
is the select call qualified by schema (owner)?

sounds like there's a identical table owned by this login's schema...

e.g., say the user is "appuser": sounds like these tables exist

dbo.TheTable (which has data)
appuser.TheTable (which does not have data)

With Windows Authentication, you are probably logging in as an admin,
therefore the default owner/schema used is dbo.
But with a SQL login, the default owner/schema is (e.g.) "appuser"

so if the select is

select * from TheTable

then the default owner of the logged-in user is used


i'd check for multiple tables with this name

e.g.
select name, schema_name(schema_id) from sys.objects
where type='U' and name='TheTable'


Richard K Bethell wrote:
Show quote
> "Richard K Bethell" <softdev@spammingisevil.bad> wrote in message
> news:OLA7Ny39FHA.3808@TK2MSFTNGP10.phx.gbl...
>
>>"Trey Walpole" <treypole@newsgroups.nospam> wrote in message
>>news:ug8ymo39FHA.3340@TK2MSFTNGP12.phx.gbl...
>>
>>>were there errors on the select?
>>
>>That's the sort of behaviour you would expect. An error would be a lot
>>safer from an app perspective - but no, the result is for the Recordset
>>object to return without error, but as though the table is empty. There
>>are no "WHERE" clauses or qualifications of any sort, so it isn't as
>>though the data is being narrowed in some way. I've just never heard of a
>>result like this...
>
>
> It gets weirder - a colleague went to access this database using the Query
> Analyzer tool (from 2000.) Using Windows authentication, the application
> behaves as expected. But using the username and password of the SQL account,
> the Query Engine sort of lets you run queries against the tables.... but
> queries that return no records, even when you know they have records. So its
> not just this one application.
>
> What's going on here? The word on the street was SQL 2005 was ready for
> prime time... had been tested thoroughly.
>
> R.
>
>
Author
5 Dec 2005 3:32 PM
Richard K Bethell
Show quote
"Richard K Bethell" <softdev@spammingisevil.bad> wrote in message
news:OLA7Ny39FHA.3808@TK2MSFTNGP10.phx.gbl...
> "Trey Walpole" <treypole@newsgroups.nospam> wrote in message
> news:ug8ymo39FHA.3340@TK2MSFTNGP12.phx.gbl...
>> were there errors on the select?
>
> That's the sort of behaviour you would expect. An error would be a lot
> safer from an app perspective - but no, the result is for the Recordset
> object to return without error, but as though the table is empty. There
> are no "WHERE" clauses or qualifications of any sort, so it isn't as
> though the data is being narrowed in some way. I've just never heard of a
> result like this...
>
>> could you post the connection string used? (minus proprietary info, of
>> course).
>> i tried duplicating using different settings, but couldn't reproduce; i'd
>> like to see if it's due to certain settings.
>
> "Driver={SQL Server};Server=****;db=****;uid=****;pwd=****"  is the style
> used.


Okay - I'm calling out my MSDN Support on this. This is my registered MSDN
newsgroup alias - Microsoft, where are you?

R.
Author
5 Dec 2005 5:14 PM
Richard K Bethell
We figured out what it was - orphaned SQL users:

http://msdn2.microsoft.com/en-us/library/ms175475.aspx

AddThis Social Bookmark Button