SQL Server 2012 :: How To Copy Nested Sub-tree From One Node To Another

May 12, 2015

I have a tree and I need to copy a nested sub-tree (an element with its children, which in turn may have their owns) from one place to another.

The system should allow to handle up to 8 levels. I do know how to move, but cannot figure out how to copy.

Below is a working example With Create Table, Select and Cut / Paste (implemented via Update).

I would like to know how to copy a nested tree with reference id 4451 from Parent_Id 1 to Parent_Id = 2

--***** Table Definition With Insert Into to provide some basic data ****

IF (OBJECT_ID ('myRefTable', 'U') IS NOT NULL)
DROP TABLE myRefTable;
GO
CREATE TABLE myRefTable
(
Reference_Id INT DEFAULT 0 NOT NULL CONSTRAINT myRefTable_PK PRIMARY KEY,

[Code] ....

How to Copy nested sub-tree 4451 with all its children to Parent_Id 2, without deleting from Parent_Id = 1 ?

View 7 Replies


ADVERTISEMENT

How To Get 2 Level Tree Node In The Sql Server 2005

May 30, 2008

hi,

How to get 2 level tree node in the sql server 2005. We have table with data.On load we populate the tree in Asp.net.

Regards,
Vinayak Panchal

View 2 Replies View Related

Embedded SQL Code In A ASP.NET Tree Node

Feb 27, 2008

I am trying to modify a piece of SQL where I  want to get the date difference from todays date and the datestamp on the latest record on dbo.activitym1 table AC1  ..which matches the following criteria..WHERE (AC1.Type = 'Assignment' or AC1.Type = 'Reassignment') and PS1.number = AC1.number) 
PS1.number is the master record ID
But this doesnt seem to work ..the best result i've been able to achieve is all records from the dbo.activitym1 table that match the where clause and i only want the latest by date
 heres the code
any help would be most appriciatedSelect PS1.number, PS1.brief_description," +
" DateDiff(day, PS1.open_time, Getdate()) as 'Days_Open', PS1.company," +" (select DateDiff(day, AC1.datestamp, Getdate())" +
" From " + ConfigurationManager.AppSettings["DATABASE_NAME"] + ".dbo.activitym1 as AC1" +" WHERE (AC1.Type = 'Assignment' or AC1.Type = 'Reassignment') and PS1.number = AC1.number) as 'Days_Since_Last_Assigned'," +
" CONVERT(VARCHAR(10), PS1.open_time, 103) as 'Date_logged'" +
" From " + ConfigurationManager.AppSettings["DATABASE_NAME"] + ".dbo.probsummarym1 as PS1" +
 
"where (PS1.assignment = 'PROD - UK CENTRAL CPH COGNOS SUPPORT' OR " +
" PS1.assignment = 'PROD - UK CENTRAL CPH CONS HEALTH' OR " +
" PS1.assignment = 'PROD - UK CENTRAL CPH PUBLICATIONS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL CPH TERRITORY PLANNER' OR " +
" PS1.assignment = 'PROD - UK CENTRAL CPH VIEWPLUS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL CHEMICAL PIONEER' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL COMPANY PROFILES' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL COMPANY SEARCH' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL GENERIC PLNG & ANLYSER' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL LIFECYCLE NPF' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL LIFECYCLE PATENTS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL LIFECYCLE RDF' OR " +
" PS1.assignment = 'PROD - UK CENTRAL EDITORIAL MIDAS GENERICS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL FORECASTING ANALOGUE' OR " +
" PS1.assignment = 'PROD - UK CENTRAL FORECASTING GENERICS MARKET PROGNOSIS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL FORECASTING MARKET PROGNOSIS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL FORECASTING OTC REVIEW' OR " +
" PS1.assignment = 'PROD - UK CENTRAL FORECASTING THERAPY FORECASTER' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB CHEM INTPACK' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB CLASSFN' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB CORP' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB CUSU' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB DSG' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB GPIN' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB INTPRD' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB KNOWLEDGELINK' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB LICENSING' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB LPIN' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB MARK SEG' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB OTHER' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB PRICES FACTORS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB STANDARDS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL GLOB WHO' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT ACCOUNTS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT ADMINS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT EXEC' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT HPA CODING' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT HPA CPMS' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT HPA PROD CTRL' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT HPA QUALITY CONTROL' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT INTL FIELDWORK' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT IT SOL' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PANEL CTRL' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PATIENT DATA CODIN' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PATIENT DATA PROCESSING' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PATIENT DATA QRY & SUPPORT' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PRODUCT REFERENCE' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT PSO' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT QUALITY ASSURANCE' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT RESEARCH HOSPITAL GROUP' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SIT WARD' OR " +
" PS1.assignment = 'PROD - UK CENTRAL SITTINGBOURNE' )" +
" and UPPER(PS1.Status) <> 'CLOSED'

