Showing posts with label imported. Show all posts
Showing posts with label imported. Show all posts

Friday, February 24, 2012

DTS is not getting the primary key

Hi All,

Using DTS i have imported the data from sybase to MS SQL server and all the data and tables were imported correctly.But the primary keys are not marked why is it like this?
This is not a one time job and this is meant to be for the customers also.I cannot ask the customers to mark the primary keys themselves. Is there a way to get the keys also.While doing DTS I have marked all the options correctly.

Please help.I am not sure why PKs are skipped (never dealt with DTS-ing from Sybase), but you can script PKs on Sybase side, fix the script to ensure syntactical compatibility, and then attach it as an additional step into your package.|||Hi ,

I saw that thread but I think it dint help me as I am not able to figure out where the transfer objects is. They say it is in DTS after u select the source and destination DB ,but I din't find anything like that in the entire process of it. May be the transfer objects method might be there only in cetain version.
I dunno what to do.
I am using the recent version of MS Sql server.
Please help.

Regards,|||How are you connecting to Sybase ODBC or OLEDB? What version of Sybase are you connecting to?|||Hi,

I am connecting to sybase using ODBC and the version is 6.0.2

Thanks|||What version of Sybase 11.9.2, 12, 12.5? Also, have you tried OLEDB? It's much faster than ODBC.

Friday, February 17, 2012

DTS import with dashes in source data

I'm trying to import numbers from an excel spreadsheet into a SQL table using a DTS package. I'm getting null values imported when my source data contains a dash (-). The data type for the source is text, and the datatype for the destinations is varchar(100). I've also tried a source data type of general. I'm doing a straight copy.

The source data might look 234-b87-456. Why would I be getting nulls when importing this data?

Thanks.
StumpedDid you check your transformation options and make sure that the columns line up correctly?|||I did. The column names in the source file are identical to the column names in the destinations table. I double-checked the mapping just to be sure all were correctly mapped.|||Try doing the same import but without the dashes in the columns.|||There are values within the same column that do not have dashes, and they import correctly. It is only the values with dashes that are not importing. All other values import correctly.

Thanks.

DTS import question

I have a database table that stores personnel records that is imported from another source. I have SSN as a unique key.

Everyday I import data from a text file via DTS that checks for any updates to my records. If the data is updated I update my records, if there is new records I just add them to my table. The problem is every once in a while a duplicate ssn may appear in the text file I import. This causes my import to fail obviously because of the unique key on SSN. How do I allow DTS to continue and just ignore the problematic SSN? Can I write the conflicting SSN or error to a file somewhere?

if you're using a DTS you can check ifsomething has failed and write to an error log or send an email,however, you can't just continue from where the problem occurred,you'll have to manually check the error and sort it before running itagain.
To configure logging for your package, right click on the package inDTS Designer, select 'Package Properties'. Go to 'Logging' tab. In thistab, specify the error file, as well as the SQL Server to which youwant to log the package execution. When logging to SQL Server, theinformation will be logged into sysdtspackagelog and sysdtssteplogtables in the msdb database.
Taken from http://vyaskn.tripod.com/sql_server_dts_best_practices.htm troubleshooting section.
|||

"One way of doing this would be to create a duplicate loading table. On the
UNIQUE index specify WITHIGNORE_DUP_KEY.
This will allow you to load the rows and SQL server will only load a
distinct version of the row based on that index.

You then push the rows that are processed into the real table "
I got the above from the SQL Server news groups and that was exactly what I thought you should do. Run a search on DTS and IGNORE_DUP_KEY on Google . Hope this helps. For more DTS questions check out the link below.
http://www.sqldts.com

Tuesday, February 14, 2012

DTS import

