Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Views (only) return no data Expand / Collapse
Author
Message
Posted Thursday, June 20, 2013 10:15 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, October 23, 2014 7:31 AM
Points: 706, Visits: 1,752
Hi,

We just had an old SQL 2000 server moved to our offices.

When we try and run a SP they had written it doesn't return any data.

So, I tracked it down to the views it is referencing.

It looks like all the tables return records...BUT no view I select returns records. Doesn't matter which view it is...it won't return any records.

Again, we just stood up this server. It was working in the other location.

Tables work - views don't




Post #1465817
Posted Thursday, June 20, 2013 10:20 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 6:05 AM
Points: 40,258, Visits: 36,681
Check the definition of the views. What filters are on the selects?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1465823
Posted Thursday, June 20, 2013 10:24 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, October 23, 2014 7:31 AM
Points: 706, Visits: 1,752
It's not that it's returning zero records..it's that when opening a view it just spins and spins eventually timing out. but only on views

There are about 30 views. That all reference other views.

If I go any of the tables, I can pull records.

If I try and open any of the 30 views..I can't

So, I was thinking there had to be some global view issue?



Post #1465827
Posted Thursday, June 20, 2013 10:28 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 6:05 AM
Points: 40,258, Visits: 36,681
Look at the definition of the views (sp_helptext). Check the queries, what do they do?

Have you updated statistics since upgrading? Have you rebuilt indexes since upgrading.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1465831
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse