Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Wednesday, March 28, 2012

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. However
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.
Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:

> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.
|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.
|||By "different networks" I meant different subnets.
"Roger Wolter[MSFT]" wrote:

> You won't be able to use Windows authentication across networks - you will
> need to use certificates.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
>
>

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. However
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. Howeve
r
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:

> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. Howe
ver
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||By "different networks" I meant different subnets.
"Roger Wolter[MSFT]" wrote:

> You won't be able to use Windows authentication across networks - you will
> need to use certificates.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
>
>sql

Friday, March 23, 2012

mining model viewer error

I am developing a multiple regression model for a super market site selection with 11 predictors.

As soon as I press the model viewer tab, the following message appears:

The server content appears to be out of date.
Would you like to build and deploy the project first?

I opt no and the error message pops up:

The tree graph cannot be created because of the following error:

'Either the user, ......., does not have access to the ....... database, or the database does not exist.'.

Could anyone mine out the cause please....

saji

Did you deploy the model at least once? The project (containing the data source, data source view, mining structure and model) should be deployed on the server for processing to happen. Once processing is complete, the viewer will work. It seems like the project was not deployed on the server.

Or, short answer, try to answer 'Yes' at the "Would you like to build and deploy first?" question, and let us know if it worked

sql

Monday, March 19, 2012

min or max over multiple columns

Hi all,
A short question about min and max functions. Let's say I have the following
table:
contract sales_2005 sales_2006
1234 100 120
5678 870 560
Now, I want to build a query that gives the following result:
contract maximum_sales
1234 120
5678 870
So I want to get the maximum yearly sales per contract over the years 2005
and 2006. A normal max-function won't work because it only calculates the
maximum row in a given column. Is there a function that does what I'm lookin
g
for? Also to get the minimum yearly sales per contract.
Of course, it can be solved with a greater than/less than construction but
I'm looking for a more efficient solution.
Thanks in advance!
regards,
MaartenWhy is your data not properly normalized?
You can normalize it for the purpose of the aggregation by using a UNION
query (untested, since you haven't provided proper DDL):
select sales_2005 as Sales
,2005 as Year
from <table>
union all
select sales_2006 as Sales
,2006 as Year
from <table>
...then use this as a derived table and apply the aggregation:
select max(Normalized.Sales) as MaxSales
,min(Normalized.Sales) as MinSales
from (
select sales_2005 as Sales
,2005 as Year
from <table>
union all
select sales_2006 as Sales
,2006 as Year
from <table>
) Normalized
Is this what you need?
ML
http://milambda.blogspot.com/|||I would use a greater than/less than for this.
Something like (you would have to add Coalesce or IsNull function calls if
either sales_2005 or sales_2006 can be NULL):
Select contract,
Max(Case When sales_2005 > sales_2006 Then sales_2005 Else sales_2006 End)
As maximum_sales
From ...
Group By contract
Order By contract
If you absolutely want to avoid greater than/less than, you could do:
Select contract,
Max(sales) As maximum_sales
From (Select contract, sales_2005 As sales From ...
Union All Select contract, sales_2006 As sales From ...) x
Group By contract
Order By contract
but that would probably be less efficient than the first query.
Tom
"maarten_dtg" <u23468@.uwe> wrote in message news:625ad6dff69a4@.uwe...
> Hi all,
> A short question about min and max functions. Let's say I have the
> following
> table:
> contract sales_2005 sales_2006
> 1234 100 120
> 5678 870 560
> Now, I want to build a query that gives the following result:
> contract maximum_sales
> 1234 120
> 5678 870
> So I want to get the maximum yearly sales per contract over the years 2005
> and 2006. A normal max-function won't work because it only calculates the
> maximum row in a given column. Is there a function that does what I'm
> looking
> for? Also to get the minimum yearly sales per contract.
> Of course, it can be solved with a greater than/less than construction but
> I'm looking for a more efficient solution.
> Thanks in advance!
> regards,
> Maarten|||See the execution plan for the three "select" statements as a batch.
create table dbo.t1 (
contract int not null primary key,
sales_2005 money not null,
sales_2006 money not null
)
go
insert into dbo.t1
select
*
from
(
select 1234 as contract, 100 as sales_2005, 120 as sales_2006
union all
select 5678, 870, 560
) as t2
go
select
contract,
case when sales_2005 > sales_2006 then sales_2005 else sales_2006 end as
max_sales
from
dbo.t1
select
contract,
max(sales) as max_sales
from
(
select contract, sales_2005 as sales from dbo.t1
union all
select contract, sales_2006 as sales from dbo.t1
) as t2
group by
contract
select
dbo.t1.contract,
max(case when t2.c1 = 1 then dbo.t1.sales_2005 else dbo.t1.sales_2006 end)
as max_sales
from
dbo.t1
cross join
(
select 1 as c1 union all select 2
) as t2
group by
dbo.t1.contract
go
drop table dbo.t1
go
AMB
"maarten_dtg" wrote:

> Hi all,
> A short question about min and max functions. Let's say I have the followi
ng
> table:
> contract sales_2005 sales_2006
> 1234 100 120
> 5678 870 560
> Now, I want to build a query that gives the following result:
> contract maximum_sales
> 1234 120
> 5678 870
> So I want to get the maximum yearly sales per contract over the years 2005
> and 2006. A normal max-function won't work because it only calculates the
> maximum row in a given column. Is there a function that does what I'm look
ing
> for? Also to get the minimum yearly sales per contract.
> Of course, it can be solved with a greater than/less than construction but
> I'm looking for a more efficient solution.
> Thanks in advance!
> regards,
> Maarten
>|||This is a cross tabs and not a table. You have split an attribute,
time, over two columns.
In Oracle, you would use GREATEST (sales_2005, sales_2006), but we have
to do more work:
SELECT X,contract_nbr, MAX(X.sales_annual)
FROM (SELECT S1.contract_nbr, S1.sales_2005
FROM SalesCrossTab AS S1
UNION ALL
SELECT S2.contract_nbr, S2.sales_2006
FROM SalesCrossTab AS S2)
AS X(contract_nbr, sales_annual)
GROUP BY X,contract_nbr;

Min and Max from one dimension based on Grouping from another dimension

Hi all,

I have 2 Dimensions D1 and D2. They both have a common Attribute "ID".

For one id in D1 there are multiple records in D2. This is like a parent child relationship with Product as parent Dimension and Product category as child dimension. For each product there are multiple product categories.

I want to get the Min and Max from child Dimension for each ID in Parent Dimension.

In sql this can be written as

select Distinct D1.ID,Min(D2.AttributeName) from D1,D2 where

D1.ID=D2.ID group by D2.ID

Can anybody write a MDX based on this?

Thanks

Girija.

Girija,

When there is Parent-Child Relationship between D1 and D2 as described Product and Product Category, I feel there should be Hierarchy in Cube for D1 and D2. And hoping you have set Order By Property to Key which stores ID and then simply you could use FirstChild for Min and LastChild for Max ID.

Bhudev

|||

Hi bhudev,

I gave parent - child reationship just as an example..... There is no hierarchy between those two dimensions.... They are connected only through ID.

Regards...

Girija Shankar

|||

Girija

I'm giving you the way how you can do it. Simply make Calculated Members for these ID under Measures Dimension and apply Min and Max function, I hope you will get yourself.

Bhudev