Blog Home  Home RSS 2.0 Atom 1.0 CDF  
some thoughts... - January, 2007
IT makes the world go round - and sometimes stops it...
 
 Wednesday, January 31, 2007

If you need to fill up a string to a defined total count you will be glad if you have a function like this:

CREATE FUNCTION fn_filler(@txt varchar(max)='',@before bit=1,@fill char(1)='0',@len int)

RETURNS varchar(max)
AS
BEGIN
    declare @anz as int
    if @txt is null
        set @txt=''
    set @anz=@len-len(@txt)

    if (@anz>0 )
        if (@before=1)
            set @txt=replace(space(@anz),' ',@fill)+@txt
        else
            set @txt=@txt+replace(space(@anz),' ',@fill)

    return @txt

END

Wednesday, January 31, 2007 10:51:35 AM (Mitteleuropäische Zeit, UTC+01:00)  #     Author:Markus Fischer   Comments [0]   |   | 

Do you need the last day of a month in a SQL Statement?

Here we go:

CREATE FUNCTION fn_LastDayOfMonth(@dat as datetime)

RETURNS smallint
AS
BEGIN
    declare @ret as smallint
    declare @mon as smallint

    declare @dat2 as datetime
    set @dat2=cast(year(@dat) as varchar(4))+right('0'+cast(month(@dat) as varchar(2)),2)+'01'
    set @dat2=dateadd(month,1,@dat2)
    set @dat2=DATEADD(day, -1,@dat2)
    set @ret=day(@dat2)
    return @ret

END

And if you need a complete date this would be an alternative:

CREATE FUNCTION [dbo].[fn_LastDayOfMonth](@dat as datetime)

RETURNS char(8)
AS
BEGIN
    declare @ret as char(8)
    declare @mon as smallint

    declare @dat2 as datetime
    set @dat2=cast(year(@dat) as varchar(4))+right('0'+cast(month(@dat) as varchar(2)),2)+'01'
    set @dat2=dateadd(month,1,@dat2)
    set @dat2=DATEADD(day, -1,@dat2)
    set @ret=right('0'+cast(day(@dat2) as varchar(2)),2)+right('0'+cast(month(@dat) as varchar(2)),2)+cast(year(@dat) as varchar(4)) 
    return @ret

END

Wednesday, January 31, 2007 10:46:00 AM (Mitteleuropäische Zeit, UTC+01:00)  #     Author:Markus Fischer   Comments [0]   |   | 
 Tuesday, January 30, 2007

I have encountered a system error deploying a SSAS project when I changed the deployment from my deployment server to a new production server. As you can imagine, the common case that really could bring you made is when you successfully deploy a project into a development server but you fail to deploy the same database into a production server and the error message is too generic and it hides the real cause of the problem that is very hard to find:


I looked for the error in the connection strings, I guess network or Active Directory problems...but every change attempt fails with the same error message: "Systemerror: ."

The solution was a problem with a role that references a membership of a local user of my development server, that fails because the role member name can't be resolved by SSAS production server. Thanks to microsoft for the great translation from "Can't deploy role xyz..." to "Systemerror: ."  ;-)

 

Tuesday, January 30, 2007 11:34:45 PM (Mitteleuropäische Zeit, UTC+01:00)  #     Author:Klaus Hoeltgen   Comments [0]   |  |   | 
 Thursday, January 04, 2007

I used the free time after Christmas to install Windows Vista Ultimate and Office 2007 - instead of doing an upgrade of my current Windows XP system I choosed to do complete new installation...

I succeeded in a short time, but afterwards I had some trouble and therefore I had to solve some issues...

1. Join your domain as soon as possible - but pay attention!

The first step you should do after installation is to join your domain - if you have one.

But please pay attention if you use Small Business Server mechanisms - or any other - to deploy software to your clients. I had a configuration which tried to install IE6 and other tools from the server to the client after joining the network. There just pops up a question if you really want to execute the setup and being a "creature of habit" I just clicked "Yes".

This seems to have wrecked my installation, because afterwards Vista decided to start without a taskbar, explorer and elements on the desktop...
So I installed it a second time...
:-)

2. systemvendor-specific software

I am using an IBM R50 laptop, which brings up some vendor-specific software like powermanagement utilities, Network access and so on.

Do yourself a favor and keep a cable for Internet access ready after installation and do not panic if you have got a kind of incomplete system after a successful installation.

