Listing all Data Sources and their Dependencies (reports, items, etc) in SQL Server 2008 R2

The following (which was modified from what beargle posted earlier) does what I was looking for. This will list all the data sources by their actual name, and all their dependent items: SELECT C2.Name AS Data_Source_Name, C.Name AS Dependent_Item_Name, C.Path AS Dependent_Item_Path FROM ReportServer.dbo.DataSource AS DS INNER JOIN ReportServer.dbo.Catalog AS C ON DS.ItemID = C.ItemID … Read more

Spring Boot “PSQLException: FATAL: sorry, too many clients already” when running tests

Since there hasn’t been a suggested answer I am posting my solution. Short version: decrease the connection pool size in test properties: spring.datasource.hikari.maximum-pool-size=2 Longer version: Spring Boot 2 uses HikariCP by default for connection pooling, which has a default value of 10 for connection pool size (as of Jan 2019). While running a lot of … Read more

Database or List of English First and Last Names [closed]

I’m compiling a database that contains last names from a variety of different countries and cultures, the UK among them. The project and its datasets can be found here: https://github.com/enorvelle/NameDatabases(Dead: link, project and GitHub account) This seems to have migrated to github.com/smashew/NameDatabases. (Sole contributer “Erik Norvelle”.)

How to test a mocked JNDI datasource with Spring?

You can use SimpleNamingContextBuilder to make a jndi datasource available to your tests: SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder(); builder.bind(“java:comp/env/jdbc/mydatasource”, dataSource); builder.activate(); https://fisheye.springsource.org/browse/spring-framework/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java?hb=true This isn’t exactly mocking the datasource, but it does make the datasource available via jndi for your tests.

Exception when creating datasource with PostgreSQL driver in Spring Boot

I found the problem: Eclipse showed the dependencies properly, but as it seemed the class was not really present, I tried to run it manually, so when I executed: mvn clean install I got this error from Maven error reading /home/pablo/.m2/repository/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar; invalid LOC header (bad signature) So the error was caused by Maven downloading a … Read more

Multiple data source and schema creation in Spring Boot

spring.jpa.hibernate.ddl-auto=create has stopped working, not because you have two DataSources, but because your application’s creating its own LocalContainerEntityManagerFactoryBeans. This has the effect of disabling the auto-configuration of a LocalContainerEntityManagerFactoryBean so you now have to configure it yourself. You can configure the two entity managers to have different schema generation behaviour like this (the first’s doing … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)