View 2 Replies View Related

SQL 2012 :: Sort Tree Members In Right (tree) Structure?

Apr 6, 2015

I got assignment, how to make it appear in the right order .

/* DROP TABLE EMP
SELECT * INTO Emp FROM (
SELECT 'A' EmpID, NULL ManID, 'Name' EmpName UNION ALL
SELECT 'MAC' EmpID, 'A' ManID, 'Name__' EmpName UNION ALL
SELECT '1ABA' EmpID, 'MAC' ManID, 'Name____' EmpName UNION ALL
SELECT 'ABB' EmpID, '1ABA' ManID, 'Name______' EmpName UNION ALL
SELECT 'XB' EmpID, 'A' ManID, 'Name__' EmpName UNION ALL
SELECT 'BAC' EmpID, 'XB' ManID, 'Name____' EmpName ) b
*/

[code]....

View 2 Replies View Related

How Do I Write A Query To Get The Path From Ancestor To Node In A Tree?

Sep 12, 2005

Hi all. Here's my problem: I have a tree linking macaddresses (bigints)in a tree structure. i want to get the path from node a to b.create table tree1(father bigint , child bigint);insert into tree1 (father,child) values (100,200);insert into tree1 (father,child) values (100,300);insert into tree1 (father,child) values (100,400);insert into tree1 (father,child) values (200,2000);insert into tree1 (father,child) values (200,3000);insert into tree1 (father,child) values (100,4000);insert into tree1 (father,child) values (2000,11111);you can see that 100 --> 200 --> 2000 --> 11111select * from tree1what i would like is a query that given two parameters returns the pathbetweenthem, in the case of 100,11111 i want to get100200200011111if possible as different rows, but columns will do to.of course i do not know the legnth of the path. it can be very bigthx in advanceTzvika

View 3 Replies View Related

Decision Tree Predictions Occuring At Non-leaf Node

May 2, 2007

After having built a decision tree model to predict a boolean output attribute using 64-bit SQL Server 2005 (build 9.0.3054), we have observed that predictions for some cases are being done at non-leaf nodes in the tree.



Specifically, after executing a prediction join which returns:


- CaseTable.CaseID
- MiningModel.OutputAttribute
- PredictProbability(MiningModel.OutputAttribute)
- PredictNodeId(MiningModel.OutputAttribute)



and comparing the values of PredictNodeID(MiningModel.OutputAttribute) with the mining model content column [NODE_UNIQUE_NAME] to determine the actual "rule" used to make the case-level prediction.



We have observed that for a subset of cases, predictions are being made at nodes in the tree that are not leaf nodes. Specifically, predictions are being made at a node that is 3 levels deep. The leaf nodes below this inner-tree node are 2 levels further down the tree.



Also supporting the fact that that predictions are being made at this non-leaf node is that the PredictProbability corresponds exactly with the output attribute distribution at this non-leaf node.



In this particular application, we would have obtained better results if the predictions were made at the leaf-nodes.



A few questions:
1. Why are predictions with decision trees made at non-leaf nodes?
2. Is there a way to "force" predictions to occur at leaf nodes via DMX?



Thanks in advance for any information or advice.

- Paul

View 1 Replies View Related

SQL 2012 :: Log Shipping - Reboot Secondary Node And Then Primary Node

Apr 20, 2015

I have not used log shipping before and find myself in a position where I need to reboot the secondary node and then the primary node and I don't actually need to failover.

Is there anything I need to be aware of. When rebooting the secondary node I assume the transactions will be held in the primary nodes log till the secondary comes back and just carry on once back up?

