I am trying to create a data source for use with the Apache camel sql component and as per the documentation I have defined the spring data source properties and included the dependencies in my pom file: I have even defined a configured a data source as per numerous read examples (though if I am not mistaken, this isn’t needed
Tag: sql-server
Using 0 as Primary Key
I use lookup tables commonly and sometimes I have some default record in the Lookup table and I think for this record I can use 0 as Primary Key a as shown below: Project: By doing this I can start from 1 for the actual project values (A, B, C…) and on the other hand I can easily distinguish general/default
Transfer Views – ‘value()’ requires a singleton (or empty sequence), found operand of type ‘xdt:untypedAtomic *’
I am trying to transfer views from the AdventureWorks2014 database from one SQL Server to another using Java and JDBC. In order to obtain the structure of the view, I use the stored procedure “sp_helptext” like this: ResultSet rs = statement.executeQuery(“EXEC sp_helptext ‘” + view + “‘;”); where view is the schema and view name (e.g., “dbo.myview”) that I am
SQL Server JDBC Error: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption
Background: Application Server: Java Based Application is running on Windows Server 2008 R2 Enterprise. Java Version on this Server is Version 6 Update 32. JDBC Driver Version: 4.0 Database Server: The database server has been recently upgraded(Side by side upgrade with the same servername as the one before that the application use to connect to) from Windows 2016 to Windows
LocalDateTime and SQL Server JDBC 4.2 driver
I’m trying to use new java.time classes with most recent version of Sql Server JDBC driver. As I read it should just work with methods: PreparedStatement.setObject() and ResultSet.getObject(). So I created sample code, and can’t get it work with ResultSets. I don’t know what I’m doing wrong here. This throws an exception: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion to class java.time.LocalDateTime is unsupported.
How to resolve SQLServerException: Invalid object name?
I am creating a spring boot application using MS SQL server. I have a requirement where I need to initialize USERS table in user_database database using data.sql file placed in /src/main/resources/ folder and rest of the tables should be created automatically in springboot_db database with the help of @Table annotation. Below is the code snippet. applicaiton.properties file data.sql AppConfiguration.java (One
Can I get “BULK INSERT”-like speeds when inserting from Java into SQL Server?
During my quest to find the fastest method to get data from Java to SQL Server, I have noticed that the fastest Java-method I can come up with, is still 12 times slower than using BULK INSERT. My data is being generated from within Java, and BULK INSERT only supports reading data from a text file, so using BULK INSERT
Hibernate with Sql Server fail for nvarchar field with “No Dialect mapping…”
I’m using Hibernate’s JPA-Implementation to access our SQL Server 2012 database. When trying to select a nvarchar field in a native query, I get an exception “No Dialect mapping for JDBC type: -9”. It looks much like No Dialect mapping for JDBC type: -9 with Hibernate 4 and SQL Server 2012 or No Dialect mapping for JDBC type: -9 but
java.sql.SQLException: An attempt by a client to checkout a Connection has timed out
I have a java client server which is supposed to establish connection pool on startup but its failing on timeout error. There are so many threads on this same issue but none of the solutions worked for me AM using jdk 7 and below is the mchange maven dependency jdbc.properties Here is my DAO class which establishes connection-pool on server
Could not connect to the database Network error IOException: Connection refused: connect
I am running a SQL Server Express 10.50.4000.0 on my machine. I have enabled on the TCP/IP and made sure the port is set to 1433. I have added an exception in my firewall for 1433. The server service is running. I have tried localhost and the computer name and both give the same error. When i try localhostSQLEXPRESS or