Migration of SQL Server DB to HSQLDB alternative for varchar(max) - sql-server

I am working on requirement to migrate Microsoft SQL Server to HSQL Database.
What will be the alternative for varchar(max) from SQL Server to other data type in HSQL Database?

You can use VARCHAR with a large maximum size, for example VARCHAR(1000000). Check the maximum size of the strings in that column in the SQLServre database and use a larger value. If the strings are typically longer than 32000 characters, you can consider using CLOB instead.

Related

How to store very very large data more than varchar(max) in a SQL Server column?

I am trying to save json data in SQL Server 2012. Size of that data exceeds the varchar(max) size and hence SQL Server truncates the remaining text. What is the solution to store more data?
Sql Server has a FileStream feature that allows you to store data that doesn't fit in a standard varchar(max) field. There is also another option (that uses FILESTREAM under the covers) called FileTables that allow you to store a file on the file system but access it directly from T-SQL. It is rather slick but my colleagues and I found the learning curve to be quite steep; lots of little quirks you have to get used to.

Rupee symbol '₹' and Nigeria naira '₦' are not supported by database. It's saving as '¿' in the database Oracle and SQL Server

Rupee symbol '₹' and Nigeria naira '₦' are not supported by database. It is saving as '¿' in the database Oracle and SQL Server.
Even I set as NLS_CHARACTERSET=WE8MSWIN1252 in Oracle, it's not working
Any other settings has to be done in db?
For SQL Server, you must:
define the column to hold this information as NVARCHAR(n) datatype (not varchar(n) !)
use the N'...' syntax when inserting values from SQL script to ensure Unicode storage
INSERT INTO dbo.YourTable(UnicodeColumn)
VALUES(N'₹'), (N'₦')
use the correct Unicode data type for e.g. a parameter if you're inserting your values from frontend code (e.g. PHP, C#, Java)

nvarchar & varchar with Oracle & SQLServer

I need to upload some data from an Oracle table to a SQL Server table. The data will be uploaded to the SQL server using a Java processing utilising JDBC facilities.
Is there any benefit in creating the SQL server columns using nvarchar instead of varchar?
Google suggests that nvarchar is used when UNICODE characters are involved but i am wondering does nvarchar provide any benefit in this situation? (i.e. when the source data of the SQL Server table comes from an Oracle database running a Unix environment?)
Thanks in advance
As you have found out, nvarchar stores unicode characters - the same as nvarchar2 within Oracle. It comes down to whether your source data is unicode - or whether you anticipate having to store unicode values in future (e.g. internationalized software)

Does Access have any issues with unicode capable data types like nvarchar in SQL Server?

I am using Access 2003 as a front end UI for a SQL Server 2008 database. In looking at my SQL Server database design I am wondering if nvarchar was the right choice to use over varchar. I chose nvarchar because I thought it would be useful in case any characters represented by unicode needed to be entered. However, I didn't think about any possible issues with Access 2003 using the uni-code datatype. Are there any issues with Access 2003 working with unicode datatypes within SQL Server (i.e. nvarchar)? Thank you.
You can go ahead and use nvarchar, if that's the correct datatype for the job. Access supports Unicode data, both with it's own tables and with external (linked) tables and direct queries.

How do I copy a CLOB from Oracle into SQL Server

The CLOB is XML data that is > 8k (sometimes > 32k). Any suggestions?
Unfortunatly I was unable to run it within SQL Server, so I wrote a C# console application to import and parse the CLOB data, then to write out the results to SQL Server.
You may have to use the IMAGE type, as the BINARY type is limited to (IIRC) 8000 bytes in SQLServer 2K. The limits for varchar and varbinary increased in SQLServer 2005, so it depends on what your target is. For 2005, if your data is ASCII varchar will work, if it's unicode text use nvarchar, otherwise use varbinary.
If you're looking for sample code, you'll have to give us more information, like what language/platform you're using, and how you're accessing the two databases. Also, is this a one-time transfer, or something that you need to do programmatically in production?

Resources