Store spss data on SQL database based on uniqueidentifier - sql-server

I Imported a table from SQL database to SPSS dataset, I edited the table by adding a new column to it after some statistics, but when I try to export the table back to the database by adding the new column, by matching the Primary key from dataset and database table which is of type "uniqueIdentifier, this error is shown to me
> Error # 6492
>The ODBC subsystem has issued an error which prevents the processing of SAVE
>TRANSLATE ODBC request.
>Execution of this command stops.
>[Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed when
>converting from a character string to uniqueidentifier.
how to resolve this error?

uniqueidentifier is probably a type that the ODBC driver doesn't know how to convert to as it is probably a database internal type. Try writing your data to a new table without converting and then do an update of the database table from within the database converting the identifier type inside the database. You can put the necessary SQL in your SAVE TRANSLATE syntax using its SQL subcommand.

Related

I have created SSIS package to move the data from Snowflake to SQL Server table

I am getting this error while loading the data from Snowflake Database to SQL Server table (OLEDB).
Error:
[snowflake][ODBC] (10450) Indicator pointer is required by driver to indicate NULL output data, but is not provided.;
Can anyone help me this i am new this.

Move Image column from OracleDB top SQL Server

I have access to an Oracle database and I need to bring its data into SQL Server. The table has a simple structure and I can't change anything on the Oracle side.
I created a linked server inside SQL Server but I can't select the table because of this error :
The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column. The column (compile-time ordinal 1) of object was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 0 at run time
The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column. The column (compile-time ordinal 1) of object was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 0 at run time
I checked and it seems to be a general problem and Oracle suggested using OPENQUERY to get data from these tables.
When I use OPENQUERY the IMAGE ( 'BFILE' ) column is null but I can see in SQL Developer that it is not null.
When I use SSIS, I get this error:
ADO NET Source [33]] Error: The error "ORA-00972: identifier is too long occurred while processing "ADO NET Source.Outputs[ADO NET Source Output].Columns[IMAGE]
Any ideas on how to move a table with an IMAGE (BFILE) column from Oracle database to SQL Server?

Oracle to MSSQL migration error 'The table xxx doesnot exist in target'

I am trying to convert and migrate an Oracle schema to MSSQL server. At the last step, migrating data, I get the error message:
The table [MYDATABASE].[MYSCHEMA].MYTABLE] doesnot exist in target. You must first convert the table then load it into the database.
This error message appears for each table in my schema.
Can someone explain what is happening and what I need to do to get past this?
Are you tries to migrate the data before doing the ‘synchronize with the database’ operation?
If Yes,
This error message generally occurs when the target table doesn’t
exist on SQL server database. After converting schema, you need to
synchronize the table with the database before migrating the data.
To do this you right click on the SQL Server database in Metadata
explorer and click “Synchronize with database” menu.
Note: Table structure will not be created in the SQL server database until you synchronize.

Error in export sql server database

I have SQL server and SQL management studio 2012. After i create tables and when i export the data base to the server "online" every "primary and auto incremental" field become as a normal field. so when i try to add row to database i have the following error
"Cannot insert the value NULL into column 'taskID', table 'lawyersDB.dbo.tasks'; column does not allow nulls. INSERT fails.
The statement has been terminated."
To solve this problem i have to manage the database "online" and go to each table and set again the fields primary and auto incremental. Since i have many tables, this process takes lot of time.
So Any idea to solve this problem!?
Note: my hosting is on Arvix company server
This is SQL Management Studio, not your account.
Try this:
You need to set this, or else if you have a non-nullable column, with no default error, if you provide no value it will error.
To set up auto-increment in SQL Server Management Studio:
Open your table in Design
Select your column and go to Column Properties
Under Indentity Specification, set (Is Identity)=Yes and Indentity Increment=1

Data migration from SQL Server to Oracle

I am working on database migration project. Connecting to SQL Server using Oracle gateway.
Image datatype in SQL Server is migrated to blob data in Oracle. But when I try to insert the data using insert command it gives an error.
SQL Server table:
create table xyz ([Image_Data] [image] NULL )
Oracle table:
create table xyz (Image_data BLOB null)
Insert command used:
insert into xyz
select * from xyz#sqldb;
Error message:
SQL Error: ORA-00997: illegal use of LONG datatype
00997. 00000 - "illegal use of LONG datatype"
ODBC is mapping SQL Server column to Oracle's LONG data type. It is not that easy to handle it.
The best way is to use DBMS_SQL package.
Here you can find useful notes:
http://ellebaek.wordpress.com/2010/12/06/converting-a-long-column-to-a-clob-on-the-fly/
We have successfully migrated the data with DTS Tool.

Resources