Obtain the SQL Server installation time and SQL Server installation time.
The latest installation of SQL Server 2014 does not have a formal License. You can only try it for three months. To know when it expires, you must know when SQL Server 2014 is installed. If you do not specifically record the installation date (most people do not actually do this), is there a way to query it from SQL Server? Think about how to create a Windows authenticated Logon account during installation. We can query it to determine the installation date. The query T-SQL is as follows:
SELECT * from sys. SERVER_PRINCIPALS
The output result is as follows:
From the results, we can see the create_date column. For example, you can see the SQL Server installation date by using the creation date of the login account whose name is NT AUTHORITY \ SYSTEM.
How to obtain the local time in SQL server 2008
Getdate (), which is provided by SQL. Most languages have the encapsulated function of obtaining local time, and are similar.
How can I obtain the system date from SQL server? (I mean what statements are used)
Select getdate ()