SQL Cluster Fails Every 2nd Week

Dec 30, 2006

I have SQL Server 2000 SP4

Cluster Services running data on SAN

I have two groups SQL1 owner SQLCL1, SQL2 owner SQLCL2

Active resources

SQLCL1 owner SQLCL1 group SQL1

SQLCL2 ower SQLCL2 group SQL2

Every 2 weeks at 1:30 on a friday of all days The active resources for SQL1CL1 switch to SQLCL2 so under active resources i have all of SQL1 in there.

I then decided to flip flop everything SQL1 to SQLCL2

Then again 2 weeks later again SQL1 fails over .....

I cannot figure out why that every 2 weeks this is failing over to the other nodes.

Any advice is appreciated

View 2 Replies


ADVERTISEMENT

SQL Install Into Cluster Fails

Apr 15, 2004

I'm trying to install SQL into a new cluster. The cluster service is up and running fine. I can even fail it from Node 1 to Node 2 with no problem.

However, when I try to install SQL, I get a screen that tells me that SQL is performing required operations on the cluster nodes...this may take a few minutes.

After hanging on that message for a looong time, SQL comes up with a generic message that the install failed and that SQL is cleaning up. Then, nothing. No error message, nothing that I can track down.

Some system information:
Node 1. Dell PE2650, 2x 2.8 GHz, 2 GB RAM
- Windows 2000 Advanced Server
- Dell Perc3/DC RAID/SCSI Controller
- Dell Perc3/DI Integrated RAID Controller

Node 2. Dell PE2650, 2x 2.8 GHz, 2 GB RAM
- Windows 2000 Advanced Server
- Dell Perc3/DC RAID/SCSI Controller
- Dell Perc3/DI Integrated RAID Controller

Shared Storage. Dell PV220
- Q: Quorum (1 GB)
- S: Data (136 GB)
- T: Logs (20 GB)


Additional Notes:
1. I am using a checklist from Dell and another from MS.
2. I have also downloaded and read the checklist from sql-server-performance.com.
3. I have ensured that the comclust.exe was run on both nodes prior to starting the SQL installation
4. I am using SQL Enterprise Edition. We used the same CD to install a cluster server two weeks ago.

Questions:
1. Where can I find an installation error log that might point more specifically to where the problem might be?
2. Any thoughts on what the problem might be?
3. Anyone ever experience something similar?

View 3 Replies View Related

SQL 2K5 Cluster Install Fails

Sep 28, 2007



Have SQL 2000 SP4 clustered instance running now. Attempted inplace upgrade to SQL 2K5 standard edition.
Boxes are Windows 32 bit Ent Edition, SP2. Install wizard installed pre-req's just fine, and I got past the "components to install" box of the install wizard. When I clicked next, the current 2000 instance (already installed component) was grayed out and I could not select it. Checking the messages in the install wizard, I saw that my "upgrade was blocked".
I cancelled out of the install wizard to verify all requirements.

Bounced both boxes, and now when I try to run the install wizard, it tried to install the required support files (ASP.net 2.0, SQL Native Client and what not) and then the install wizard hangs..... and never comes back. I have to kill it from taskmgr. Bounced the boxes and tried again, same thing. Install wizard hangs forever.

Yes, I am running from the active node holding the cluster resources. Yes, SQL 2000 instance is cold. Yes, I've checked add/remove programs and there is nothing to uninstall.
Checked event viewer and I see the following errors:

Hanging application setup.exe, version 2005.90.1399.0, hang module hungapp, version 0.0.0.0, hang address 0x00000000.

Fault bucket 238575085.


I've reached out to our TAM, but any help would be appreciated. No matter how many times I try, the install wizard now chokes and never comes back.

View 8 Replies View Related

Cluster Install Fails

Jan 31, 2006

I'm running into issues installing SQL 2005 Enterprise on a Win2003 server. They seem to be related to missing rights. I've done a lot of research and have come up empty. Does anyone know why I'm getting these log entries? Thanks for any help.

Running: OpenPipeAction at: 2006/0/31 11:35:35
Complete: OpenPipeAction at: 2006/0/31 11:35:35, returned false
Error: Action "OpenPipeAction" failed during execution.

Error: 0x80070005 TaskScheduler::SetTargetComputer for \SERVER
Complete: RunRemoteSetupAction at: 2006/0/31 11:35:35, returned false
Error: Action "RunRemoteSetupAction" failed during execution. Error information reported during run:
Attempting to determine log files for remote install.
Connection to remote computer's scheduler service.
Error: 80070005 Access is denied.

Skipped: InstallASAction.11
Waiting for actions from remote setup(s)
Breaking wait state and aborting package due to cancel code received: 1602
Remote setup(s) are ready
Notify package action is determined: 1602
Error Code: 0x800700e9 (233)
Windows Error Text: No process is on the other end of the pipe.

Source File Name: remotemessageliboverlappedpipelistener.cpp
Compiler Timestamp: Fri Jul 29 01:13:51 2005
Function Name: sqls::OverlappedPipeListener::writePipe
Source Line Number: 294
Notification failed to send.

View 9 Replies View Related

Sql 2005 Cluster Setup Fails

Jun 2, 2006

am trying to install sql 2005 with cluster option in win 2003 R2
servers
and keep getting sql database setup failed error.Summary log show that
it failed with error number 67.
It doesn't even create a SQLSetup0004_M2MTPONE_SQL.log file. core log
shows


Complete: DetectLocalBootstrapAction at: 2006/5/1 18:15:31, returned
true
Running: LaunchLocalBootstrapAction at: 2006/5/1 18:15:31
Error: Action "LaunchLocalBootstrapAction" threw an exception during
execution. Error information reported during run:
"C:Program FilesMicrosoft SQL Server90Setup Bootstrapsetup.exe"
finished and returned: 67
Aborting queue processing as nested installer has completed
Message pump returning: 67


We have two machines in running enterprises version of R2 in a cluster.
I tried running the setup from both machines and got the same error.


I am trying to find a solution for more than week but no luck. Any
help is appreciated.


thanks - Kailash


Part of Summary log:
---------------------------------------------------------------------------­-----


Machine : M2MTPONE
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup
BootstrapLOGFilesSQLSetup0004_M2MTPONE_BackwardsCompat_1.log
---------------------------------------------------------------------------­-----


Machine : NEWTPNT1
Product : MSXML 6.0 Parser
Product Version : 6.00.3883.8
Install : Successful
Log File : \M2MTPONEC$Program FilesMicrosoft SQL
Server90Setup BootstrapLOGFilesSQLSetup0004_NEWTPNT1_MSXML6_1.log
---------------------------------------------------------------------------­-----


Machine : M2MTPONE
Product : MSXML 6.0 Parser
Product Version : 6.00.3883.8
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup
BootstrapLOGFilesSQLSetup0004_M2MTPONE_MSXML6_1.log
---------------------------------------------------------------------------­-----


Machine : M2MTPONE
Product : Microsoft SQL Server 2005
Product Version : 9.00.1399.06
Install : Failed
Error Number : 67
---------------------------------------------------------------------------­-----


Machine : NEWTPNT1
Product : Microsoft SQL Server 2005
Product Version : 9.00.1399.06
Install : Failed
Error Number : 67
---------------------------------------------------------------------------­-----


SQL Server Setup failed. For more information, review the Setup log
file in %ProgramFiles%Microsoft SQL Server90Setup
BootstrapLOGSummary.txt.


Time : Thu Jun 01 18:18:54 2006

View 5 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

DTC Resource Fails On Cluster - Bug That Should Be Fix In SP2 (KB 899426)

Dec 29, 2007

I am expirincing an issue that should have been corrected in SP2. When following the steps to enable DTC on my Windows 2003 SP2 Cluster, I get the following error in the event log:



Event Type: Error
Event Source: MSDTC
Event Category: Cluster
Event ID: 4394
Date: 12/28/2007
Time: 11:30:03 PM
User: N/A
Computer: NODE1
Description:
MS DTC's log information has not been configured correctly in the shared cluster registry. Error Specifics: d:tcomcomplusdtcsharedmtxclumtxclusetuphelper.cpp:557, Pid: 3652, CmdLine: C:WINDOWSsystem32msdtc.exe

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 05 40 00 80 .@.€


I have tried re-applying SP2 but it does not fix the issue. Does anyone have any idea how to fix this?

Below is the environment:


NODE1: Windows 2003 Enterprise Edition, SP2, 512MB RAM

NODE2: Windows 2003 Enterprise Edition, SP2, 512MB RAM

Both servers are hosted on Virtual Server 2005 R2

Share resources in the cluster are:
Quorum Disk is "Q:"

MSDTC Disk is "T:"

SQL Dist is "S:"

View 1 Replies View Related

SQL Server 2005 Fails While Installing On A Cluster.

Jan 23, 2006

I'm building an SQL Server 2005 cluster on a Windows 2003 cluster. Windows 2003 cluster and MSDTC service are all up and running properly. No problems there, but when I try to install SQL Server 2005 as a cluster service, it fails. The installation goes past the stage where it validates both the nodes and doesn't find any issue there, but when it tries to install fiels it fails. It fails on node 2. When I checked the scduled installer job it creates on node2 to install, the job never seems to run and fails. I'm using only one user account to setup windows cluster MSDTC and SQL Server. Now the complications: It is 64 bit Windows 2003 and SQL Server 2005. Also, the node 1 is built to be a domain controller as well.

Any help will be highly appreciated.

View 8 Replies View Related

ODBC Connection Fails From Cluster Node

May 22, 2007

