Where are SQL Server connection attempts logged?

You can enable connection logging. For SQL Server 2008, you can enable Login Auditing. In SQL Server Management Studio, open SQL Server Properties > Security > Login Auditing select “Both failed and successful logins”. Make sure to restart the SQL Server service. Once you’ve done that, connection attempts should be logged into SQL’s error log. … Read more

Persist Security Info Property=true and Persist Security Info Property=false

Even if you set Persist Security Info=true OR Persist Security Info=false it won’t show a difference up front. The difference is happening in the background. When Persist Security Info=False, security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open … Read more

How do I change a Crystal Report’s ODBC database connection at runtime?

After even more research I found that there was a two part answer. PART 1 If you are connecting to PostgreSQL via ODBC (the only way Crystal Reports can pull data from PostgreSQL as of the time of this writing) using the data owner you then you can use the following code: reportDoc.Load(report); reportDoc.DataSourceConnections[0].SetConnection(“Driver={PostgreSQL ANSI};Server=myServer;Port=5432;”, … Read more

Database application.yml for Spring boot from applications.properties

You need to treat each . character in property names as levels in the yaml file: spring: jpa: database: POSTGRESQL show-sql: true hibernate: ddl-auto: create-drop datasource: platform: postgres url: jdbc:postgresql://localhost:5432/mydb username: foo password: bar driverClassName: org.postgresql.Driver EDIT: edits have been suggested, thanks for that. The driverClassName property actually should be under spring.datasource. However, the purpose … Read more

Connection timeout for DriverManager getConnection

You can set the Timeout on the DriverManager like this: DriverManager.setLoginTimeout(10); Connection c = DriverManager.getConnection(url, username, password); Which would imply that if the connection cannot open within the given time that it times out. In terms of keeping a connection open forever, it is possible if you do not close the connection but it may … Read more

What does “exec sp_reset_connection” mean in Sql Server Profiler? [duplicate]

Like the other answers said, sp_reset_connection indicates that connection pool is being reused. Be aware of one particular consequence! Jimmy Mays’ MSDN Blog said: sp_reset_connection does NOT reset the transaction isolation level to the server default from the previous connection’s setting. UPDATE: Starting with SQL 2014, for client drivers with TDS version 7.3 or higher, … Read more