Therefor the second step you should do afterwards is to start the windows update and download all vendor-specific software the system will offer you. That brought back power management and WLAN also, but some other tools are still missing (like the display control to switch to a beamer) and are not allowed to install on Vista.

3. Security and UAC (User account control)

I bet, that the new feature UAC (User Account Control) will be a pain in your neck - especially during the first hours doing all installations you need. Everytime you start a setup you will be faced with "Do you really want to?", everytime you will be alerted "a program tries to..."...

As described in the article above it really gets annoying and also brings up some risks like clicking every OK you will face without reading carefully, but if you want to be secure you can not have everything. That UAC could give you a hint for investigating for Trojans and others is proofed with this blog-entry

If you are interested in digging deeper into Windows security, read Windows Vista Security blog or UAC blog.

4. Installation of SQL 2005

I you want to install SQL 2005 on your Vista client you will have to fulfil some prerequisites, especially enabling the IIS and doing some configuration, as described in KB article 920201. But even if you do this it is not guaranteed that Reporting Services will run as described in the comments of James Kovacs' posting.
Further tips and known issues are described in Microsoft SQL Server 2005 on "Microsoft Windows Server Longhorn" or Microsoft Windows Vista.

We will have to wait for the official version of SP2 and see what it brings - I hope it will work!

5. OWA with IE7 and Vista

I am using OWA to access my exchange server and I did do this also using IE7 and Windows XP.
Windows Vista seems to have a slightly other IE7, which handles ActiveX-controls - even the one form Microsoft - a little bit stricter. Using OWA I was able to read messages, but I could not answer to a message´, because the input frame just displayed a red X...

There are two KB articles - 911829 and 924334- and also two downloads which will solve this problem.

6. 3G data card for PCMCIA-Slot

I am using a Novatel Merlin™ U740 Wireless PC Card to connect via 3G to the Internet and my German provider is Vodafone.

In Germany it is very common that providers will deliver a specific software with there own branding to assure that you will have an easy installation and access, the Vodafone software is called "Dashboard" and the current downloadable version is 7.04.

Due to the Vista restrictions you will not be able to install the software and there you neither get the drivers nor the software to communicate with your data card.

So I allowed myself to call the business hotline to ask for a new version of the dashboard to enable the data card using Vista.
The answer was that there is no specific time schedule which is public but that there will be a good chance that the software will be presented at the CeBit and available afterwards...
Presented? This software is just a little tool to enable and control the connection and not the ultimate version of a hype-whatever software suite!
And CeBit? This fair will be in the mid of March! Should I wait about three months to enable my data card?
Common, I understand that the software has to be tested and certified also and that this could be time consuming but to be honest... Is Windows Vista really such an unexpected and uncommon OS??

So I called not only one time but twice, because the first answer was not very satisfying...
The second answer was that there will be a version around end of January....
Ah, there is light at the end of the dark! But having to wait till end of this months would be also annoying...

So I choosed another solution, why not to use the data card as a kind of normal dial-up connection??

First you will have to disable the PIN on your SIM-Card, because the dial-up connection will not be able to ask for the PIN like the dashboard does.
You can use your mobile phone or the dashboard software for that.

After disabling the PIN insert the data card to your PCMCIA-Slot and wait for the drivers to be installed.

Then you will have to do some manual steps:

  • Open the Control Panel - Network and Sharing Center
  • Click "Setup a connection or network" in the tasks at the left side.
  • Mark "Connect to the Internet" and click Next
  • "Create a new connection"
  • Choose "Dial-up"
  • Choose the Novatel Wireless Merlin HSDPA Modem
  • enter *99# as Dial-up phone number
  • leave User name and Password blank
  • enter a describing description into Connection name
  • decide whether to allow other people to use this connection
  • click Connect

To make it a little bit more secure you should turn of all options in "Sharing and Discovery" and as a little comfort hint: you should put a Shortcut on the Desktop or into the Quick Launch to be able to activate the connection very easily.

This will work, but without the Vodafone dashboard you will not be able to diagnose you connection speed and control your download rates (a pity if you pay for volume or time and do not have a flat rate) so be careful! But I think that will be a proper workaround till the software will be available...

Thursday, January 04, 2007 8:19:56 PM (Mitteleuropäische Zeit, UTC+01:00)  #     Author:Markus Fischer   Comments [0]   |  |   | 
Copyright © 2010 Markus Fischer. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: