getdate () brings me a different time than my operating system

  • Hello, I have SQL Server 2019 installed on a server with windows server 2019, in the operating system the time is 11:10 am but in SQL Server when I give it SELECT GETDATE () it brings 10:10, I don't know what else to check.

    many of the stored procedures use getdate () and obviously this is affecting my processes

     

    thanks.

    Attachments:
    You must be logged in to view attached files.
  • If you run

    xp_cmdshell 'TIME /T'

    what do you see?

    Have you tried restarting SQL Server?

     

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • You hid the name of the remote machine you’ve connected to.

    I bet it’s not “26003D9”

    That machine must have DLS enabled, and the server hosting the SQL Server instance must have not.

    that’s the issue you need to fix.

    _____________
    Code for TallyGenerator

  • As a bit of a side bar, it also appears that you're logged in using the "sa" login... that means that you've broken some serious security rules and, unless you do the necessary things, like disabling the "sa" login (just as a start), it's very likely that you'll end up reading  about yourself in the morning news in the relatively near future.

    I'd concentrate on fixing that "little" issue first.  No one should be using the "sa" login and, at the very least, it should always be disabled.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply