The Compatibility level is set to 100. We've not tried 80...
We do seem to have resolved the issue, the server now has 8Gb, rather than 4Gb. The 2000 server had 4Gb.
One query that took hours on 2008, but down to seconds once we added the 8Gb was:
OpeningBalance = z.OpeningBalance
, ClosingBalance = z.ClosingBalance
, AvgBalance = z.AvgBalance
from outMortgageAsset b
GroupID = a.GroupID
, MonthDate = k.MonthDate
, OpeningBalance = sum(k.OpeningBalance)
, ClosingBalance = sum(k.ClosingBalance)
, AvgBalance = sum(k.AvgBalance)
from EIRGroupAccountsToBeTotaled a
monthdate = b.ForecastMonth
, accountid = b.AccountID
, OpeningBalance = isnull(b.CurrentBalance, 0.0)
, ClosingBalance = isnull(c.CurrentBalance, 0.0)
, AvgBalance = (isnull(c.CurrentBalance, 0.0)
+ isnull(b.CurrentBalance, 0.0)) / 2.00000000from EIRAccountBalancePerPeriod b
leftjoin EIRAccountBalancePerPeriod c
on b.ForecastMonth = c.ForecastMonth - 1and c.AccountID = b.AccountID
ForecastMonth - 1
, OpeningBalance = 0
, ClosingBalance = isnull(CurrentBalance, 0.0)
, AvgBalance = (CurrentBalance) / 2.00000000from EIRAccountBalancePerPeriod a
where ForecastMonth =
from EIRAccountBalancePerPeriod z
where z.AccountID = a.AccountID
on a.accountid = k.accountid
groupby a.GroupID, k.MonthDate
on b.GroupID = z.GroupID
and fm = z.MonthDate
The row counts for the tables: outMortgageAsset: 1148 EIRGroupAccountsToBeTotaled: 1499860, Clustered Index on GroupID, AccountID EIRAccountBalancePerPeriod: 14347829, Non-Clustered on MonthDate, ForcastMonth, AccountID
So after you added the additional memory, the query executed faster?
What OS is the SQL 2008 Server running vs the SQL 2000 Server? (64 vs 32 bit?)
I'm thinking that the SQL 2008 server OS was struggling with memory; causing poor performance.
Does the system seem to be operating better with the 8GB of memory? It may have been just a memory issue. (Seems like Microsoft OS and Applicaitons need more and more memory with each new release. But memory is cheap these days ...)
Might have found something, a high number of CXPACKET waits. We've set the MAXDOP to 1 to see if we now get consistent performance, if we're lucky it will consistent performance that matches the old server...
I not have Connection String for Ms access 2010 to Windows 7 64 Bit there find an error on "provider=Microsoft.Jet.OLEDB.4.0" is The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
We have a web application using SQL Server 2008 R2 that contains data for tracking time that another company has expressed interest in using, we initially set up the database such that all end-user tables have a foreign key to what company that row belongs to. Is there a good way to backup/restore the data for a specific company across the tables, such that if the new company says tomorrow that they want their data restored to yesterday; it can be restored without impacting all the other companies data as well? I'm trying to avoid writing some form of stored procedure that selects and then have to do an insert/update/delete to put the data back. Thanks for any insight.
Is it possible to supply a separate environment for their needs. Or are they really trying to reset their production environment back to a prior date.
We often have a need for a department to want a restore of a previous date for reporting/investigation reasons, this does not need to impact on the production environment as they get another database environment created specifically for their needs.
Never underestimate the power of human stupidity RAH
This is more for a restore after they do something dumb ... like "I just deleted all the invoices for customer A when I meant B; can you get them back?" My answer would be I can put your data back to 3am last night, you'll loose everything you did today but your invoices will be back.
Ugh, nasty, especially when you mix other clients into the data, I would suggest this could only be fixed by a custom script, charge them a fortune as a lesson and hope like hell you can deliver.
I would then implement a logging/audit strategy on the database or separate each client to their own environment. If you screw up another clients data b/c of this issue your whole business case just went out the window!
Never underestimate the power of human stupidity RAH
Hi I am trying to execute this query but its giving me an error
"Cannot find either column "D" or the user-defined function or aggregate "D.bonus", or the name is ambiguous. " Query:
MERGE INTO bonuses D USING bonuses1 E ON D.employee_id = S.employee_id) WHEN MATCHED THEN UPDATE SET D.bonus = E.bonus WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus) VALUES ES.employee_id, E.salary*0.1) WHERE (E.salary <= 8000);
UPDATE bonuses Set bonus=10000 FROM bonuses D JOIN cbonuses1 E ON D.employee_id = S.employee_id)
There is no inbuilt-mechanism to restore or read deleted rows in SQL Server 2000. You must implement logical deletes instead of physical deletes to be able to achieve that. (For example, an IsDeleted(bit) column in every table).
As Eddy suggested, the only other ways is to work on a restored copy of the database.
Hi World! what is the Windows Run Command for "SQLDataRoot" OR "SQLPath" for exp: %program files% --->open Program files.
i wanna something the open the : c:\Program Files\SqlServer 2005 for DWebPro\MSSQL.1\MSSQL
in other word i need this path to give to my setup to copy the database to the data path of that instance is installed. i know the instance name also but i cannot give the exact path.cause if sql server was installed in that machine there should be "MSSQL.1" and now it should change to : c:\Program Files\SqlServer 2005 for DWebPro\MSSQL.2\MSSQL
So if i can give it something like %MSSQL$% it will solve the problem.