i'm trying to setup a SonarQube server using the 7.1 docker official image connecting with Oracle 12C 12.2.0.1 database with AL32UTF8 character set. The thing is UTF8 is deprecated in oracle, and instead they use AL32UTF8, that is pretty much the same but with more space to storage data.
When trying to start the sonar server and error is been throwing: "web server startup failed: Oracle NLS_CHARACTERSET does not support UTF8: WE8MSWIN1252". I can't find any doc or workarounds to fix this problem.
If any have experience this or have any clues will be very helpful. I'm stock with this problem and can't find a solution.
Thanks in advance.
Finally was able to solve this issue that was tormenting me sometime. Sonarqube perform a verification for ensure the database supports UTF8 encoding:
private void expectUtf8(Connection connection) throws SQLException {
String charset = this.getSqlExecutor().selectSingleString(connection, "select value from nls_database_parameters where parameter='NLS_CHARACTERSET'");
if (!StringUtils.containsIgnoreCase(charset, "utf8")) {
throw MessageException.of(String.format("Oracle NLS_CHARACTERSET does not support UTF8: %s", charset));
}
}
If you see the error showed in the question, run this query on your database: **select value from nls_database_parameters where parameter='NLS_CHARACTERSET'** for find out the character set your database have.
The value obtained by the previous query is used for check the characterset. In my specific case the result was WE8MSWIN1252, and that's why i was getting that error.
So, set the NLS_CHARACTERSET to AL32UTF8 fix the problem.
Hope this can help someone out there.
Related
I want to connect to a MySql database using oracle SQL developer but when I try create a new connection it gives to me this error:
The connection property 'zeroDateTimeBehavior' acceptable values are:
'CONVERT_TO_NULL', 'EXCEPTION' or 'ROUND'. The value 'convertToNull'
is not acceptable.
Probably I have to change the connection url string since the value "convertToNull" is not recognized, but i don't know how to do it. Can someone help me?
I had this problem with the latest version of the JDBC driver for MySQL (8.0.11). When I reverted to the older driver, the problem went away.
try using any my sql connector versions after 8.0.11, it will work. in my case I have used 8.0.15, it successfully worked.
I would like to update mysql from v5.1 to v5.6, so that we can use utfmb4 instead of utf8.
After I updated my mysql, I changed the hibernate conf file connection url to
jdbc:mysql://xxx.xxx.xxx.xxx:3306/app?characterEncoding=utf8mb4, i.e. utf8 to utf8mb4 and
then I failed to connect db. If I changed it back to utf8, it worked.
The error info:
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source
pls help me.
Hope this will help:
http://info.michael-simons.eu/2013/01/21/java-mysql-and-multi-byte-utf-8-support/
Best regards,
I was using navicat for mysql to connect to mysql 5.5.25,it usually show me this:2005 - Unknown MySQL server host 'localhost'(0).Currently my resolution is to turn up the network,then it return to normal.but when network is not up,it shows that error,I had searched a lot,but no answer is revalent to it.So,does anyone knows the reason?
I had the same problem, but it only occurs when my computer is not on-line (for example when working on an airplane). I just change the word 'localhost' to 127.0.0.1 and it seems to be working even when off-line. I hope.
if you try to create the linked server using studio and the various menus, a small detail is not saved in the connection string, which is the database! (see last bit of the connection string)
EXEC master.dbo.sp_addlinkedserver #server='MYSQL',
#srvproduct='MySQL',
#provider='MSDASQL', #provstr='DRIVER={MySQL ODBC 5.1
Driver};SERVER=HOST;Port=3306;USER=uid;PASSWORD=pw;OPTION=3;DATABASE=mydb';
Long time lurker, first time poster; hoping anyone can help me out.
Im using MySQL Workbench 5.2.41 to migrate a database from SQL Server to MySQL 5.0.8
The entire process goes smoothly: both SQL and MySQL connection Tests are good, the skemea and table create as expected, everything checks out until the 'Bulk Data Transfer' step. At that point I receive this error:
...
Migrating data...
wbcopytables.exe --odbc-source=DSN=SQL Server 11;DATABASE=;UID=sa --target=root#127.0.0.1:3306 --progress --passwords-from-stdin --thread-count=1 --table [GSAClosers_v2] [dbo].[AccountBase] `dbo` `AccountBase`
`dbo`.`AccountBase`:Copying 84 columns of 169530 rows from table [GSAClosers_v2].[dbo].[AccountBase]
ERROR: `dbo`.`AccountBase`:SQLGetData: HY009:10:[Microsoft][ODBC Driver Manager] Invalid argument value `dbo`.`AccountBase`:
Finished copying 0 rows in 0m00s
Copy helper has finished
...
For connectors I'm using Microsoft SQL Server / ODBC Data Source / DSN: SQL Server and for MySQL the IP and port(3306).
SQL Server 2012 Management Studio connects and all operations work as expected.
O, side not: both are on the same localhost machine.
If anyone can shed some light on this I would be forever indebted. Thanks in advance
From here:
[Microsoft][ODBC Driver Manager] Invalid argument value.
Regarding to the error message and code you provided, which seems is
database is invalid or cannot be accessed. That means either the
database does not exist or the user does not have permission to access
the database.
It turns out you need specify the instance after the server name, so
in the server name in the dialog box for creating the ODBC Data
Source, you must enter it as either: MyServer\SQLEXPRESS or
.\SQLEXPRESS
I think you may have a problem connecting to your database from wbcopytables.exe. Keep in mind that this is a separate tool so the fact that you can connect from the rest of the Migration Wizard doesn't imply that you will connect in wbcopytables.exe.
The thing that worries me the most is that your DSN has whitespace characters. This might be interpreted by the Windows terminal as independent command line parameters. One thing you can do is to edit your DSN name removing the whitespaces and try again.
You may also want to connect without a DSN by putting all your connection parameters explicitely as explained in my blog post: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.
And, by the way, since MySQL Workbench 5.2.42 is out you should go and get it. The Migration Wizard is pretty new so important bug fixes are likely launched in each recent Workbench release.
In either case I think you should file a bug with your issues with a detailed explanation about how to reproduce it, possible solutions, etc.
Hope this helps.
Ok, got it figured out: un-install java. install java 1.6, use MySQL Migration Tool. change all data types to varchar, ints and bits. run migrations....eat data.
I have installed a local server Xampp, which is running mySQL database in Windows. I created a Database on it with one table. The thing is I cannot get a connection to the database when I use the dbExpress TSQLConnection component. When I set the properties as follows:
ConnectionName = MYSQLConnection
Driver = MySQL
Database = databaseName
HostName = localhost
password =
UserName = root
When I change the connected property to true, I get the following error:
Borland.Data.TDBXError: DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path
I have tried making a connection to the database using the Data Explorer, but I still get the above error. I do not know what I'm missing or doing wrong.
Im using Delphi-XE2.
with mySQL on the server: MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $.
I have also tried using an ADO connection, but I do not know how to set the connection string.
I'm still a noob and just want to learn how to make a connection to a mySQL database running on a web server. I cannot afford to buy any components.
Try this!
Did some google Fu - and stumpled upon this link : http://wiltonsoftware.com/posts/view/getting-embarcadero-dbexpress-mysql-working-dbx-error-driver-not-initialized
That seems to fit your needs.
My previous answer was no help .. hope the new one is better.
Old answer:
Make sure you have Data.DBXMySQL in your uses clause.
OK. I'll try a different approach.
Is it working if you setup the connection in the DataExplorer?
If not - then it's not a problem with the uses clause.
(and you obviously have tried that - sry . must be tired :-))
Otherwise a unit could be like this.
unit Unit1;
interface
uses // <-- Uses normally goes right after interface .... (you probably already have one)
Data.DBXMySql;
implementation
end.