I am facing some issues to make the connection to the particular schema on SQL Server because the setschema method is deprecated in JDBC API. So please help to get any alternative.
I got following error:
o.h.engine.jdbc.spi.SqlExceptionHelper : Warning: setSchema is a no-op in this driver version
I'm pretty sure you can't set a schema for a sql-server session. What you can do is define a user with a default schema of the one you want.
Related
Using Snowflake JDBC driver version 3.11.1 we get below error on big-endian platforms.
We are observing an issue with latest Snowflake JDBC driver where even basic Select queries are failing with below exception. It used to work with earlier version 3.10.3. It seems issue with "Arrow" . Any plans of fixing this issue. Caused by: java.lang.IllegalStateException: Arrow only runs on LittleEndian systems. at net.snowflake.client.jdbc.internal.io.netty.buffer.UnsafeDirectLittleEndian.(UnsafeDirectLittleEndian.java:65) at net.snowflake.client.jdbc.internal.io.netty.buffer.UnsafeDirectLittleEndian.(UnsafeDirectLittleEndian.java:50) at net.snowflake.client.jdbc.internal.io.netty.buffer.PooledByteBufAllocatorL.(PooledByteBufAllocatorL.java:50) at net.snowflake.client.jdbc.internal.apache.arrow.memory.AllocationManager.(AllocationManager.java:53) snowflake-da
There is no way to disable Arrow for Snowflake clients. I would suggest you to use an earlier version of the JDBC driver (e.g. 3.9.x) to workaround it for the moment and contact Snowflake Support to explore your options moving forward.
Have you tried using the following alter session commands using latest snowflake driver on AIX environment?
ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON'
Reference: https://community.snowflake.com/s/article/SAP-BW-Java-lang-NoClassDefFoundError-for-Apache-arrow
I tried creating a mysql stored procedures, it was okay. I tried to create a function of mysql stored function but I am having this error.
Did some research but was afraid to try because there were a lot of solution. I don't know which one is real.
I tried also checking the privilege in phpmyadmin side. Not working.
I also tried updating log_bin_trust_function_creators to 1 and caused an error. below is the image attached with error.
This is the error when I tried creating a function in aws server via phpmyadmin:
As the error message indicates, you need to set log_bin_trust_function_creators to 1 in the RDS parameter group.
It is not "less safe" in a meaningful sense in RDS.
https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_log_bin_trust_function_creators
I’m trying to query our database in F# but I’m having a lot of errors when I get the data context.
Here is my connection command:
#r "System.Data.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "System.Data.Linq.dll"
open System
open System.Data
open System.Data.Linq
open Microsoft.FSharp.Data.TypeProviders
open Microsoft.FSharp.Linq
type dbSchema = SqlDataConnection<"Data Source=OCPM;Initial Catalog=Nautilus;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()
147 errors in total are returned after this simple script, I won’t list them all but here are a couple of examples:
Script1.fsx(11,17): error FS3033: The type provider
'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders'
reported an error: Error reading schema. Warning : SQM1025: Unable to
extract stored procedure 'utvf_VehiclesSummaryUDT' from SqlServer because parameter 'incident' is the unsupported DbType 'Structured'.
Script1.fsx(11,17): error FS3033: The type provider
'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders'
reported an error: Error reading schema. Warning : SQM1014: Unable to
extract stored procedure 'asynch.usp_LBNGBasket' from SqlServer.
Invalid object name '#updatedPriceTab'.
I believe this is due to the complexity of the objects and structures used in our DB. The first error is due to a User-Defined Table Types called udt_IncidentExposure in the function utvf_VehiclesSummaryUDT. The second is because the temporary table #updatedPriceTab is called in asynch.usp_LBNGBasket but created in another stored procedures.
I’m surprised of the limited compatibility between F# and SQL Server on complex structures. Is there any other way to connect to SQL server in F#? All I need is doing very simples SQL queries.
Additional information: SQL Server version in use is 10.50.4270
You are out of luck with using production-quality SqlClient type provider because it requires at least SQL2012 to operate.
You may try SQL Type Provider, although I do not have any experience using it in production scenarios.
Also you may try using SqlEntityConnection type provider that sometimes does better job, than SqlDataConnection type provider that you've tried.
And finally, as the last resort, nothing prevents you from accessing SQL from F# through plain ADO.NET.
You can try other F# type providers from here:
http://fsharp.org/guides/data-access/#sql-data-access
The best one (IMO) for MS SQL Server is FSharp.Data.SqlClient but I believe it supports only version 2012 and up.
I am trying to use the SqlDataConnection type provider to connect to a SQL database on Azure.
type dbSchema = SqlDataConnection<"Server=tcp:123456.database.windows.net,1433;Database={database};User ID={user};Password={password};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;">
When I try to connect to the database with the associated connection string I get the following error:
Invalid object name 'syscomments'.
I cannot seem to find a solution to this problem other that using a different method to connect to the database (such as FSharp.Data.SqlClient). I believe this is related to the Azure implementation of Sql Server however I am unable to find any information on how to solve this problem. Any help is much appreciated.
I was having the same problem with the Microsoft Sql Type Provider. I started using this Sql Type Provider to better results: http://fsprojects.github.io/SQLProvider/
Thanks to Ross McKinley for pointing me to it.
I have just recently added our db schema into a VSTSDB project and one of the sp's is coming up with a strange error on the line:
revoke all from StatsReports
Now I've taken a look at the Sql docs for the "revoke" command and according to that it is valid sql. Also searching for the error number or text brings up nothing!
Anyone have any ideas?
It is valid TSQL, but the error message is - I assume - coming from VSTSDB, not from SQL Server. Running your query directly against a SQL 2008 database gives the following message:
The ALL permission is deprecated and maintained only for compatibility. It DOES NOT imply ALL permissions defined on the entity.
My guess is that VSTSDB shows an error on this syntax in order to 'remind' you to update your code. The deprecation is documented under the main page for the REVOKE command.