Showing posts with label updated. Show all posts
Showing posts with label updated. Show all posts

Monday, March 26, 2012

Need suggesion

I have number of SQL servers like Server1, Server2… deployed in different
cities
There will be one Main Server which gets updated/sync with the all the city
servers
I'm planning to use SQL Replication technology. Is there any other method to
achieve this. Please guide me.
Thanks in advance
Thanks and Regards,
Giri H RamMohan
Hi,
Could you please provide more information from the application side. Is
it DW or OLTP?
|||Giri,
as it sounds as though the data flow is one way then transactional
replication would be suitable. Other competing technologies include
distributed transactions using linked servers and log shipping. To get a
feel for the differences between log shipping and transactional replication,
please have a look at this article:
http://www.replicationanswers.com/Standby.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I do not now, but same case i have for 3 years and it works perfect just you
need to your own VPN, then main server has to be publisher while other server
has to subsriber.
"Giri RamMohan" wrote:

> I have number of SQL servers like Server1, Server2… deployed in different
> cities
> There will be one Main Server which gets updated/sync with the all the city
> servers
> I'm planning to use SQL Replication technology. Is there any other method to
> achieve this. Please guide me.
>
> Thanks in advance
> Thanks and Regards,
> Giri H RamMohan
>
|||OLTP
Thanks and Regards,
Giri RamMohan
"Angsql" wrote:

> Hi,
> Could you please provide more information from the application side. Is
> it DW or OLTP?
>

Wednesday, March 7, 2012

Need Kick in right direction w/query take 2

