Counting Child Nodes In Hierachy

May 20, 2008

Hi,
I have a SQL statement that returns a hierachy

it returns ..

-NEWSPAPER
-QUALS
- TIMES
- TELEGRAPH
-MIDS
- DAILY MAIL
- EXPRESS
- EVENING STANDARD
- POPS
- THE SUN

I want the statement to include childnumber column so for newspaper it would count the total number of children below it, so in the above example newspaper would be 9 and for the mids it would equal 3? and pops = 1. does anyone know how i can do this in SQL?

thanks for your help

View 1 Replies


ADVERTISEMENT

Child Nodes Not Allowed. Web,config

Oct 25, 2007

Hi,
 I have a wierd error occuring here.
 <compilers>Line 95: <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/warnaserror-">Line 96: <providerOption name="CompilerVersion" value="v3.5"/></compiler>Line 97: <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/optioninfer+">Line 98: <providerOption name="CompilerVersion" value="v3.5"/></compiler></compilers></system.codedom>
 
Can someone help me about this one

View 2 Replies View Related

SQL XML :: How To Iterate Through Repeating Identical Child Nodes

Sep 16, 2015

I am working with a pretty complicated medical XML document and I am trying to query out lab information. The problem I am having is that there are many repeating child nodes and I can’t seem to get all the info I need without creating a bunch of columns. Here is a snippet of the XML; In attempting to shorten it up I may have left some elements unclosed but I hope not create table

#xml(ccd xml)
insert into #xml
Values ('<ClinicalDocument xmlns="urn:hl7-org:v3">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.3.1" />

[Code] ...

I can grab all the lab names alright but I am tiring to also grab the lab components as well. A lab could have just one component or it could have a dozen and I will never know ahead of time how many there are.

The following query works ok but would like to be able to grab all the components for a given lab in one column instead of making several columns incrementing the singleton each time. Is there a way that I can iterate through without creating a bunch of columns?

table/tbody/tr[1]/td)[1]
table/tbody/tr[2]/td)[1]
table/tbody/tr[3]/td)[1]
table/tbody/tr[4]/td)[1] 

View 7 Replies View Related

SQL Server 2008 :: XML Nodes To Retrieve Child And Its List Of Values

Apr 8, 2015

i was trying to use the XML read functionality using t-SQL for XML attached.The column is coming with the token names and token-values in XML format and we are using the XML nodes() functionality to read the token names and token value.I am able to read only the parent token names and its values(using the sql attached) and could not be able to get the child token names and its values.how can i acheive the tokenNames with its values with the SQL query.i am attaching both SQL script which i am using and the XML entity.

View 9 Replies View Related

DataSource: Hyperion Essbase Cube, Error Occurred Retrieving Child Nodes: Null

Oct 19, 2007



I have a custom essbase application/db source that I wish to connect to from SSRS 2005. I have all the required software installed (APS / SP2 .3050) etc.

I can connect to the datasource in SSRS 2005, but when I'm trying to build the query on the cube, I see under the member properties of all dimensions, the following piece of line
"error occurred retrieving child nodes: null"


Also, when I try to drag my Measures into the query section (or any other dimension for that matter of fact, though that defies logic) I get the following error

Cannot perform cube view operation. OLAP error (1260046): Unknown Member PARENT_UNIQUE_NAME used in query

I am new to using ESSBASE with SSRS 2005, and hence cannot make much sense of the above two errors.
Any insight or a re-direction to similar posts with solutions will be greatly appreciated.

thanks for your time,
!!

View 3 Replies View Related

Enties With Hierachy Relationship

May 29, 2008



Hi all,

Currently i have this problem and i am not sure how should i implement it.

Let said i have 3 tables. 1 parent table and 2 children tables.

Primary key from parent table is assigned to the children tables. How should i implement it so that a PK from the parent table assigned to child table 1 will not be reassign to child table 2?

Thansk and Regards
Salted Popcorn

View 3 Replies View Related

Expanding Hierachy With Multiple Parents

Jul 20, 2005