When rebooting the primary node nothing needs to be done and the log shipping will just start again once it has come back?

View 3 Replies View Related

Hierarchical (tree) Data Structure Where A Node Can Have Multiple Parents

May 9, 2008

Hi all!
I am trying to organize a hierarchical data structure into a table. I need to have the possibility to set 2 parents for some nodes. Curently I see following two options:
Example 1
id    parent_id    name-----------------------------------1     0                 Level 1 Parent A2     0                 Level 1 Parent B3     1,2              Level 2 Child
Example 2
id    parent_id    name-----------------------------------1     0                 Level 1 Parent A2     0                 Level 1 Parent B3     1                 Level 2 Child3     2                 Level 2 Child
Is any of the two examples valid database logic wise? In fact, is it possible to achieve the requirement by using only one table?
Thanks in advance,

View 4 Replies View Related

SQL 2012 :: Running 2 Distinct AGs On Each Node Of A Two Node Cluster?

Oct 23, 2014

I'm contemplating running two availability groups on a two node WSFC. The WSFC is setup with a file share witness (i.e. no shared storage). Can I safely run 1 AG on one primary node, and the other AG on the other node (as primary). Each AG would have replicas on the passive node. This would effectively allow both servers to be in use at the same time. In a failover event, I understand that both workloads would transfer to a single server - so the box needs to be sized appropriately.

View 1 Replies View Related

SQL 2012 :: 3 Node Cluster Runs With 2 Node Failures?

Jun 11, 2015

We are in the process of building a 3 node SQL Server Cluster (Server 2012/ SQL Server 2012), and we have configured the quorum so that all 3 nodes have a vote (no file share witness as we already have an odd number of nodes).

As I understand it, this should allow the cluster to run as long as 2 of the nodes remain online.

However, the validation report states that 2 node failures would be acceptable and, when we tested this by powering off two of the nodes, the cluster did indeed continue to run on a single node.

View 4 Replies View Related

PMML: One Node In A Decision Tree Containing Two States Of An Attribute As The Rule For Splitting?

Sep 22, 2006

Hi,
is there a way to import a decision tree-model from pmml where a node contains two or more states of an attribute as the split-rule?


Example:

...
<Node recordCount="600">
<CompoundPredicate booleanOperator="or">
<SimplePredicate field="color" operator="equal" value="red" />
<SimplePredicate field="color" operator="equal" value="green" />
</CompoundPredicate>
<ScoreDistribution value="true" recordCount="200"/>
<ScoreDistribution value="false" recordCount="400"/>
</Node>
...

This node shoud contain all cases, whose color is red or green (The Microsoft DecisionTree-Algorithm would build a model with two steps like red/ not red and then green / not green). According to the DMG, this is valid PMML 2.1, but when trying to import the server complains about an unexpected value in the SimplePredicate-tag.

How can i import such a node in SqlServer 2005?

Thank you in advance for any help

Chris

View 8 Replies View Related

SQL Server 2012 :: Traversing Down A Tree

Feb 9, 2015

I'm working with a development bug database where if someone puts in a bug number, they want to get the parent bug. No problem.

SET @cur_parent = (SELECTdupeof_key
FROMqds.dbo.Dimduplicates d
WHEREd.dupe_key = @checkbug
ANDd.end_ts IS NULL)
WHILE @cur_parent IS NOT NULL

[Code] ...

However, now they want to be able to do the same thing in reverse. Put in a bug and determine how many bugs are duplicates (either directly - children, or indirectly - grandchildren/great-grandchildren, etc.).

The majority of bugs go no more than three generations deep but there are some that go much deeper so I need to have something where I can loop through each potential generation and get the number of bugs associated with it.

Example.

Parent Bug Child Grandchild GGChild
1 2 3 4
1 5
1 28 32
1 40 41 42
1 50
1 60
1 65 70

If I put in bug 1 I should be able to get a count of 13 associated duplicate bugs. Additionally, they want to be able to get a list of the bugs that are associated with that parent.

If there were a set number of levels, self-joining would work to create a generational matrix. However, as there is no limit on how deep the generations can go, I need something dynamic to traverse the tree and generate the list of bugs/count of bugs.