Bumping this up to the top, scroll down a bit to see the original thread.
--
I have updated the DDL with the actual tables and a sample of table data of
what I am actually using.
http://damageinc.org/DDL.html (The DDL is too large to post, the message
gets kicked back to me)
AFter you enter that DDL
If you run the query..
SELECT Apps.AppName, Tests.TestCase, TestCases.Type
FROM
TestCases
LEFT OUTER JOIN Apps ON TestCases.AppID = Apps.ID
LEFT OUTER JOIN Tests ON TestCases.TestID = Tests.ID
WHERE
(
(
(Proj1 = '87' OR Proj2 = '87' OR Proj3 = '87' OR Proj4 = '87' OR Proj5 =
'87')
OR
(Proj1 = '88' OR Proj2 = '88' OR Proj3 = '88' OR Proj4 = '88' OR Proj5 =
'88')
)
AND (TestCases.Card = 'G71_D' OR TestCases.Card = 'G70_D' OR TestCases.Card
= 'G72_D' OR TestCases.Card = 'G73_D')
AND TestCases.OS = 'Windows Vista'
)
GROUP BY AppName, TestCase,TestCases.Type
You will see
AppName TestCase
Type
3D Mark 2003 Benchmark: 1600x1200x32 4xAA 8x Aniso D3D Benchmarks
3D Mark 2003 Benchmark: 1600x1200x32 4xAA 8x Aniso Games
3D Mark 2003 Benchmark: Default 2x AA 4x Aniso D3D
Benchmarks
3D Mark 2003 Benchmark: Default 2x AA 4x Aniso G ames
.
.
.
.
There are 97 tests there.
What I need is that 97 for the count, then the count of the most recent
pass/fail result(s) (if there is a result) for each of those tests.
Using
Select Count(*) As 'Count',
Sum(Case When Result = 'Pass' Then 1 Else 0 End) As 'Pass',
Sum(Case When Result = 'Fail' Then 1 Else 0 End) As 'Fail'
From Reports r
Where r.ReportDate In
(Select Max(r.ReportDate)
From Reports r
Inner Join TestCases tc On r.TestCaseID = tc.ID
Inner Join Tests t On tc.TestID = t.ID
Inner Join Apps a On tc.AppID = a.ID
WHERE
(
(
(tc.Proj1 = '87' OR tc.Proj2 = '87' OR tc.Proj3 = '87' OR tc.Proj4 = '87'
OR tc.Proj5 = '87')
OR
(tc.Proj1 = '88' OR tc.Proj2 = '88' OR tc.Proj3 = '88' OR tc.Proj4 = '88'
OR tc.Proj5 = '88')
)
AND (tc.Card = 'G71_D' OR tc.Card = 'G70_D' OR tc.Card = 'G72_D' OR tc.Card
= 'G73_D')
AND tc.OS = 'Windows Vista'
)
Group By a.AppName, t.TestCase)
Gives me
Count Pass Fail
25 2 23
Which is obviously wrong, since the Count should be 97.
I have to be overthinking something here...I think this works:
SELECT Count(*) As 'Count',
Sum (Case When r.Result = 'Pass' Then 1 Else 0 End) As 'Pass',
Sum (Case When r.Result = 'Fail' Then 1 Else 0 End) As 'Fail'
From Reports r
Inner Join TestCases tc On r.TestCaseID = tc.ID
LEFT OUTER JOIN Apps a ON tc.AppID = a.ID
LEFT OUTER JOIN Tests t ON tc.TestID = t.ID
Right Join (
SELECT a.AppName, t.TestCase, tc.Type, Max(Coalesce(r.ReportDate,
'1900-01-01'))As ReportDate
FROM TestCases tc
LEFT OUTER JOIN Apps a ON tc.AppID = a.ID
LEFT OUTER JOIN Tests t ON tc.TestID = t.ID
LEFT OUTER JOIN Reports r ON r.TestCaseID = tc.ID
WHERE
(
(
(Proj1 = '87' OR Proj2 = '87' OR Proj3 = '87' OR Proj4 = '87' OR Proj5 =
'87')
OR
(Proj1 = '88' OR Proj2 = '88' OR Proj3 = '88' OR Proj4 = '88' OR Proj5 =
'88')
)
AND (tc.Card = 'G71_D' OR tc.Card = 'G70_D' OR tc.Card = 'G72_D' OR tc.Card
= 'G73_D')
AND tc.OS = 'Windows Vista'
)
GROUP BY AppName, TestCase,tc.Type) x On r.ReportDate = x.ReportDate
Tom
"Lucas Graf" <lgraf2000@.comcast.net> wrote in message
news:%23zfcKfZmGHA.3880@.TK2MSFTNGP02.phx.gbl...
> Bumping this up to the top, scroll down a bit to see the original thread.
> --
> I have updated the DDL with the actual tables and a sample of table data
> of
> what I am actually using.
> http://damageinc.org/DDL.html (The DDL is too large to post, the message
> gets kicked back to me)
> AFter you enter that DDL
> If you run the query..
> SELECT Apps.AppName, Tests.TestCase, TestCases.Type
> FROM
> TestCases
> LEFT OUTER JOIN Apps ON TestCases.AppID = Apps.ID
> LEFT OUTER JOIN Tests ON TestCases.TestID = Tests.ID
> WHERE
> (
> (
> (Proj1 = '87' OR Proj2 = '87' OR Proj3 = '87' OR Proj4 = '87' OR Proj5 =
> '87')
> OR
> (Proj1 = '88' OR Proj2 = '88' OR Proj3 = '88' OR Proj4 = '88' OR Proj5 =
> '88')
> )
> AND (TestCases.Card = 'G71_D' OR TestCases.Card = 'G70_D' OR
> TestCases.Card
> = 'G72_D' OR TestCases.Card = 'G73_D')
> AND TestCases.OS = 'Windows Vista'
>
> )
> GROUP BY AppName, TestCase,TestCases.Type
>
> You will see
>
> AppName TestCase
> Type
> 3D Mark 2003 Benchmark: 1600x1200x32 4xAA 8x Aniso D3D Benchmarks
> 3D Mark 2003 Benchmark: 1600x1200x32 4xAA 8x Aniso Games
> 3D Mark 2003 Benchmark: Default 2x AA 4x Aniso D3D
> Benchmarks
> 3D Mark 2003 Benchmark: Default 2x AA 4x Aniso G ames
> .
> .
> .
> .
>
> There are 97 tests there.
> What I need is that 97 for the count, then the count of the most recent
> pass/fail result(s) (if there is a result) for each of those tests.
> Using
> Select Count(*) As 'Count',
> Sum(Case When Result = 'Pass' Then 1 Else 0 End) As 'Pass',
> Sum(Case When Result = 'Fail' Then 1 Else 0 End) As 'Fail'
> From Reports r
> Where r.ReportDate In
> (Select Max(r.ReportDate)
> From Reports r
> Inner Join TestCases tc On r.TestCaseID = tc.ID
> Inner Join Tests t On tc.TestID = t.ID
> Inner Join Apps a On tc.AppID = a.ID
> WHERE
> (
> (
> (tc.Proj1 = '87' OR tc.Proj2 = '87' OR tc.Proj3 = '87' OR tc.Proj4 =
> '87'
> OR tc.Proj5 = '87')
> OR
> (tc.Proj1 = '88' OR tc.Proj2 = '88' OR tc.Proj3 = '88' OR tc.Proj4 =
> '88'
> OR tc.Proj5 = '88')
> )
> AND (tc.Card = 'G71_D' OR tc.Card = 'G70_D' OR tc.Card = 'G72_D' OR
> tc.Card
> = 'G73_D')
> AND tc.OS = 'Windows Vista'
> )
> Group By a.AppName, t.TestCase)
> Gives me
> Count Pass Fail
> 25 2 23
>
> Which is obviously wrong, since the Count should be 97.
> I have to be overthinking something here...
>
>