I have a user assigned multiple roles and a role can be inherited frommultiple parents (see below). How do I answer such questions as "Howmany roles does the user belongs to?"I answered the above questions by using .NET but I think it can bemore efficient by using just SQL. I would appreciate if you can giveme an answer.Thank you.CREATE TABLE [dbo].[tb_User] ([Id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,[Name] nvarchar(99) NOT NULL UNIQUE,[Password] nvarchar(99) NOT NULL,) ON [PRIMARY]GOCREATE TABLE [dbo].[tb_Role] ([Id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,[Name] nvarchar(99) NOT NULL UNIQUE,) ON [PRIMARY]GOCREATE TABLE [dbo].[tb_User_Role] ([UserId] [int] NOT NULL ,[RoleId] [int] NOT NULL,) ON [PRIMARY]GOALTER TABLE [dbo].[tb_User_Role] WITH NOCHECK ADDCONSTRAINT [PK_tb_User_Role] PRIMARY KEY CLUSTERED([UserId],[RoleId]) ON [PRIMARY]GOCREATE TABLE [dbo].[tb_Parent_Role] ([RoleId] [int] NOT NULL ,[ParentRoleId] [int] NOT NULL ,) ON [PRIMARY]GOALTER TABLE [dbo].[tb_Parent_Role] WITH NOCHECK ADDCONSTRAINT [PK_tb_Parent_Role] PRIMARY KEY CLUSTERED([RoleId],[ParentRoleId]) ON [PRIMARY]GO

View 1 Replies View Related

SQL 2012 :: Group By Parent With One Child And Multiple Child Information?

Jul 25, 2014

Basically i have three Tables

Request ID Parent ID Account Name Addresss
1452 1254789 Wendy's Atlanta Georgia
1453 1254789 Wendy's Norcross Georgia
1456 1254789 Waffle House Atlanta Georgia

Bid_ID Bid_Type Bid_Volume Bid_V Bid_D Bid_E Request_ID Parent ID
45897 Incentive 10 N/A N/A N/A 1452 1254789
45898 Incentive 10 N/A N/A N/A 1453 1254789
45899 Incentive 10 N/A N/A N/A 1456 1254789

Bid_Number Bid_Name Request_ID Parent ID
Q789456 Wendy'Off 1452 1254789
Q789457 Wendy'Reba 1452 1254789
Q789456 Wendy'Off 1453 1254789
Q789457 Wendy'Reba 1453 1254789
Q789456 Wendy'Off 1456 1254789

I want the Result

Parent ID Bid_Type Bid_Volume Bid_V Bid_D Bid_E AutoGeneratedCol
1254789 Incentive 10 N/A N/A N/A 1
1254789 Incentive 10 N/A N/A N/A 2
Bid Number AutoGeneratedCol_Link
Q789456 1
Q789457 1
Q789456 2
Request ID AutoGeneratedCol_Link
1452 1
1453 1
1456 2

View 1 Replies View Related

Child,chid Of Child ,child Of Child Of Child

Oct 22, 2007

 
 
............child  |parent|.............a1     |a     | .............a2     |a     |.............a11   |a1    |.............b1     |b     |.............b11   |b1    |.............b111 |b1    |.............
Here is my table I want to get all childs of "a" ie {a1,a11,a2}I mean recursivelyie child,chid of child ,child of child of child ........etc up to any extentet the table containHow can i for mulate the select   querry?

View 3 Replies View Related

Transact SQL :: To Get Parent / Child / Grand Child Row On Various Order?

Jun 26, 2015

I have a table with below kind of data,

DECLARE @TBL TABLE (ItemId INT IDENTITY(1,1), ItemName NVARCHAR(20), ItemDate DATE, ParentItemName NVARCHAR(20), ItemOrder INT, ReportId INT)
INSERT INTO @TBL (ItemName, ItemDate, ParentItemName, ItemOrder, ReportId)
VALUES ('Plan', '2015-06-01', NULL, 1, 20),('Design', '2015-06-01', NULL, 2, 20),('Test', '2015-06-20', NULL, 3, 20),('Complete', '2015-06-30', NULL, 4, 20),
('Design child A', '2015-06-02', 'Design', 1, 20), ('Design child B', '2015-06-01', 'Design', 2, 20),
('Test child A', '2015-06-10', 'Test', 1, 20), ('Test child B', '2015-06-09', 'Test', 2, 20), ('Test child C', '2015-06-08', 'Test', 3, 20),
('Test grand child A', '2015-06-08', 'Test child B', 1, 20), ('Test grand child B', '2015-06-08', 'Test child B', 2, 20)
select * from @TBL

Here I want,

1. to display all parent with ORDER BY ItemOrder (no need to sort by ItemDate)
2. display all child row right after their parent (ORDER BY ItemOrder if ItemDate are same, else ORDER BY ItemDate)
3. display all grand child row right after their parent (ORDER BY ItemOrder if ItemDate are same, else ORDER BY ItemDate)

Looking for below output ...

View 3 Replies View Related

Trying To Return A Single Record For Each Client From Child Table Based Upon A Field Of Date Type In Child Table

Nov 1, 2007

I have table "Clients" who have associated records in table "Mailings"
I want to populate a gridview using a single query that grabs all the info I need so that I may utilize the gridview's built in sorting.
I'm trying to return records containing the next upcoming mailing for each client.
 
The closest I can get is below:
I'm using GROUP BY because it allows me to return a single record for each client and the MIN part allows me to return the associated record in the mailings table for each client that contains the next upcoming 'send_date' 
 
SELECT MIN(dbo.tbl_clients.client_last_name) AS exp_last_name, MIN(dbo.tbl_mailings.send_date) AS exp_send_date, MIN(dbo.tbl_mailings.user_id) AS exp_user_id, dbo.tbl_clients.client_id, MIN(dbo.tbl_mailings.mailing_id) AS exp_mailing_idFROM dbo.tbl_clients INNER JOIN
dbo.tbl_mailings ON dbo.tbl_clients.client_id = dbo.tbl_mailings.client_idWHERE (dbo.tbl_mailings.user_id = 1000)GROUP BY dbo.tbl_clients.client_id
The user_id set at 1000 part is what makes it rightly pull in all clients for a particular user. Problem is, by using the GROUP BY statement I'm just getting the lowest 'mailing_id' number and NOT the actual entry associated with mailing item I want to return.  Same goes for the last_name field.   Perhaps I need to have a subquery within my WHERE clause?Or am I barking up the wrong tree entirely..

View 7 Replies View Related

Transact SQL :: Parent / Child Tables - Pivot Child Data To Parent Row

May 19, 2015

Given the sample data and query below, I would like to know if it is possible to have the outcome be a single row, with the ChildTypeId, c.StartDate, c.EndDate being contained in the parent row.  So, the outcome I'm hoping for based on the data below for ParentId = 1 would be:

1 2015-01-01 2015-12-31 AA 2015-01-01 2015-03-31 BB 2016-01-01 2016-03-31 CC 2017-01-01 2017-03-31 DD 2017-01-01 2017-03-31

declare @parent table (Id int not null primary key, StartDate date, EndDate date)
declare @child table (Id int not null primary key, ParentId int not null, ChildTypeId char(2) not null, StartDate date, EndDate date)
insert @parent select 1, '1/1/2015', '12/31/2015'
insert @child select 1, 1, 'AA', '1/1/2015', '3/31/2015'

[Code] .....

View 6 Replies View Related

Function On Heirarchy Nodes

Feb 3, 2006

Hi
i have 3 master tables 1)RoleDetails(Roleid(PK),name,masterroleid(fk) ref:RoleDetails roleid)
2) PositionDetails(positionid(PK), name,MasterPositionid(FK) ref:PostionDetails postionid,Roleid(fk) ref:Roledetails roleid)
3) Userdetails(userid(pk), loginid,pwd,roleid(fk) ref:roledetails roleid,positionid(fk)ref:postionDetails positionid,fname,address)
how to Create two functions one return child nodes as per Case 1 and another one is return Parent Nodes
as per case 2
(Manager) a -- r1 (roledetails)
/

