February 5, 2017 at 9:54 am
Hello,
I have a scenario where a query should bring all names that match a criteria entered on a screen. as an example, if I type "Smi", should bring all people with last name starting with "Smi'.
I use the same copy of the database in two different networks and only in one of them will bring all the records, but in the other one only bring one record.
Environments:
SQL 2008 and 2012, windows 10, windows 8 and windows 7.
I've tried all these combinations in both networks and still only work in one but not in the other.
I thought that maybe could be index related, but I copy the same db from one environment to the other and now I'm not even sure what else I should check.
Any thought and point will be really appreciated.
Thanks in advance
February 5, 2017 at 11:08 pm
Have you verified that the table in both "networks" has the same number of rows and have the exact same rows? I know you say you use the same copy but you've not identified how you made the copy.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 5, 2017 at 11:38 pm
Hi pamenta,
You say the query should bring up all names that match "a criteria entered on a screen"; what do you mean by this? Is this query being run from SQL Server Management Studio? In a custom application? My first step here would be to run SQL Profiler against each database while you're running that query to see if there is a difference in what is being sent to the database.
If the query being executed is the same, it would help to post an example of the query (and perhaps some sample data). Please also check whether the statements below return the same results when ran against both servers.
select SERVERPROPERTY ('Collation');
select @@LANGUAGE;
Andrew
February 6, 2017 at 12:26 am
pamenta - Sunday, February 5, 2017 9:54 AMHello,I have a scenario where a query should bring all names that match a criteria entered on a screen. as an example, if I type "Smi", should bring all people with last name starting with "Smi'.
I use the same copy of the database in two different networks and only in one of them will bring all the records, but in the other one only bring one record.Environments:
SQL 2008 and 2012, windows 10, windows 8 and windows 7.I've tried all these combinations in both networks and still only work in one but not in the other.
I thought that maybe could be index related, but I copy the same db from one environment to the other and now I'm not even sure what else I should check.Any thought and point will be really appreciated.
Thanks in advance
Can you please post the actual query?
😎
February 6, 2017 at 5:07 pm
Jeff Moden - Sunday, February 5, 2017 11:08 PMHave you verified that the table in both "networks" has the same number of rows and have the exact same rows? I know you say you use the same copy but you've not identified how you made the copy.
Hi Jeff,
Thanks for your post. I just backup the db in one environment and restore it on the other environment.
February 6, 2017 at 5:09 pm
Andrew P - Sunday, February 5, 2017 11:38 PMHi pamenta,You say the query should bring up all names that match "a criteria entered on a screen"; what do you mean by this? Is this query being run from SQL Server Management Studio? In a custom application? My first step here would be to run SQL Profiler against each database while you're running that query to see if there is a difference in what is being sent to the database.
If the query being executed is the same, it would help to post an example of the query (and perhaps some sample data). Please also check whether the statements below return the same results when ran against both servers.
select SERVERPROPERTY ('Collation');
select @@LANGUAGE;Andrew
Thanks for the suggestion Andrew,
I will get answer as soon as I can get to the other environment.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply