Ran into a case this week when a business superuser could not change other users' passwords. I checked and the superuser had the securityadmin role. Basically after sleuthing around, I came to the conclusion that the issue is caused by incompatible service pack levels between the database server (which is at SQL Server 2005 SP3) and the business superuser who had recently had to reinstall management studio (but installed a non SP version of the client).
This is not the first time something strange happens when using a lower service pack client against a higher service pack server. I've ran into weird maintenance plan issues before with this scenario...
I just wish Microsoft can just warn users when connecting to a higher service pack SQL Server to help track down issues or to remind to update management studio clients.
A personal knowledgebase to document all the issues solved throughout my work and consulting projects, and hopefully help others who find themselves with the same issues.
Tags I am associated with:
Tags I am associated with: Microsoft SQL Server, IBM Cognos BI and Planning, Deltek Costpoint, Deltek Time & Expense, Magento, Intuit QuickBooks, Visual Basic 6, SSIS, Oracle, SQL development, data warehouse, reporting, eCommerce, accounting, finance, ETL
Saturday, August 6, 2011
Wednesday, August 3, 2011
coalesce() function translated to case expression in SQL Server ?
Error message in SQL Server Management Studio:
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 125, Level 15, State 4, Line 1
Case expressions may only be nested to level 10.
I just wanted to note this down before I forget... a couple of weeks ago I was deploying a view to a test environment and had to re-point the table source to a linked server and received this message.
the original view was something like this (simplified):
select *
from t
where coalesce(a,b,c,d,e,f,g,h,i,j,k,l) is not null
the above worked when t is on same server.
after pointing t to linked server:
select *
from.dbT.dbo.t
where coalesce(a,b,c,d,e,f,g,h,i,j,k,l) is not null
I got the error msg:
Case expressions may only be nested to level 10.
Apparently, SQL Server translates the coalesce function internally to nested case expressions and ran into some limitations via the linked server interface.
To work around the issue, I rewrote the coalesce function to OR expressions like:
select *
from.dbT.dbo.t
where
(a is not null
or b is not null
or c is not null
or d is not null
.
.
.
or l is not null)
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 125, Level 15, State 4, Line 1
Case expressions may only be nested to level 10.
I just wanted to note this down before I forget... a couple of weeks ago I was deploying a view to a test environment and had to re-point the table source to a linked server and received this message.
the original view was something like this (simplified):
select *
from t
where coalesce(a,b,c,d,e,f,g,h,i,j,k,l) is not null
the above worked when t is on same server.
after pointing t to linked server:
select *
from
where coalesce(a,b,c,d,e,f,g,h,i,j,k,l) is not null
I got the error msg:
Case expressions may only be nested to level 10.
Apparently, SQL Server translates the coalesce function internally to nested case expressions and ran into some limitations via the linked server interface.
To work around the issue, I rewrote the coalesce function to OR expressions like:
select *
from
where
(a is not null
or b is not null
or c is not null
or d is not null
.
.
.
or l is not null)
Thursday, July 28, 2011
Annoying SQL Server 2008 Management Studio message saving changes is not permitted
Have you tried to edit a table design in 2008 and got this message?
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
quick google search got me to this page
which shows the solution to go Tools menu -> Options -> Designers -> and uncheck "Prevent saving changes that require table re-creation"
The only thing to note here is that, if you have a slow system, these type of DDL changes may cause the GUI to not respond quickly.
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
quick google search got me to this page
which shows the solution to go Tools menu -> Options -> Designers -> and uncheck "Prevent saving changes that require table re-creation"
The only thing to note here is that, if you have a slow system, these type of DDL changes may cause the GUI to not respond quickly.
Saturday, July 23, 2011
Deltek Time & Expense partial timesheet start week for rehires
Applies to Time & Expense 8.2.1 and possibly other versions sync'ed to Costpoint.
We ran into a scenario where a rehired employee started on a Wednesday and was not able to submit timesheet for a partial week (24 hrs).
The issue is that T&E does not have a field for rehire date even though there were 2 employee history records (1 with orig start date and 1 with rehired start date), so it uses the original hire date, thinking the Monday and Tuesday are valid days too.
The workaround is to set the hire date in T&E to the new rehire date and have employee submit timesheet before Costpoint export/T&E import will rewrite that field with original hire date.
We ran into a scenario where a rehired employee started on a Wednesday and was not able to submit timesheet for a partial week (24 hrs).
The issue is that T&E does not have a field for rehire date even though there were 2 employee history records (1 with orig start date and 1 with rehired start date), so it uses the original hire date, thinking the Monday and Tuesday are valid days too.
The workaround is to set the hire date in T&E to the new rehire date and have employee submit timesheet before Costpoint export/T&E import will rewrite that field with original hire date.
Wednesday, July 20, 2011
Windows 7 batch script behavior difference vs. XP
One of my clients is in midst of migrating a few reporting applications over from XP to Windows 7 and called me to assist in looking at an issue where they could not register some dll components.
I took a look at the Windows batch file and it contained lines like:
When I launched the script, it complained about access denied, so I right-clicked the script and ran it as administrator. But running as administrator, it complained it cannot find the xxx.dll.
That's when I noticed the execution directory became c:\windows\system32 when I executed the script as administrator, even thought the script was located in another drive letter and path.
The solution was to update the batch file as follows:
and then run it as administrator.
I took a look at the Windows batch file and it contained lines like:
copy xxx.dll "%WINDIR%\System32"
regsvr32 xxx.dllWhen I launched the script, it complained about access denied, so I right-clicked the script and ran it as administrator. But running as administrator, it complained it cannot find the xxx.dll.
That's when I noticed the execution directory became c:\windows\system32 when I executed the script as administrator, even thought the script was located in another drive letter and path.
The solution was to update the batch file as follows:
copy <path>\xxx.dll "%WINDIR%\System32"
regsvr32 xxx.dlland then run it as administrator.
Monday, July 18, 2011
Deltek Software Manager does not correctly download files
I started planning for our Time & Expense upgrade to 8.3 today and used Deltek Software Manager to download more than 2GB of installation files and documentation. After a couple of hours, it reported the download was finished. But one of the zip files was corrupt.
I had to click on view and pick the menu item to show already downloaded software and re-download the zip file again. This time, the file size was 700MB for that particular zip file vs 100MB.
I had to click on view and pick the menu item to show already downloaded software and re-download the zip file again. This time, the file size was 700MB for that particular zip file vs 100MB.
Sunday, July 17, 2011
Magento 1.5.1.0 fix for USPS shipping
Background: finally got the production url from USPS so I can update the configuration in Magento.
First issue: USPS email sent to me said to use URL: http://production.shippingapis.com
Resolution: I had to add the dll name at the end to make it work http://production.shippingapis.com/ShippingAPI.dll
Second issue: Only library mail shows up as a USPS shipping method.
This is caused by USPS renaming the shipping method names and also possibly by Magento core developers who relied on the shipping names instead of some type of unique id's.
I read thru many posting on the web regarding fixes... I had to end up using a combination of the 2 different solutions to make mine setup work.
Resolution:
First issue: USPS email sent to me said to use URL: http://production.shippingapis.com
Resolution: I had to add the dll name at the end to make it work http://production.shippingapis.com/ShippingAPI.dll
Second issue: Only library mail shows up as a USPS shipping method.
This is caused by USPS renaming the shipping method names and also possibly by Magento core developers who relied on the shipping names instead of some type of unique id's.
I read thru many posting on the web regarding fixes... I had to end up using a combination of the 2 different solutions to make mine setup work.
Resolution:
- Copy Usps.php from app/code/core/Mage/Usa/Model/Shipping/Carrier/
to app/code/local/Mage/Usa/Model/Shipping/Carrier/ - Edit the new Usps.php file in app/code/local/.....
- Find
if (is_object($xml->Package) && is_object($xml->Package->Postage)) {
foreach ($xml->Package->Postage as $postage) {
and Replace with
if (is_object($xml->Package) && is_object($xml->Package->Postage)) {
foreach ($xml->Package->Postage as $postage) {
$postage->MailService = str_replace('®', '', strip_tags(htmlspecialchars_decode(htmlspecialchars_decode((string)$postage->MailService))));- then Find
if (is_object($xml->Package) && is_object($xml->Package->Service)) {
foreach ($xml->Package->Service as $service) {
and Replace with
if (is_object($xml->Package) && is_object($xml->Package->Service)) {
foreach ($xml->Package->Service as $service) {
$service->SvcDescription = str_replace('®', '', strip_tags(htmlspecialchars_decode(htmlspecialchars_decode((string)$service->SvcDescription))));
I had to restart my Zend Server and clear its cache to take in the new code in local folder - then Find
Subscribe to:
Posts (Atom)