(ROL)a1 (ROL) a2 -- r2
/ | / | |
(RO)b1 b2 b3 b4 b5 b6 -- r3
Case 1:
On passing the User ID of (a) , should get the Output as User id of ( b1,b2,b3,b4,b5,b6) along with their Role ID.

On passing the User ID of (a1), should get the Output as User ID of (b1,b2,b3)along with their Role ID.

Case 2:
On passing the Role ID of (R3), should get the User ID of all the Parent roles( a1 and a2 (R2), a(R1)long with their Role id
Case 3: on passing role id of child node , should get only all particular parent userid and roleid's.

thanks in adv.,
chakri

View 14 Replies View Related

XML Query Nodes - Sequence ID

Aug 8, 2014

I have a situation that can be summarized like this :

DECLARE @XML XML = '<X C="0" I="1"><E D="CODE1" A="0" /><E D="CODE2" A="0.03" /><E D="CODE2" A="0.04" /></X>'

SELECT
E.value('@D','varchar(MAX)') AS Code,
E.value('@A','varchar(MAX)') AS Rate
FROM @XML.nodes('./X/E') AS T(E)

The order of appearance is of capital importance as the rates do apply on the previous ones. Is there a way to generate a sequential ID based on the order of appearance in the XML string ? In this case, I want :

1 CODE1 0
2 CODE2 0.03
3 CODE2 0.04

I though of using a temp table with Identity column... But it's not the best way for my need. I have multiple lines each with a XML String. The ROW_NUMBER() windowed function needs a ORDER BY clause that I can't provide.

View 3 Replies View Related

SQL Clustering Info - More Than 2 Nodes Please.

Oct 26, 2005

I am looking for information on building a 4 node, multi-instance, SQL cluster on Win2K3 Datacenter server. I've consulted BOL, google, and Microsoft's "techinfo" pages for Datacenter server clustering, but everytime I think I'm going to get some good information, I end up with info on a default, 2-node cluster setup. Any guidence, links, etc. would be highly prized.

Thanks very much.

View 3 Replies View Related

Retrieving Tree Sub Nodes

Apr 16, 2007

I have a tree structured table like the ff.



which looks like the one below in tree view.



I'd like to get the rows under a specified elementnumber which may have unlimited sub-nodes.

i.e. If i want only 'Level1' i would get results from row 2-5.

any help is greatly appreciated.

View 4 Replies View Related

Nested Nodes In XML From A Table

Dec 6, 2005

Dear all,I have table called CATEGORY, which is defined as follows:CREATE TABLE CATEGORY(CATEGORY_ID INTEGER IDENTITY(1,1) NOT NULL,CATEGORY_NAME VARCHAR(40) NOT NULL CONSTRAINTUC__CATEGORY__CATEGORY_NAME UNIQUE,PARENT_CATEGORY_ID INTEGER,CATEGORY_ICON IMAGE,DEPTH INTEGER,CONSTRAINT PK__CATEGORY PRIMARY KEY (CATEGORY_ID))Supposly, the following snap shot was taken later:================================================== ============| CATEGORY_ID | CATEGORY_NAME | PARENT_CATEGORY_ID | DEPTH |================================================== ============| 1 | PC | NULL | 1 |--------------------------------------------------------------| 2 | Networks | 1 | 2 |--------------------------------------------------------------| 3 | Audio | 1 | 2 |--------------------------------------------------------------| 4 | Video | 1 | 2 |--------------------------------------------------------------| 5 | TV Cards | 4 | 3 |--------------------------------------------------------------| 6 | Graphics Cards | 4 | 3 |--------------------------------------------------------------| 7 | AGP | 6 | 4 |--------------------------------------------------------------| 8 | PCI | 6 | 4 |--------------------------------------------------------------| 9 | Input Devices | 1 | 2 |--------------------------------------------------------------and I'd like to create out of this hierarchy the following desired XMLfile:<?xml version="1.0" encoding="utf-8" ?><Hardware><Catgeory name="PC" id="1"><Catgeory name="Networks" id="2" /><Catgeory name="Audio" id="3" /><Catgeory name="Video" id="4"><Catgeory name="TV Cards" id="5" /><Catgeory name="Graphics Cards" id="6"><Catgeory name="AGP" id="7" /><Catgeory name="PCI" id="8" /></Category></Category><Catgeory name="Input Devices" id="9" /></Catgeory></Hardware>The reason for this file is that it will be a datasource of theTreeView Control new in asp.net 2.0.Now, programmateiclally using C#.net i started using the XmlDocument,XmlTextWriter and XmlTextReader Namespaces and started using susingrecurrsion to genearete this desired XML file out of the records in thesnapshot, but ...Is there an easy way of doing this using SqlServer 2005 with the newdatatype XML?*Any hint would also be ok*Best regards

View 12 Replies View Related

A 3-nodes And 2-clusters Architecture Possible?

Feb 7, 2008

To all the SQL H/A experts, we were wondering if we could have 3 physical nodes and 2 active/passive clusters architecture setup on a SAN as seen in the image below? http://www.geocities.com/juanlieu/CP_Arch.JPGIn case you cannot see the diagram, it would looks something like this:
active/passive Cluster A ---> physical server A (Win2003/SQL2005) ---> HP EVA SAN ---> physical server B (Win2003/SQL2005) ---> HP EVA SANactive/passive Cluster B ---> physical server B (Win2003/SQL2005) ---> HP EVA SAN ---> physical server C (Win2003/SQL2005) ---> HP EVA SAN
In this setup, I understand that Server B cannot be called upon as the active server at the SAME time by both clusters. question: what would happens if it does, would Server B reject the last cluster that calls it?Appreciated in advance.

View 3 Replies View Related

Adding Custom Nodes To The RDL

Dec 10, 2007

Is there a way to expand the RDL to add custom nodes?

I read here there is a <Custom> element that can be put inside the <Report> node, but it does not work. I get all kinds of Scheme errors.
http://msdn2.microsoft.com/en-us/library/ms153972.aspx


I get the following errors when I add <Custom> element inside <Report>, which is acceptable according the the MSDN link above.


Deserialization failed: The element 'Report' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition' has invalid child element 'Custom' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition'. List of possible elements expected: 'http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinitionescription http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition:Author http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition:AutoRefresh http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinitionataSources http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinitionataSets http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition:Body http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition:ReportParameters http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition:Code http://schemas.microsoft.com/sqlserver/reporting/2005/... Line 3, position 4.


Does anyone know how to get this to work, or know where there might be some information about this online? I am coming up dry.

Thanks.

View 1 Replies View Related

XML Datatype Nodes() Method

Oct 30, 2006



Dear ppl, I want to shred the following XML so that i can get all the Warranty(s) with id and text.

Required Output

id WarrantyText
1 1 year parts and labor
2 2 year parts and labor

XML

declare @myDoc xml
set @myDoc =
'<ProductDescription ProductID="1" ProductName="Road Bike">
<Features >
<Warranty id="1">1 year parts and labor</Warranty>
<Warranty id="2">2 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>'


I am using the following query but it doesn't seem to work


select C.value('@id', 'nvarchar(max)' ) as ID,
C.value('Warranty', 'nvarchar(max)' ) as WarrantyText
from @myDoc.nodes('//Warranty') T(C)

View 4 Replies View Related

Configuring 2 Nodes As Failovers For Each Other

Mar 22, 2007

We have a number of databases in our company and we recently had to buy a second SQL server. What I would like to do is have both SQL Servers act as failovers for each other. They both are the exact same hardware configuration (dell blades poweredge 1855) and we have a RAID array with Melio clustered file system for our web servers. I haven€™t found any documentation on if this is even possible. Am I completely wrong in thinking this can be done or is there a better solution to spread the load but provide failover support with out buying 2 new machines?

View 1 Replies View Related

Clustering Using A DB Which Already Contains The Distances Between Nodes

Feb 27, 2008

Hi,

I've got quite a simple case study, I've got a database which contains N nodes and a table containing N*(N-1) rows with the distances between each two nodes (it's a symmetrical matrix), I need to do several iterations and say to which clusters and sub-cluster each of the nodes belongs to, I failed to understand if it's within the SQL SERVER capabilities to handle already known distances in order to perform the clustering algorithm (the last part of it, just combining the groups according to the principle of minimum distances within each cluster and maximum distances between the different clusters).

In addition I would also need to know the followings:


is it possible to create an iterative process which will create several levels of clustering (number of groups found), and if so how do I tell the Mining tools how many group to create?

is there an over-lapping clusters process in the SSAS? (I.E if one node belongs to several clusters who are not a complete sub-groups of each other)

Thanks!
Ron

View 8 Replies View Related

Expand The Document Map Nodes

Feb 15, 2007

I was wondering if anyone can help me out with this. Is there any way that you can have a document map in SQL Reporting Services expand on load, or if there is a way to programmatically set the Document Map nodes to be expanded when a report is generated.

Thanks in advance for your help

View 1 Replies View Related

How To Get Node Name In SQL 2005 Nodes Query? Thanks

Nov 30, 2006

for example,xml like
'<name>test</name><age>10</age>'
select ? from @xml.nodes('/*')
how to get the node tag name like name and age?
thanks

View 4 Replies View Related

Updating Nodes In A Nested Set Model

Sep 14, 2006

We have a nested set L and R design in our database.
The design allows multiple instances of nodes in the hierarchy. Each node has a combination of node name and its instance id as the primary key. We also maintain a unique_qty column that has the unique number of nodes below a particular node. This unique qty basically ignores the multiple instances of nodes below it and counts only the distinct node names(ignoring their instance ids).
the problem that im facing is...how do i update the unique_qty when i perform any move in the tree.
UPDATE Hierarchy
SET unique_qty = ( SELECT COUNT(DISTINCT node_name) FROM Hierarchy AS H2 WHERE H2.L > Hierarchy.L AND H2.R < Hierarchy.R )

I am using the above query to find out the unique_qty when i initially populate the table.
My question is.. when i make a move of a subtree within the hierarchy, then i need to update this unique_qty for the source parents and the destination parents of the subtree( and the unique_qty for eah node in the subtree being moved remains the same ).
I had two ideas on how to update the parent nodes of the subtree:

1) for each node in the path to the root in the hierarchy, from the parent nodes( both source side and destination side) recalculate the unique_qty

2) for each node in the subtree find out until what level in the path to the root, we need to update the unique_qty, and then update only those unique_qtys