ive successfully imported the data i need into a table, but now i need to
append to that data another field from the original source into data thats
already there
eg original source was poor - had a diary function that could be either
ID,Account Manager,Diary or ID,Senior Account Manager,Diary
in sql i have ID,EnteredBy,Diary
i imported the data from Access no problem but i could only import the
account manager field - now i need to append in senior account manager to
the data thats already there
heh not sure if im making myself clear
mark
Could you supply a DDL of the source table and the SQL Server table and a
sample of the data and what you want it to look like?
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"mark" <mark@.remove.com> wrote in message
news:dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net...
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
>
|||"mark" <mark@.remove.com> wrote in message news:<dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net>...
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
Well, I don't understand the detail of what you're trying to do.
There are three options spring to mind though.
All start with you adding your new field to the table.
1) With DTS you can do all sorts of things in script.
There's probably a way of updating the data directly via a DTS
package, but I reckon if you have to ask then this ain't the route you
want mate.
2) Whack the data into a new table. Put a bit of T-SQL together to
update
with this and then drop the new table.
3) Connect access to the SQL database using a dsn and attached tables
and write the update in access. This may be slow depending on your
connection and amount of data but I suggest it because maybe you're
more used to working in Access.
HTH

DTS import

ive successfully imported the data i need into a table, but now i need to
append to that data another field from the original source into data thats
already there
eg original source was poor - had a diary function that could be either
ID,Account Manager,Diary or ID,Senior Account Manager,Diary
in sql i have ID,EnteredBy,Diary
i imported the data from Access no problem but i could only import the
account manager field - now i need to append in senior account manager to
the data thats already there
heh not sure if im making myself clear
markCould you supply a DDL of the source table and the SQL Server table and a
sample of the data and what you want it to look like?
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"mark" <mark@.remove.com> wrote in message
news:dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net...
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
>|||"mark" <mark@.remove.com> wrote in message news:<dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net>
..
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
Well, I don't understand the detail of what you're trying to do.
There are three options spring to mind though.
All start with you adding your new field to the table.
1) With DTS you can do all sorts of things in script.
There's probably a way of updating the data directly via a DTS
package, but I reckon if you have to ask then this ain't the route you
want mate.
2) Whack the data into a new table. Put a bit of T-SQL together to
update
with this and then drop the new table.
3) Connect access to the SQL database using a dsn and attached tables
and write the update in access. This may be slow depending on your
connection and amount of data but I suggest it because maybe you're
more used to working in Access.
HTH

DTS import

ive successfully imported the data i need into a table, but now i need to
append to that data another field from the original source into data thats
already there
eg original source was poor - had a diary function that could be either
ID,Account Manager,Diary or ID,Senior Account Manager,Diary
in sql i have ID,EnteredBy,Diary
i imported the data from Access no problem but i could only import the
account manager field - now i need to append in senior account manager to
the data thats already there
heh not sure if im making myself clear
markCould you supply a DDL of the source table and the SQL Server table and a
sample of the data and what you want it to look like?
--
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"mark" <mark@.remove.com> wrote in message
news:dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net...
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
>|||"mark" <mark@.remove.com> wrote in message news:<dwHqc.24$pz2.23@.newsfe3-win.server.ntli.net>...
> ive successfully imported the data i need into a table, but now i need to
> append to that data another field from the original source into data thats
> already there
> eg original source was poor - had a diary function that could be either
> ID,Account Manager,Diary or ID,Senior Account Manager,Diary
> in sql i have ID,EnteredBy,Diary
> i imported the data from Access no problem but i could only import the
> account manager field - now i need to append in senior account manager to
> the data thats already there
> heh not sure if im making myself clear
> mark
Well, I don't understand the detail of what you're trying to do.
There are three options spring to mind though.
All start with you adding your new field to the table.
1) With DTS you can do all sorts of things in script.
There's probably a way of updating the data directly via a DTS
package, but I reckon if you have to ask then this ain't the route you
want mate.
2) Whack the data into a new table. Put a bit of T-SQL together to
update
with this and then drop the new table.
3) Connect access to the SQL database using a dsn and attached tables
and write the update in access. This may be slow depending on your
connection and amount of data but I suggest it because maybe you're
more used to working in Access.
HTH