I had a stand alone sql server that I upgraded to a cluster. I have an odbc connection called my_connection. The odbc test works fine. When I call the dsn from a php script it fails with this message:



Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][DBNETLIB
]SQL Server does not exist or access denied., SQL state 08001 in SQLConnect in D
:storage est.php on line 3
Could not connect to my_connection!



This same script works fine from any other computer. Is there an issue with connecting to a virtual server from the node via ODBC? Is there something I need to change in the client protocols?



Thanks in advance.

View 6 Replies View Related

SQL Cluster Setup Fails After Installing Service Pack 2

May 28, 2000

We have successfully been using MSCS with MSSQL7 (SP1) running under NT4 EE
(SP6a), installed in an active/active configuration using, two DELL
PowerEdge 6350 machines. Recently I installed MSSQL7 (SP2), I followed the
instructions that came with SP2, and unclustered the SQL nodes using the
Failover Cluster Wizard, and installed SP2, this was uneventful, and
appeared to install correctly. Next I tried to recluster the SQL nodes
using the Failover Cluster Wizard as directed. This failed with: "Could not
run setup on remote machine. SQL Cluster Setup failed." So I began the
usual research using the usual resources, and have found articles that
discusses this error, and the things to look for when it happens. I have
exhausted all suggestions without success. I appear to have everything
correctly configured. I have enabled Cluster Logging (level 3), following
are the two things I have found that indicate something is wrong:

1. In the SQL Error Log the following gets logged when I run the wizard:
"Attempting to initialize Distributed Transaction Coordinator."
"Failed to obtain TransactionDispenserInterface:
XACT_E_TMNOTAVAILABLE"

2. In the Cluster Log I see the following message repeatedly:
"[ClRtlCopySecurityDescriptor] MakeSelfRelativeSD failed,
0x00000551"

3. In the sqlclstr.log I see the following, without an indication of
which file is missing:
"[reghelp.h:235] : 2 (0x2): The system cannot find the file
specified."
"[clushelp.cpp:166] : 259 (0x103): No more data is available."
"[validate.cpp:147] DeleteTestGroup:OpenClusterResource: 5007
(0x138f): The cluster resource could not be found."
"~~~ XXX InstallRemote failed"

Does anyone have any ideas about what could be causing this problem?
Many thanks in advance.

Christpher Cutts
LifeMasters Supported SelfCare

View 1 Replies View Related

Verify Phase Fails On SQL Cluster On Win 2003 Server

Jul 23, 2005

I posted this to the ms sql clustering news group, but I thought I'dpost it here just in case someone here knew the answser. This problemhas had me baffled for 5 months, and I'm not seeing any supportarticles from Microsoft on it, yet. Anyone here got a clue?About 5 months ago, I posted a query to this group after experiencingfailures with my database maintenance plans (during the verify phase)that run on SQL Clusters on Windows 2003(http://groups-beta.google.com/group...9b?dmode=source)I was re-posting this in hopes that someone knows of a fix besidescoding a home-brew verify step in to the backup job to check the file'sintegrity?Thanks,TW

View 1 Replies View Related

SQL2005 Cluster Install Fails - Task Did Not Appear To Start On Machine

May 3, 2007

On a multi node Win2003 x64 R2.

When preforming install for 2nd SQL instance. Setup fails with log entries



Task did not appear to start on machine NODE2 : 267013

Task did not appear to start on machine NODE3 : 267013



Note: first install worked fine - after getting over MSDTC issues...

Also have confirm task scheduler service is running on all nodes.



Anyone with some insights?



Regards

View 3 Replies View Related

Power Pivot :: Cumulative Total For Current Week Days And Previous Week

Nov 30, 2015

We are trying to compare our current calendar week (based on Monday being the first day of the week) with the previous calendar week. 

I'm trying to produce a line chart with 2 axis:

- x axis; the day of the week (Mon, Tues, Wed etc - it is fine for this to be a # rather than text e.g. 1 = Mon, 2 = Tues etc)
- y axis; the cumulative number of orders 

The chart needs two series:

Previous Week. The running count of orders placed that week. 
Current Week. The running count of orders placed this week. 

Obviously in such a chart the 'Current Week' series is going not going to have values along the whole axis until the end of the week. This is expected and the aim of the chart is to see the current week compares against the previous week for the same day. 

I have two tables:

Orders TableCalendar Table

The calendar table's main date column is [calDate] and there are columns for the usual [calWeekNum], [calMonth] etc. 

My measure for counting orders is simply; # Orders: = countrows[orders].

How do I take this measure and then work out my two series. I have tried numerous things such as adapting TOTALMTD(), following articles such as these:

- [URL] ...
- [URL] ...

But I have had no luck. The standard cumulative formulas do work e.g. if I wanted a MTD or YTD table I would be ok, it's just adjusting to a WTD that is causing me big issues.

View 3 Replies View Related

SP2 Fails On Cluster - Domain Group Cannot Be Validated For The Service Full-Text Search

Jul 10, 2007

Greetings,

I'm totally stuck on this issue and would really appreciate any advice. Here's what's going on...

I'm trying to install SP2 on a SQL 2005 Std x64 cluster and all the components upgrade except the DB Engine, which fails with this error saying the domain group (not the service account) could not be validated for the full-text search service.

I've rebooted both nodes. I've verified that the domain group exists. I even removed the full text search component and I still get the same error.

I've reviewed this: http://support.microsoft.com/kb/915846
But the ftsgroup registry value mentioned does not exists. I assume it only shows up after sp2 is installed.

Interestingly, I couldn't uninstall full-text search unless I passed the FTSCLUSTERGROUP parameter to the setup.exe command line remove command.

The OS is Windows Server 2003 Ent x64 SP2. Not a domain controller. I'm upgrading from the RTM version of SQL Server.

I've posted the relevant parts of the summary and log files below.

Thanks in advance for any ideas!

- Chris

-------------------------------------

Summary.txt
==========

Product : Database Services (MSSQLSERVER)
Product Version (Previous): 1399
Product Version (Final) :
Status : Failure
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 28130
Error Description : MSP Error: 28130 A domain group is missing for one or more services. To install SQL Server 2005 as a failover cluster, domain groups must be specified for all the clustered services being installed .To proceed, enter the missing domain group information.
The domain group cannot be validated for the service Full-Text Search.



sqlrun_sql.msp.log
===================

<Func Name='GetServiceAccountProperty'>
<Func Name='GetServiceAccountProperty'>
<Func Name='GetServiceAccountProperty'>
Loaded DLL:
C:Program FilesMicrosoft SQL Server90Setup Bootstrapsqlsval.dll
Version:
2005.90.3042.0

Failed to validate group name for FTSCLUSTERGROUP. Error 87
Error Code: 0x80070057 (87)
Windows Error Text: The parameter is incorrect.
Source File Name: sqlcadomaingroupdialog.cpp
Compiler Timestamp: Sat Oct 7 09:43:40 2006
Function Name: validateSetDomainGroups
Source Line Number: 484

MSI (s) (A8!98) [12:17:17:610]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:610]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:610]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:626]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:626]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:626]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:626]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:626]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:626]: Note: 1: 2262 2: Error 3: -2147287038
Error Code: 87
MSI (s) (A8!98) [12:17:17:626]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:626]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:642]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:642]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:642]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:642]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:642]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:642]: Transforming table Error.
MSI (s) (A8!98) [12:17:17:642]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A8!98) [12:17:17:642]: Product: Microsoft SQL Server 2005 (64-bit) -- Error 28130. A domain group is missing for one or more services. To install SQL Server 2005 as a failover cluster, domain groups must be specified for all the clustered services being installed .To proceed, enter the missing domain group information.
The domain group cannot be validated for the service Full-Text Search.

Error 28130. A domain group is missing for one or more services. To install SQL Server 2005 as a failover cluster, domain groups must be specified for all the clustered services being installed .To proceed, enter the missing domain group information.
The domain group cannot be validated for the service Full-Text Search.
<EndFunc Name='LaunchFunction' Return='87' GetLastError='0'>
MSI (s) (A88) [12:17:17:642]: Transforming table InstallExecuteSequence.
MSI (s) (A88) [12:17:17:642]: Note: 1: 2262 2: InstallExecuteSequence 3: -2147287038
MSI (s) (A88) [12:17:17:658]: Transforming table InstallExecuteSequence.
MSI (s) (A88) [12:17:17:658]: Transforming table InstallExecuteSequence.
MSI (s) (A88) [12:17:17:658]: Note: 1: 2262 2: InstallExecuteSequence 3: -2147287038
MSI (s) (A88) [12:17:17:658]: Transforming table InstallExecuteSequence.
MSI (s) (A88) [12:17:17:658]: Note: 1: 2262 2: InstallExecuteSequence 3: -2147287038
MSI (s) (A88) [12:17:17:658]: Transforming table InstallExecuteSequence.
MSI (s) (A88) [12:17:17:658]: Note: 1: 2262 2: InstallExecuteSequence 3: -2147287038
Action ended 12:17:17: Validate_ServiceAccounts.3EA9D9BF_D9D2_4023_B2A7_9E2137B2FB1B. Return value 3.
Action ended 12:17:17: INSTALL. Return value 3.
Property(S): ProductCode = {26F1A218-3158-4107-B3A6-37FD61CEE969}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.2.3042.00

View 2 Replies View Related

SQL Server 2008 :: Get Week Ending Date Given Week Number

Apr 9, 2013

How can I get Saturday's date given the week number?

This is my week number, SELECT DATEPART(WEEK, DATEADD(MONTH, +3, ApptDt2)). I need to get Saturday's date from this week.

View 9 Replies View Related

T-SQL (SS2K8) :: Get Week Numbers From Dates - Saturday Being Start Of Week

Sep 17, 2015

i have the following table I need to select dates grouping them by weeks, my week start is Saturday to Friday

CREATE TABLE weekdays
(
datevalue datetime NOT NULL
, numericvalue INT NOT NULL
);
INSERT INTO weekdays (datevalue, numericvalue) VALUES

[code]....

The output should look like this

weeknototalvalue
362015-09-01 00:00:00.000
362015-09-02 00:00:00.000
372015-09-07 00:00:00.000
372015-09-08 00:00:00.000
382015-09-12 00:00:00.000
382015-09-13 00:00:00.000
382015-09-14 00:00:00.000
392015-09-19 00:00:00.000

View 4 Replies View Related

Create A Yesterday, This Week, Last Week Calculated Member

May 23, 2007

Hi all,

I'd like to add a yesterday dimension member to a new dimension, like a "Time Utility" dimension, that references the second last day of non empty data in a cube.

At the moment, I'm doing this:




Code Snippet

create member [MIA DW].[DATE TIME].[Date].[Yesterday]
as [DATE TIME].[Date].&[2007-01-01T00:00:00]

select [Measures].members on 0,
non empty [DATE TIME].[Date].members on 1
from [MIA DW]
But the [yesterday] member does not seem to belong to [DATE TIME].[Date].members?

So I guess there's two questions:

1) Can I have a new empty dimension which contains all these special members like "Yesterday" or "This Week" and "Last Week" (these last two obviously refer to a set of Dates)

2)How come the Yesterday member is not returned by the .members function?


Thanks

Greg

View 3 Replies View Related

How To Stop Week Hours To Continue To Next Week

Jan 29, 2014

I am adding week hrs using while loop , but it can continue next week hrs also.

I can get every week start hrs while update @tem1 table

employeeidreportdatereportatleftattoaccountwrhrn
12902014-01-29 00:00:00.00009:3019:1556001
12902014-01-28 00:00:00.00009:0018:4555802
12902014-01-27 00:00:00.00009:0018:455585583
12902014-01-25 00:00:00.00008:0010:0012004 -- week end
12902014-01-24 00:00:00.00009:1718:4554105
12902014-01-23 00:00:00.00009:1918:4654606
12902014-01-22 00:00:00.00009:1718:4754507
12902014-01-21 00:00:00.00009:1618:3552608
12902014-01-20 00:00:00.00009:1818:555435439

My loop statement

while(select MAX(wrh) from @tem1 where wrh = 0) < 1
begin
update @tem1
set wrh = (select toaccount from @tem1
where reportdate = (select min(reportdate) from @tem1 where wrh = 0))+(select max(wrh) from @tem1)
where wrh = (select max(wrh) from @tem1 where wrh = 0 )
and reportdate = (select min(reportdate) from @tem1 where wrh = 0)
end

this is the result while executing loop statement .

employeeidreportdatereportatleftatdehdrhwehwrh
129029 Jan 201409:3019:15008:0009:20024:00065:54
129028 Jan 201409:0018:45008:0009:18016:00056:34
129027 Jan 201409:0018:45008:0009:18008:0009:18
129025 Jan 201408:0010:00005:0002:00045:00047:16 -- week end
129024 Jan 201409:1718:45008:0009:01040:00045:16
129023 Jan 201409:1918:46008:0009:06032:00036:15
129022 Jan 201409:1718:47008:0009:05024:00027:09
129021 Jan 201409:1618:35008:0008:46016:00018:04
129020 Jan 201409:1818:55008:0009:03008:0009:03

How to update only that week hrs , don't continue next week...

View 4 Replies View Related

How To Get Data Untill Last Week From The First Week Of The Year

Apr 29, 2008

In my reports I am extracting the data of number of people joined in all the weeks of the year. And in one of reports I have to extract the data of the number of people joined until the last week from the first week. I am trying out all the logics but nothing is working for me as such. Can any one help me with this issue??????

View 4 Replies View Related

Transact SQL :: Start Week Of The Month For A Given Week

Jul 23, 2015

I need a Select sentence that return me the first week of the month for a given week.

For example If I have week number 12 (Begins 2015/03/16 and Ends 2015/03/22) I need that returns 9, I mean Week number 9 wich is the first week of march (having in mind @@DATEFIRST).

I only need give a week number of the year and then returns the week number of the first week of that month.

View 34 Replies View Related

Convert Week Number To Date Of 1st Day Of That Week...

Feb 2, 2008



I'm looking for a way to convert the [week number, year] back to the date for the 1st day of that week.

Example (assuming DATEFIRST has been set to 1) : Week 3, 2008 = January 14, 2008

Is there a SQL function that will do this?


Thanks,
Mike

View 11 Replies View Related

Date Of First Day Of Week For Current Week

Jun 6, 2006

seriously now

View 1 Replies View Related

Convert Getdate To Week And Day Of Week

Aug 15, 2006

I have a query that run every day to update a summary table which has week number and day of week. what I currently do is delete all records from the summary table and then summarize all the data availabe from four tables adn then populate the table daily. I want to know if I can run the update query to run only for the week number and day of week depending on getdate. Can I do this?

Please help..

View 1 Replies View Related

ISO Year Week Day Of Week Function

Jan 18, 2006

Function F_ISO_YEAR_WEEK_DAY_OF_WEEK returns the ISO 8601 Year Week Day of Week in format YYYY-W01-D for the date passed. W01 represents the week of the year from W01 through W53, and D represents the day of the week with 1 = Monday through 7 = Sunday.

The first week of each year starts on the first Monday on or before January 4 of that year, so that the year begins from December 28 of the prior year through January 4 of the current year.

This code creates the function and demos it for the first day, first date+60, and first date+364 for each ISO week/year from 1990 to 2030.


drop function dbo.F_ISO_YEAR_WEEK_DAY_OF_WEEK
GO
create function dbo.F_ISO_YEAR_WEEK_DAY_OF_WEEK
(
@Datedatetime
)
returnsvarchar(10)
as
/*
Function F_ISO_YEAR_WEEK_DAY_OF_WEEK
returns the ISO 8601 Year Week Day of Week
in format YYYY-W01-D for the date passed.
*/
begin

declare @YearWeekDayOfWeekvarchar(10)

Select
--Format to form YYYY-W01-D
@YearWeekDayOfWeek =
convert(varchar(4),year(dateadd(dd,7,a.YearStart)))+'-W'+
right('00'+convert(varchar(2),(datediff(dd,a.YearStart,@Date)/7)+1),2) +
'-'+convert(varchar(1),(datediff(dd,a.YearStart,@Date)%7)+1)
from
(
select
YearStart =
-- Case finds start of year
case
whenNextYrStart <= @date
thenNextYrStart
whenCurrYrStart <= @date
thenCurrYrStart
elsePriorYrStart
end
from
(
select
-- First day of first week of prior year
PriorYrStart =
dateadd(dd,(datediff(dd,-53690,dateadd(yy,-1,aaa.Jan4))/7)*7,-53690),
-- First day of first week of current year
CurrYrStart =
dateadd(dd,(datediff(dd,-53690,aaa.Jan4)/7)*7,-53690),
-- First day of first week of next year
NextYrStart =
dateadd(dd,(datediff(dd,-53690,dateadd(yy,1,aaa.Jan4))/7)*7,-53690)
from
(
select
--Find Jan 4 for the year of the input date
Jan4=
dateadd(dd,3,dateadd(yy,datediff(yy,0,@date),0))
) aaa
) aa
) a

return @YearWeekDayOfWeek

end
go


-- Execute function on first day, first day+60,
-- and first day+364 for years from 1990 to 2030.

select
DT= convert(varchar(10),DT,121),
YR_START_DT =
dbo.F_ISO_YEAR_WEEK_DAY_OF_WEEK(a.DT),
YR_START_DT_60 =
dbo.F_ISO_YEAR_WEEK_DAY_OF_WEEK(a.DT+60),
YR_START_DT_365 =
dbo.F_ISO_YEAR_WEEK_DAY_OF_WEEK(a.DT+364)
from
(
select DT = getdate()union all
select DT = convert(datetime,'1990/01/01') union all
select DT = convert(datetime,'1990/12/31') union all
select DT = convert(datetime,'1991/12/30') union all
select DT = convert(datetime,'1993/01/04') union all
select DT = convert(datetime,'1994/01/03') union all
select DT = convert(datetime,'1995/01/02') union all
select DT = convert(datetime,'1996/01/01') union all
select DT = convert(datetime,'1996/12/30') union all
select DT = convert(datetime,'1997/12/29') union all
select DT = convert(datetime,'1999/01/04') union all
select DT = convert(datetime,'2000/01/03') union all
select DT = convert(datetime,'2001/01/01') union all
select DT = convert(datetime,'2001/12/31') union all
select DT = convert(datetime,'2002/12/30') union all
select DT = convert(datetime,'2003/12/29') union all
select DT = convert(datetime,'2005/01/03') union all
select DT = convert(datetime,'2006/01/02') union all
select DT = convert(datetime,'2007/01/01') union all
select DT = convert(datetime,'2007/12/31') union all
select DT = convert(datetime,'2008/12/29') union all
select DT = convert(datetime,'2010/01/04') union all
select DT = convert(datetime,'2011/01/03') union all
select DT = convert(datetime,'2012/01/02') union all
select DT = convert(datetime,'2012/12/31') union all
select DT = convert(datetime,'2013/12/30') union all
select DT = convert(datetime,'2014/12/29') union all
select DT = convert(datetime,'2016/01/04') union all
select DT = convert(datetime,'2017/01/02') union all
select DT = convert(datetime,'2018/01/01') union all
select DT = convert(datetime,'2018/12/31') union all
select DT = convert(datetime,'2019/12/30') union all
select DT = convert(datetime,'2021/01/04') union all
select DT = convert(datetime,'2022/01/03') union all
select DT = convert(datetime,'2023/01/02') union all
select DT = convert(datetime,'2024/01/01') union all
select DT = convert(datetime,'2024/12/30') union all
select DT = convert(datetime,'2025/12/29') union all
select DT = convert(datetime,'2027/01/04') union all
select DT = convert(datetime,'2028/01/03') union all
select DT = convert(datetime,'2029/01/01') union all
select DT = convert(datetime,'2029/12/31') union all
select DT = convert(datetime,'2030/12/30')
) a


Function Test Results:

DT YR_START_DT YR_START_DT_60 YR_START_DT_364
---------- ----------- -------------- ---------------
2006-01-18 2006-W03-3 2006-W11-7 2007-W03-3
1990-01-01 1990-W01-1 1990-W09-5 1991-W01-1
1990-12-31 1991-W01-1 1991-W09-5 1992-W01-1
1991-12-30 1992-W01-1 1992-W09-5 1992-W53-1
1993-01-04 1993-W01-1 1993-W09-5 1994-W01-1
1994-01-03 1994-W01-1 1994-W09-5 1995-W01-1
1995-01-02 1995-W01-1 1995-W09-5 1996-W01-1
1996-01-01 1996-W01-1 1996-W09-5 1997-W01-1
1996-12-30 1997-W01-1 1997-W09-5 1998-W01-1
1997-12-29 1998-W01-1 1998-W09-5 1998-W53-1
1999-01-04 1999-W01-1 1999-W09-5 2000-W01-1
2000-01-03 2000-W01-1 2000-W09-5 2001-W01-1
2001-01-01 2001-W01-1 2001-W09-5 2002-W01-1
2001-12-31 2002-W01-1 2002-W09-5 2003-W01-1
2002-12-30 2003-W01-1 2003-W09-5 2004-W01-1
2003-12-29 2004-W01-1 2004-W09-5 2004-W53-1
2005-01-03 2005-W01-1 2005-W09-5 2006-W01-1
2006-01-02 2006-W01-1 2006-W09-5 2007-W01-1
2007-01-01 2007-W01-1 2007-W09-5 2008-W01-1
2007-12-31 2008-W01-1 2008-W09-5 2009-W01-1
2008-12-29 2009-W01-1 2009-W09-5 2009-W53-1
2010-01-04 2010-W01-1 2010-W09-5 2011-W01-1
2011-01-03 2011-W01-1 2011-W09-5 2012-W01-1
2012-01-02 2012-W01-1 2012-W09-5 2013-W01-1
2012-12-31 2013-W01-1 2013-W09-5 2014-W01-1
2013-12-30 2014-W01-1 2014-W09-5 2015-W01-1
2014-12-29 2015-W01-1 2015-W09-5 2015-W53-1
2016-01-04 2016-W01-1 2016-W09-5 2017-W01-1
2017-01-02 2017-W01-1 2017-W09-5 2018-W01-1
2018-01-01 2018-W01-1 2018-W09-5 2019-W01-1
2018-12-31 2019-W01-1 2019-W09-5 2020-W01-1
2019-12-30 2020-W01-1 2020-W09-5 2020-W53-1
2021-01-04 2021-W01-1 2021-W09-5 2022-W01-1
2022-01-03 2022-W01-1 2022-W09-5 2023-W01-1
2023-01-02 2023-W01-1 2023-W09-5 2024-W01-1
2024-01-01 2024-W01-1 2024-W09-5 2025-W01-1
2024-12-30 2025-W01-1 2025-W09-5 2026-W01-1
2025-12-29 2026-W01-1 2026-W09-5 2026-W53-1
2027-01-04 2027-W01-1 2027-W09-5 2028-W01-1
2028-01-03 2028-W01-1 2028-W09-5 2029-W01-1
2029-01-01 2029-W01-1 2029-W09-5 2030-W01-1
2029-12-31 2030-W01-1 2030-W09-5 2031-W01-1
2030-12-30 2031-W01-1 2031-W09-5 2032-W01-1

(43 row(s) affected)




CODO ERGO SUM

View 2 Replies View Related

Recovery :: Server Cluster Resource Fails To Come Online And Pending Online State

Nov 3, 2015

We have SQL cluster installed on top of windows cluster on VM environment. Node1 and Node2 under Windows Failover Cluster. SQL instance is currently on node2 the instance is up and running, but SQL Cluster service remains online pending and it restarts the instance on every 5 minutes.