any suggestions on my methods? which one is better? any more ideas on how to do this??

View 4 Replies View Related

Getting All Nodes And Node Details From Xml Using Xquery

Apr 8, 2006

Hi,I haev the following code:DECLARE @x xmlSET @x='<Root><row id="1"><name>Larry</name><oflw>some text</oflw></row><row id="2"><name>Joe</name></row><row id="3" /></Root>'exec sp_xml_preparedocument @idoc OUTPUT, @xSELECT * FROM OPENXML(@idoc, '/Root')This gives the following detailsidparentidnodetype localnameprefixnamespaceuridatatypeprev textI want to get the same details using XQuery, please let me know how togo about it.Regards,Shilpa

View 2 Replies View Related

Cannot Apply SP2 To 2 New Nodes In A 4 Node Cluster ?

Oct 12, 2007

HI There

We had an existing 2 node active / active cluster, 1 running a default instance of Sql Server 2005 Enterprise Edition 9.0.3152 (SP2 + Hotfixes) and the other running a named instance of the same version.

We recently added 2 new nodes to the cluster, they were successfully added and we tested the cluster group failover successfuly to the new nodes.

Last night we tried to install Sql Server 2005 Enterprise edition on the new nodes.

I followed to proper proceudure of modifying the installation for both instances and selecting the 2 new nodes to apply them to. This went 100%. Sql Server 2005 successfully installed for both instances on the 2 new nodes, all log files were successful.