It was easy going up the tree because there was a strict one-to-one relationship between child and parent.

View 9 Replies View Related

SQL 2012 :: Add Node To Server Cluster

Oct 3, 2015

Can I add a new node to an existing sql server 2012 cluster witthout stopping all the current resources?

Currently, there are 2 nodes and 3 sql server instances, which can not be shutdown. Is the process of adding nodes a "online" process?

View 1 Replies View Related

SQL Server 2012 :: Read All Values From XML Node?

Nov 21, 2013

I have the following code and trouble reading values of Bank Accounts. If i remove the line it says "xmlns="http://applications.apch1.com/webservice/schema/" then i my query is working. But i cant remove this becasue that is what i will get response from a web service. All the records are stored in the database with this line included.

DECLARE @MyXML XML
SET @MyXML = '<GetEmployeeDetails xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<return xmlns="http://applications.apch1.com/webservice/schema/">
<CustomerID> A8339 </CustomerID>
<BankAccounts>

[Code] .....

View 2 Replies View Related

SQL 2012 :: Specify Server Installation Location When Adding Second Node To Cluster

Jun 6, 2014

When adding a node to a SQL Server 2012 Standard edition cluster, how I do I identify the location for SQL server shared components and the rest of the SQL Server installation binaries?

When adding a node to a SQL Server 2012 Standard edition cluster all the binaries went to the C: drive default location. We put those files on a different drive when installing the first node. What needs to be done so both nodes have the binaries on the same drives and folders?

View 3 Replies View Related

SQL 2012 :: Primary Server Went Down And Unable To Failover Services To Second Node

Mar 27, 2015

y'day we faced situation one of the primary server went down and unable to failover the services to second node . by checking in logs we found

Cluster network 'Public' is partitioned. Some attached failover cluster nodes cannot communicate with each other over the network. The failover cluster was not able to determine the location of the failure. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapter. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.

View 7 Replies View Related

SQL Server 2012 :: Nested FOR XML Path

Oct 16, 2014

I'm trying to reverse engineer an XML output based on a client's need of a very specific format. Besides the issue of getting the XML declaration written in and removing NULLs, I'm having an issue with a three times nested PATH query.

So far the document almost has the correct format, except for the first nested root being returned. Is there any way to prevent this?

*some data redacted

Query:

DECLARE @a XML
SET @a =
(SELECT FileCreationDate,
(
SELECT PCE_TPD.PJN,
(
SELECT top (2) TaskCode, TaskName, RSI, TAFFD, AFD, Notes, PID, CUSID, NeedToBeNA

[Code] ....

Current Output (first few lines):

<TDBUIData xmlns="http://www.xxxxx">
<TDBUIData12 xmlns=""> --NEED TO ELIMINATE THIS
<FileCreationDate>2014-10-15T23:23:00</FileCreationDate>
<TDBUIDL>
<PJN>MRWSH010824</PJN>

[Code] ...

Desired Output (first few lines):

<TDBUIData xmlns="http://www.xxxxx">
<FileCreationDate>2014-10-15T23:23:00</FileCreationDate>
<TDBUIDL>
<PJN>MRWSH010824</PJN>
<TaskData>

[Code] ...

View 4 Replies View Related

SQL Server 2012 :: How To Implement Nested Tables

Dec 15, 2014

I need to perform some operations that seem to require multiple nested tables.

Is the following code the way I should be attempting this or is there a better way?

Here is the sample code:

SELECT tt.tdl_ID, tt.tx_ID, adj.Prof_Chgs, rc.Rvu_Comp
FROM Table1 as tt
LEFT JOIN (
SELECT tt1.Tdl_Id,
CASE
WHEN tt1.tdl_ID = '1000'

[code]....

View 8 Replies View Related

Do I Need To Install SQL Server To Second Node In Cluster Prior To Adding The Node?

Jun 12, 2007

I read these instructions:

http://msdn2.microsoft.com/en-us/library/ms191545(SQL.90).aspx



But I'm not sure if I have to install SQL Server first on node 2, then add it to the cluster. Or does adding it to the cluster also install the software?



Thanks

View 1 Replies View Related

SQL Server 2012 :: Structure For Multiple Nested Queries

Feb 27, 2014

I am using Server 2012 and very new to SQL. I have a request from a physician for a list of his patients that meet a criteria. This is stored in a temp table names #cohort.

Using this cohort he wants each row to be one patient with a list of labs, vitals, etc. Three items are the most recent lab value and date. I could query each lab individually and place it into a temp table and then join all temp tables at the end, but I am trying to move past that and have all labs in one temp table. All temp tables are joined with PatientSID.

I tried to do something for just 2 labs, but it is not working. There could be nulls values when joined with the #cohort table.

Individually the SELECT statements pull in the most recent lab value and date, but I cannot get them into a temp table with one row of PatientSID and then the lab value and date if they exist.

IF OBJECT_ID ('TEMPDB..#lab') IS NOT NULL DROP TABLE #lab
SELECT
cohort.PatientSID
,SubQuery1.LabChemResultNumericValueAS 'A1c%'
,SubQuery1.LabChemCompleteDateTimeAS 'A1c% Date'
,SubQuery2.LabChemResultNumericValueAS 'LDL'

[Code] .....

View 1 Replies View Related

SQL Server 2012 :: Nested Query Retrieving Min And Max Values?

Jul 16, 2015

I have a nested query that retrieves a min value. I would like to know how do i retrieve the corresponding time with that.

my data looks like this

valuevaluetime
1212/31/14 14:51
12.42/19/15 23:30
[highlight=#ffff11]10.92/21/15 6:40[/highlight]
13.21/25/15 20:47

My min value is 10.9 and i need the date 02/21/15

my nested query is as follows

( select min(cast(f.valuestr as float))
from bvfindings f
where f.ObjectName = 'Hematocrit'
and f.sessionid = s.sessionid
and f.ValueTime > s.open_time)

the above returns me the 10.9

i modified the query

select min(cast(f.valuestr as float)),
f.valuetime
from bvfindings f
where f.ObjectName = 'Hb'

but i get all values then.

View 6 Replies View Related

SQL Server 2012 :: Retrieve Column From Nested Query

Aug 6, 2015

I have the following query and where I need to use the t_PrevSession.DischargeTime which is in the nested query that is bolded below. How do i bring it up to the main select statement?

SELECT
s.facilityid,
s.sessionid,
s.MRN,

[code]....

View 2 Replies View Related

SQL 2012 :: Getting Value From XML / Node Out Of Table

May 16, 2014

I have a table which has a field with a data type of Xml. A sample record might contain something like this:

<?xml version="1.0" encoding="utf-16"?>
<order>
<Product Index="14c9643f-63d9-40c5" ProductID="13" Name="............>
<Attribute Name="Paper" OptCatId="1" Value="72" ....../>
<Attribute Name="Ink" OptCatId="2" Value="6" ......../>
<Attribute Name="Bleed" OptCatId="3" Value="15" ......./>
<Attribute Name="Number of Drops" OptCatId="0" Value="1" ...../>

I need to grab the Node/Attribute with the name of "Number of Drops" and get the value of "Value". So in this case, I simply want to get "1". How could I do this?

SELECT "value of Number of Drops"
FROM myTable
WHERE ID = ....

View 1 Replies View Related

SQL 2012 :: Build Tree From Child To Parent Table

Jan 15, 2015

I'm playing with CTE and just want to expand my skills and ask how you would build this tree structure to fill that [Tree] column for table like in sample below:

/* CREATE TABLE #T1 (child_id INT, parent_id INT, tree VARCHAR(MAX))

INSERT INTO #T1 VALUES
( 200,3, '200-3-2-1' ),
( 100 , 14 , '100-14-1'),
( 3 , 2 , '3-2-1'),
( 2 , 1 , '2-1'),
( 14 , 1 , '14-1'),
( 1 , NULL , '1');

[Code] .....

View 2 Replies View Related

SQL 2012 :: Copy SSIDB From One Server To Another

Apr 21, 2015

For copying the SSISDB from one server A to another B I used the following steps:

Took backup of SSISDB on server A.

On Server B, created a new SSISDB catalog.

Restored the newly created SSIDB on B from backup of the DB from server A.

Is it correct process for SSISDB or not.

View 1 Replies View Related

SQL 2012 :: AlwaysON Setting Up A C Node?

Apr 28, 2014

I have an A & B node set up and running. I now want to add a C NODE.

The catch is the C NODE is in a SQL Cluster Environment.

I am guessing I add the Virtual Name of the C node to the current Always ON Cluster?

I tried adding it...the error message says" the Virtual Node is really the A node and to add the A NODE"?

View 6 Replies View Related

SQL 2012 :: Copy Backup Files From One Server To Another?

Sep 23, 2014

I've an emergency requirement to copy Source server database backup files to destination Server through xcopy command. Backup job on source server runs daily, so once this job get completes all databases backups needs to be moved to destination server. But here the main concern is "the backup files on destination server shouldn't be overwritten, they should be placed separately as Source server job runs daily".

We've a command which overwrites backups on destination server. But we need to keep backups on destination at-least for 4 weeks (means : retention should be 4 Weeks).

View 5 Replies View Related

SQL Server 2012 :: Dynamically Copy The Table From One DB To Another?

Nov 27, 2014

Need to scheduled to copy table data from one database to another database daily @7:00 AM by creating the table with date and time stamp.

Example :

Test1DB ---> Table1

Test2DB -----> Table1_281120140700 in Day1 and Table2_291120140700 in Day2.....and so.

SELECT * INTO Test2db.dbo.new_table_name FROM Test1db.dbo.old_table_name in this format ??

script and scheduled to run daily @ 7:00AM?

View 1 Replies View Related

SQL 2012 :: Add Node In A Cluster - Network Configuration?

Sep 8, 2014

I have installed SQL Server 2012 on Node1 successfully and trying add node on Node2 and its failing with below message. I attached the screen shot.

Here we are not doing multi-subnet failover clustering. Why we are getting extra and asking for IP and what IP should we enter there?Add Node option should automatically detect the IP we configured on Node1.

[Error Message] To support SQL Server multi-subnet failover clustering, you must select at least one valid IP address for every subnet in the cluster.

[Details] Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicValidationException: To support SQL Server multi-subnet failover clustering, you must select at least one valid IP address for every subnet in the cluster.

View 1 Replies View Related

SQL 2012 :: Extracting Node From A Column In A Table That Contains XML

Dec 4, 2014

I am trying to extract what I believe is called a Node from a column in a table that contains XML. What's the best way to do this? It is pretty straightforward since I'm not even looking to include a WHERE clause.

What I have so far is:

SELECT CCH.OrderID, CCH.CCXML.query('/cc/auth')
FROM tblCCH AS CCH

View 3 Replies View Related

SQL 2012 :: Two Node WSFC On A Multi Subnet

Feb 10, 2015

We are running SQL Server 2012 Enterprise on Windows 2012 R2. We have set up A WSFC with the primary Node in our East Coast Data Center and the Secondary Node in our West Coast Data Center each node is in a dfferent subnet. Since we have high latency between the sites we run in Asynchronous mode with manual failover only. My quesion concerns Quorum, everything I read would indicate we need a third node (odd number) (e.g. a fileshare Witness) with only the file share and the primary node having a vote...What I don't see is any need for a file share if we can only do manual failover.

View 7 Replies View Related

SQL 2012 :: SSISDB On New Primary Node Is Not Usable

Mar 6, 2015

During the installation of the SSISDB in SQL 2012 AG, the password used to encrypt the database was not preserved. Now when the server is failed over, the SSISDB on the new primary node is not use-able.Document the password and decrypt after using the master key after failover.

View 5 Replies View Related

SQL 2012 :: Cluster With Multiple Instances On The Same Node?

Jul 14, 2015

What I have- Sql server 2012 (Standard Ed) Cluster on Windows 2012 R2 with both instances running on the same node- just to save on License, i.e. technically it’s Act/Pas cluster.

What I am looking for- how to configure cluster (e.g. via quorum, etc) to force both instances failed together? Means if for some reason 1-st instance will fail to node 2 another instance should follow (otherwise it will be Act/Act cluster and 2-nd license is required).

If there is no standard way (cluster configuration I mean) to do it I should create some custom process to monitor where each instance is running.

View 3 Replies View Related







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