Reg Database

bharathnan
bharathnan Member Posts: 92
HI
how to know the date when for the last database is restored in navision 2017.
Please advice

Answers

  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    I don't think you can check it inside NAV.

    You can however check this sort of things in SQL Server Management Studio - right click on the database, click Properties, and in General tab you will see the Database Created property. That would be when the database has been restored.
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;
  • bharathnan
    bharathnan Member Posts: 92
    Thanks Slawek ..Is there anyother way to sort this out since we don't have ssms in local machine it is in remote server.
    Thanks

  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    edited 2018-02-06
    Ask the server/database administrator?

    You can retrieve creation date by executing the following T-SQL query against your SQL Server
    SELECT create_date
    FROM sys.databases
    WHERE name = 'MyDatabaseName'
    

    Any tool which will let you connect to the database and let you execute the query above will do.

    You could even build something in NAV enabling you to run T-SQL queries and retrieve results from any database. It is a bit complicated, but if you look into UpgradeToolkit on the installation DVD there is a codeunit inside one of these fobs, Upgrade - SQL Mgt, which will have all DotNET components already defined, and also a code base you can learn from.

    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;