Obtain the SQL Server installation time and SQL Server installation time.

Source: Internet
Author: User

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 ()

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.