How to insert a file in ms sql database using hibernate? I am using binary type to insert the same - mssql-jdbc

I am facing an issue while trying to insert a file to ms sql database through hibernate.

Related

Error when trying to import with CSV file format in Cloud SQL

HTTPError 400: Unknow export file type was thrown when I try to Import csv file from my Cloud Storage bucket into my Cloud SQL db. Any idea what I missed out.
Reference:
gcloud sql import csv
CSV files are not supported in Cloud SQL, MS SQL Server. As mentioned here,
In Cloud SQL, SQL Server currently supports importing databases using
SQL and BAK files.
Somehow, it is supported for MySQL and PostgreSQL versions of Cloud SQL.
You could perform one of the next solutions:
Change the database engine to either PostgreSQL or MySQL (where CSV files are supported).
If the data on your CSV file came from an on-premise SQL Server DB table, you can create an SQL file from it, then use it to import into Cloud SQL, SQL Server.

Migrating mariadb 10.1 databases to a mariadb 10.3 database

I have a sql dump file generated by mysqldump of a mariadb 10.1 database
I have set up a new db server using mariadb 10.3 and am trying to import data and structure coming from the sql dump file. I get many errors like :-
**You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
INDEX user_id (user_id ASC) VISIBLE,
INDEX item_id (item_id ASC)...' at line 17.
SQL Error: 1064
Creating table event-afs-u-139492.wp_bp_activity_meta**
My question is, Is there anyway of upgrading the 10.1 SQL dump file to 10.3 before importing ?
Thanks in advance for any help.

how to convert microsoft 2016 sql ddl load scripts to postgres sql

I would like to translate Microsoft SQL Server DDL and table load sql commands to the Postgres equivalent.
There are a number of tools to convert one database to another in the link below but are there parsers for ddl/sql script conversion?
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#Microsoft_SQL_Server

How to export SQL Server Express database or specific table to SQL file?

I have SQL Server 2012 Express and I want to export the whole database or certain tables to a .SQL file (SQL Script). .BAK file will not work in my case.

How to export data from SQL Server to PostgreSQL?

I need to export all tables from SQL Server to PostgreSQL.
Try: I tried from SQL Server IDE but at some stage its giving the error about data types are different.
Question:How can I do export of data from SQL Server to PostgreSQL? Is COPY does my job? If yes, then how can I export all tables including records?
You can't export data from MSsql then import to PostgreSql because it is not same syntax, data type, but you can use tool to migration data from mssql to postgreSql,
See more in topic
migrate data from MS SQL to PostgreSQL?
Use https://dbeaver.io/
Create MS SQL and PostgreSQL database connections (login)
Create target tables in PostgreSQL (same structures in MS SQL)
F5 to see new tables
Right-click on new tables -> 'Import Data' -> You will see 'Data Transfer' window
Choose 'Table' type then click 'Next' -> You will see 'Select input object', where you can choose tables from MS SQL connection
Just 'next' and check settings that you need, done :D
First export the schema into a file and run it against PostgreSQL until you've removed all incompatibilities.
You could try to do the same with the data you want to export but you may be better off writing a Python script to migrate it.
There is an absolutely simple way using built-in SSIS tool using Management Studio. You can find the detailed answer here.
Use https://dbeaver.io/ , as An Le mentioned.
After 40 years of DB development, migrating DB data is still a challenge. DBeaver is a free tool to use for data migration. But you still have to migrate the schema.
Exporting data from DBeaver
From contextual menu of your SQLServer database or schema select Tools > Create new Task > Common > Data Export
You will generate SQL insert files or CSV files. For migration between database types use CSV files.
Cons of SQL Server Migration Tool
Unable to migrate rows containing booleans.
Export ended up in errors of migrationg data with Bool columns, complaining that value is not boolean, although both source and destination columns where of boolean type.
Unable to continue with the next tables afer one table migration fails.
SQL Server - A single error stops all migration even for tables that are not related to the initial error.
Configuring the tool over and over again, trying to export your data is a waste of time. SQL Server migration task does not save the configuration of the source and destination connections. And the wizard is not user friendly, spending your time on it is frustrating. I assume the migration project was abandoned for at least 10 years.