Checking SQL Server logs

  • Hello,

    We're running some tests on a couple SQL Server instance and we'd like to know if SQL Server has any logs that we can check to see if our tests are working properly.

    What we are trying to test is this: we have an installation application. When we run it, it creates a database in the specified SQL Server instance. We can specify which SQL Server instance it creates this database in as part of the installation procedure. What we want to do is create two SQL Server instance. We want the installation application to create the database in one of them only. The test is to see if there is any impact to the other SQL Server instance. In order to test this, we will need to check the logs associated with that instance.

    Can this be done? And what would we look for in the logs that would tell us that an operation was attempted by the installation application?

  • It can. If you are looking for information that the database was created, you can check for the message "Starting up database mydatabase". Once a database is created, it will be opened and recovery run. That's the message there.

    Alternatively, you can just connect to the instance and query sys.databases. If there's a database there, it was created. If you're attempting to see if this started and failed somehow, this might be in the log, but depending on the failure, you'd be looking to parse out various text items.

  • Steve Jones - SSC Editor - Thursday, January 26, 2017 9:37 AM

    It can. If you are looking for information that the database was created, you can check for the message "Starting up database mydatabase". Once a database is created, it will be opened and recovery run. That's the message there.

    Alternatively, you can just connect to the instance and query sys.databases. If there's a database there, it was created. If you're attempting to see if this started and failed somehow, this might be in the log, but depending on the failure, you'd be looking to parse out various text items.

    Thanks Steve, but what I'm looking for is log messages on the other SQL Server instance. What we're trying to ensure is that the application is not impacting the other SQL Server instance. A pass would be if there are no log messages. But if there are log messages, I'd have to somehow tell if they are coming from the application or from some other source that has nothing to do with the application.

  • That's going to be hard to do. The only good way to tell if your install has connected is with an extended event session that looks for activity from the account you use. There isn't a good log method that just checks to see if you've done anything.

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

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