SQL Browser service are running successfully.TCP/IP ports are enabled and configured.If we start the SQL server agent it is on for seconds and stopped immediately  .Cluster Service is attempt to connect to the SQL service every few minutes (setting in SQL cluster resource) for the IsAlive check, if this fails then the SQL resource is restarted even if the instance was online. Hope this is what happening exactly.

[sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].  (268435455)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [HYT00] [Microsoft][SQL Server Native Client 11.0]Login timeout expired (0)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server

Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books

Online. (268435455)
00001024.00053314::2015/10/30-19:57:50.772 INFO  [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] Could not connect to SQL Server (rc -1

View 5 Replies View Related

How To Get Starting Datetime(monday) Of The Week And Ending Datetime Of The Week(sunday)

May 2, 2007

hi friends,



how to get the date of the first/last day of the week in sql...

can any one help me





Cheers,

raj

View 5 Replies View Related

Setup And Upgrade :: Cluster Installation Failed On Adding Node To Cluster

Oct 10, 2015

During the installation of Adding node to a SQL Server failover cluster(On passive node) getting error like.. The MOF compiler could not connect with the WMI server. This is either because of a semantic error such as an incompatibility with the existing WMI repository or an actual error such as the failure of the WMI server to start.We  run the below commands but didn’t get any resolution & got the same above error .
 
1<sup>st</sup> Method…

1. Open console command (Run->CMD with administrator privileges). 

2. net stop winmgmt 

3. Rename folder %windir%System32WbemRepository to other one, for backup purposes (for example _Repository). 

4. net start winmgmt

2<sup>nd</sup> Method..

1. Disable and stop the WMI service.

a) Command : - sc config winmgmt start= disabled

b. Command : -                 net stop winmgmt

2. Run the following commands.

a).  Command:  Winmgmt /salvagerepository %windir%System32wbem

b). Command:   Winmgmt /resetrepository %windir%System32wbem

3. Re-enable the WMI service

Command:          sc config winmgmt start= auto 

Last command to run after above steps

4. Command:     mofcomp "%programfiles(x86)%Microsoft SQL Server100Sharedsqlmgmproviderxpsp2up.mof"

File not found Error for above command.

View 3 Replies View Related

Access Denied To Cluster Storage When Restoring 2005 Full Text DB To 2014 Cluster

Jun 10, 2015

I am in the process of moving databases from a SQL 2005 Standard version to a 2-node 2014 cluster.All of my 2005 databases back up successfully.They all restore without issue except for one database that has a full text catalog. I get this message

Msg 7610, Level 16, State 1, Line 2
Access is denied to "fileStoragedataMSSQLSERVERFullTextCatalog", or the path is invalid.
Msg 3156, Level 16, State 50, Line 2
File 'sysft_FTCatalog' cannot be restored to 'fileStoragedataMSSQLSERVERFullTextCatalog'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 2
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.

[code]....

I went as far as giving the folder full access to everyone temporarily and received the same error.

View 1 Replies View Related

SQL 2012 :: Advanced Cluster Preparation For New Instance On Existing Cluster

Apr 10, 2014

I ran the Advanced cluster preparation for a new sql instance on an existing cluster.

Slq Server 2012.

After is completed, it was successful, I realized I specified the wrong Instance Root directory.

Is it possible to remove what the preparation installed? Or is it possible to change the root directory?

View 3 Replies View Related

Setup And Upgrade :: Can Build Cluster By Adding Cluster Service

Jul 6, 2015

Can I build a cluster by adding the cluster service, then the SQL instances, then add the other nodes and their passive SQL instances?I would lean to building the cluster first, the add the SQL instances.

View 4 Replies View Related

SQL 2012 :: Server Cluster Without Windows Failover Cluster

Feb 18, 2014

I´ve been reading that SQL Server 2012 Always On is dependent on having a Windows Failover Cluster setup. Is that correct ?

View 6 Replies View Related

T-SQL (SS2K8) :: Convert Non-cluster Primary Key To Cluster Unique

Nov 6, 2014

I have following script which i am planning to run to drop all non-clustered primary keys on a database and then created as clustered. I am using someone else's script so don't know how to modify this. Some of primary key columns are used in references in other tables.

is there anyway i can drop the existing primary keys and using their original script then create again as clustered including restoring all foreign and reference keys and unique or no unique.

DECLARE @table NVARCHAR(512), @tablename NVARCHAR(512),
@sql NVARCHAR(MAX), @sql2 NVARCHAR(MAX), @sql3 NVARCHAR(MAX),
@column NVARCHAR(MAX);
DECLARE @indexname NVARCHAR(512);
SELECT name As 'Table'

[Code] ....

View 8 Replies View Related

Recovery :: Can Join A Node In Windows Cluster Which Is Already In Different Cluster

Oct 8, 2015

can we join a node in a windows cluster which is already in a different cluster?

We have this requirement as we need to setup readable secondary ( always on AG) on the third node.

View 2 Replies View Related







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