I have a issue with transferring images from one SQL server to another SQL server database.
Here is the scenario:
Move the data(images) from server1.database1.images-table
to server2.database2.images-table
.
I have server1.database1.imagestable. I do not have login privileges to this database. We do not have the sa password to add me as a user. The images table have a few fields that contain images. The OS is Microsoft Windows NT 6.3 (9600). I am trying to move the data into another server.
The script to create images table in server1 indicates that the primary key ID has autoincrement on it (IDENTITY(1,1)). So while creating images table in server 2, I removed the autoincrement on the ID primary key as I cannot keep the old key values.
I tried downloading the data into a flat file and .csv but both failed as the size of the images exceeded the 8000 char limit.
I tried to do a data transfer through SSMS (tasks --> import data) from server1 to server2 from table 1 to table 2. The import worked. It created and extra column (no name with an auto increment ranging from 1 onwards), then followed by the ID column (key value copied from server2.images
table. When I run a SQL query with column names (select ID, IDBatch from images
) it does not seem to recognize the field names. However when I run query for all fields (select * from images
) it returns a result set.
Did I make a mistake with the script? Thanks
PS. When I tried to do a data transfer through SSMS (tasks --> import data) from server1 to server2 from table 1 to table 2 with just the fields that I needed, I am getting a parse error:
The statement could not be parsed. Invalid object name database2.dbo.images