How to prevent database conversion by accident

ta5ta5 Member Posts: 1,164
Hi
I think this topic has been discussed before, but I cant find the thread...

As a NSC, we have a lot of customer databases around. Because we want to prevent database conversion by accident, we have an icon for every customer db. Worked fine for years!

The problem is with Links to Nav, for example "nav://...". Such a link seems to start the latest installed client. Then it happens, an old db version is opened with a new client and converted very fast...

Is it possible to prevent this, meaning developers still should have development access to the db's?

Thanks in advance
Thomas

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I do remember this discussion as well. I think it was this one http://www.mibuso.com/forum/viewtopic.php?f=23&t=34277. But your goal is a little bit different. I mean this link issue.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • ta5ta5 Member Posts: 1,164
    I do remember this discussion as well. I think it was this one http://www.mibuso.com/forum/viewtopic.php?f=23&t=34277. But your goal is a little bit different. I mean this link issue.

    Thanks. I like this: "Phrases like "Next time I'll cut up your hands" doesn't work accident still happens, not often but it happens." :mrgreen:

    As mentioned at the beginning of this thread, having an icon or something else is not a problem, it has been working for years. The "new" problem is dealing with links.

    Any comments are welcome. Thank you in advance.
    Thomas
  • KYDutchieKYDutchie Member Posts: 345
    Thomas,

    Are your databases SQL databases?
    If so you can use the "dbo.sp_$ndo$loginproc" for this, we do it here locally.
    We compare the build number of the client application with the database build number.
    If those 2 are not equal, the user is denied access to the database with that client.

    Hope this helps,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • DenSterDenSter Member Posts: 8,305
    ta5 wrote:
    accident still happens
    Clicking two message boxes is not an accident, it is carelessness. People who "accidentally" convert databases have absolutely no business with developer access to those databases, and you should take away said access immediately.

    How I would approach this is to take away this access from everyone except the ones that you know need it. Then if someone wants access they have to ask for it, and you can have the "I will cut off your hands"-conversation :mrgreen:
  • rdebathrdebath Member Posts: 383
    This one usually does the job too.
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[$ndo$abort_upgrade]'))
    DROP TRIGGER [dbo].[$ndo$abort_upgrade]
    GO
    CREATE TRIGGER dbo.[$ndo$abort_upgrade]
       ON  dbo.[$ndo$dbproperty]
       AFTER UPDATE
    AS 
    BEGIN
    	SET NOCOUNT ON;
    	if update(databaseversionno)
    	RAISERROR ('Contact the system administrator, ID Ten Tee Error', 11, 1)
    END
    GO
    
  • ta5ta5 Member Posts: 1,164
    Thanks for your reply. Is there a hint for native db too?
    Thomas
  • rdebathrdebath Member Posts: 383
    Nope, for native you're back at "fingers meet hammer" and "sorry everyone the database will be offline today because Thomas has upgraded it again".

    Though, frankly, we don't use that SQL code either. We use a directory of links to the databases, pick the one you want and click. No problems, well except for Windows Vista of course.
  • ta5ta5 Member Posts: 1,164
    rdebath wrote:
    Nope, for native you're back at "fingers meet hammer" and "sorry everyone the database will be offline today because Thomas has upgraded it again".

    Though, frankly, we don't use that SQL code either. We use a directory of links to the databases, pick the one you want and click. No problems, well except for Windows Vista of course.

    Thanks a lot!
    Btw 1: It was not me, upgrading the database by accident :)
    Btw 2: We also use a directory of links, but the accident happened by clicking a mail containing a link to navision (see initial post).
  • rdebathrdebath Member Posts: 383
    ta5 wrote:
    rdebath wrote:
    Nope, for native you're back at "fingers meet hammer" and "sorry everyone the database will be offline today because Thomas has upgraded it again".

    Though, frankly, we don't use that SQL code either. We use a directory of links to the databases, pick the one you want and click. No problems, well except for Windows Vista of course.

    Thanks a lot!
    Btw 1: It was not me, upgrading the database by accident :)
    Btw 2: We also use a directory of links, but the accident happened by clicking a mail containing a link to navision (see initial post).
    Oops, sorry I always misspell his name, that's Tomas not Thomas :mrgreen:

    Btw: navision:// links DONT WORK in an NSC environment, they NEVER start the right client. That's what I always say anyway. I expect a simple regedit or deleting the finhlink.exe program will kill them dead.
  • ta5ta5 Member Posts: 1,164
    8)
    Btw: Deleting finhlink.exe works excellent! Thanks
    Thomas
  • danlindstromdanlindstrom Member Posts: 130
    DenSter wrote:
    Clicking two message boxes is not an accident, it is carelessness....

    There are situations where NAV does a silent upgrade of the db, such as applying hotfixes and SPs
    :( :bug:
    Regards
    Dan Lindström
    NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
    MBSP Developer for Microsoft Dynamics NAV 2009
  • ta5ta5 Member Posts: 1,164
    Also when openening a 4.03 DB with a 5.00 Client via Server.
Sign In or Register to comment.