We then tried to apply SP2, we tried the following:

1. We ran SP2 from the active node, but when we go to the screen to select what you want to apply SP2 too we could not select anything, if you clicked on database engine the message said that these instances were already at a later version and we could not proceed. This is how i successfully applied SP2 to the original 2 node cluster but it does not work for additional nodes to an exisitng cluster.

This is also what all the documentation we could find said, refer to SP2 release notes under the topic "Failover Cluster Installation", it is also the method we found when googling.

2. We then tried what is described under SP2 release notes "Rebuild a SQL Server 2005 SP2 Failover Cluster Node".
We ran SP2 from the new nodes while they were passive, but when we got the screen where you select what to apply the SP2 too we could not select database engine the message at the bottom said that SP2 must be run from the active node and that we were attempting it from the passive node, this is what we tried in step 1 described above.

3. This was a last resort. We were advised to try failing over the instance to the new node and then running SP2. Personally i thought this was a bad idea, one should never fail over a instance of sql server to a node with incompatible binary versions and secondly when we installed sql server on the new nodes a warnng popped up before hand stating that the instances were at a later version and that the new nodes must be at this version before attempting fail over. I thought that sql would not even start, to my surprie we successfully failed over the sql group to the new node, when we ran SP2 it looked good we could select the database engine on the new node to apply SP2 too, BUT after clicking next after a few seconds the SP2 installation just closed, NO INFORMAITONAL MESSAGES NO ERRORS NO WARNINGS it just closed an never came back.

I had never seen this happen on a cluster before, needless to say this made me very nervous so we failed the sql group back to the original nodes and gave up.

PLEASE can some tell me how to apply SP2 to 2 new nodes in a 4 node cluster all methods descibed in SP2 release notes and other documentation as descibed above in step 1 and 2 do not work !

Thank You

View 3 Replies View Related

Error When Using XML Nodes As Cross Apply

Nov 12, 2012

 I have this query:

SELECT res.res_id,
sub.value('(./@id)[1]', 'char(2)') id
FROM vwResult res
CROSS APPLY report.nodes('/clue_personal_auto/report/search_dataset/subjects/*') report(sub)

It works just fine in SQL Query.After placing this into a view in SSDT November 2012 update, I get a compilation error.

View 11 Replies View Related

Build A Cluster Consisting Of Two Nodes?

Jul 15, 2015

I'm setting up a cluster to test a new deployments of SQL2K14 on a WSFC cluster (W2K12R2). Starwinds VS. the built in iSCSI service?Will either one allow me to build a cluster consisting of two nodes?  Do I need to dedicate a third node to run the iSCSI storage?

View 4 Replies View Related

Install Fails On X64 Cluster Nodes.

Feb 13, 2006

I can't seem to install SQL Server 2005 (x64 version) on an x64 Win2k3 two node cluster.

