Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ambajirao
Starting Member
3 Posts |
Posted - 2009-05-08 : 03:32:12
|
Hi,i have extracted the data to .txt file from server by using BCP. This data need to be loaded into another server with help of SSIS, and i have seen that the .txt file data is not sorted. The extracted file is source to my ssis job.i have to send the total data by doing merge join which need the data to be sorted out. But the data in the .txt file is not sorted and also the capacity is around 10GB and getting strucked due to memory issue in the ssis. pls help me how to sort data (either in ssis or in .txt file) before sending it to merge join.Note:1. The column datatype that need to be sort is UNIQUE_IDENTIFIER2. I dont have any staging area where i can load extracted data into table and continue ssis process. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-05-08 : 04:49:56
|
Examine the BCP syntax in BOL for the queryout keyword.So it is possible to realise a sorted output.Webfred No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
ambajirao
Starting Member
3 Posts |
Posted - 2009-05-08 : 05:17:08
|
We want to sort data after doing BCP but not while doing BCP. the data should be sorted at .txt file level or ssis level. |
 |
|
ambajirao
Starting Member
3 Posts |
Posted - 2009-05-08 : 05:22:24
|
i tried doing sorting at query level in management studio but am getting the following error.Error:Could not allocate space for object 'dbo.SORT temporary run storage: 150300293922816' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-05-08 : 06:25:54
|
An exported UUID as varchar is not the same as the binary representation.Even if you do sort the UUID as varchar, it will not be sorted binary for import later.Your best bet is to export the file again with QUERYOUT and cast then uuid as varchar but to do a ORDER BY uuid column (with no casting). E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|