I get all the way through the configuration and setup fails because it cannot start a task on the remote node. The error message indicates to check the task scheduler log file, which I have and I cannot find any 'errors' in the file.

Google/MSDN/Technet turn up nothing on multiple searches. Has anyone else run into this problem?

My installation account is a local admin on both machines, so is the sql cluster account. For the life of me I cannot figure out what's different for an x64 install vs 32bit....

View 2 Replies View Related

Adding Nodes To An Existing Cluster

Mar 13, 2008



Hello,

We currently have a 2 node Active/Passive 2 named instance SQL 2000 cluster. We will be chaning the configuration to Active/Active, basically moving 1 instance to the passive node (so we can take advantage of the resources on the passive node).

We would also like to add 3 nodes to the cluster making it a 5 node SQL cluster. What we are thinking of doing is basically making it an Active/Active/Active/Active with the 5th server being passive. The question I have is will I be able to add and install the 3 new nodes without having to redo the SQL cluster? Should I install the two new active nodes with the default SQL instace or do I have to install SQL with named instances? (actually I think the named instances is the way to go but then I wouldn't be posting here if I was sure about the answer).

Thx!

-Albert-

View 2 Replies View Related

XML Datasources : Datasets Don't Find All The Nodes

Nov 20, 2007

Hello,


we use SQL Server 2005 Reporting Services with XML Datasources, but we have the following issue :


with a xml like this :
<Root>

<A>a</A>
<B>b</B>
<L>Item 1</L>
<L>Item 2</L>
<C>c</C>
</Root>


If we use the query Root, the resulting dataset is :
A B C
a b c

But with this query : Root/L, the dataset is :
L A B
Item 1 a b
Item 2 a b

The dataset doesn't find the "C" node.

Anyone have an idea ?

PS : I don't control the xml structure, so I can't displace the "C" node.

View 1 Replies View Related

Updating Nodes In A Nested Set Model

Sep 14, 2006

We have a nested set design in our database.
The
design allows multiple instances of nodes in the hierarchy. Each node
has a combination of node name and its instance id as the primary key.
We also maintain a unique_qty column that has the unique number of
nodes below a particular node. This unique qty basically ignores the
multiple instances of nodes below it and counts only the distinct node
names(ignoring their instance ids).
the problem that im facing is...how do i update the unique_qty when i perform any move in the tree.

Thanks in advance
satya phani

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved