Showing posts with label load. Show all posts
Showing posts with label load. Show all posts

Monday, March 26, 2012

Need suggestion on loading a 50 million records table from Oracle

All,

I need to load a 50 million records table monthly. Any suggestion about the best/fast way to do it?

Thanks a lot

All

I tried today; it used 8 hours to load the data just from the Oracle table to the staging table on sql server 2005. It is unacceptable!!! There are must be a better way to do it.

In the data flow, there is only an OLE DB source (from Oracle) -> data conversion transformation(convert the CLOB type) > OLE DB target (SQL server 2005)

Do I need to do more in the data flow? What should I do?

Many Thanks

|||

There IS a better way of doing it. Scott Barrett has done loads of work on this sort of stuff and has written some great blogs on it. Especially this one: http://microsoftdw.blogspot.com/2005/11/final-storyhow-to-get-data-out-of.html.

Search this forum as well - you'll find loads of good stuff.

Lastly, if you do only one thing make sure its to read this fabulous post (http://www.sqljunkies.com/WebLog/donald_farmer/archive/2005/03/13/8819.aspx) on SSIS and Oracle from Donald Farmer, Group Program Manager for SSIS.

-Jamie

sql

Need suggestion for SQL 2000

Hi,
I am researching about best practice for SQL load balance.
can someone suggest if there's article out there would expalin in details
doing the SQL 2000 load balcance.
I am planning the future failover so it does not impact users
any suggestions would appreciateIf your system is read / write there really is no easy way to load balance
SQL Server. Load balancing, HA and DR are different things and you need to
be clear on what it is you want or need to do.
--
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
> Hi,
> I am researching about best practice for SQL load balance.
> can someone suggest if there's article out there would expalin in details
> doing the SQL 2000 load balcance.
> I am planning the future failover so it does not impact users
> any suggestions would appreciate
>|||HI,
My application reads/ writes to my sql server. Actaully, i am looking for
a plan where in future to create a disaster recovery plan. as of now I can't
keep my sql server down and I would like to create plan where I can create 2
server, load sql 2000..and if one fails, other will function.
I am looking for a suggestion what would be better solution if I should use
SQL locad balance, cluster, or mirror my harddrive..
since the application will update my db, so i need to have both sql server
data shoud be same.. can someone suggests me if there is a article I can find
in doing this...
would appreciate someone help..
"Andrew J. Kelly" wrote:
> If your system is read / write there really is no easy way to load balance
> SQL Server. Load balancing, HA and DR are different things and you need to
> be clear on what it is you want or need to do.
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
> > Hi,
> >
> > I am researching about best practice for SQL load balance.
> > can someone suggest if there's article out there would expalin in details
> > doing the SQL 2000 load balcance.
> >
> > I am planning the future failover so it does not impact users
> > any suggestions would appreciate
> >
> >
>
>|||That is usually what a CLUSTER is for. It is a hardware failover solution
in the event one server fails the shared db is moved over to the other
server and can be up and running in les than a few minutes. Another
solution is to use Log Shipping. All are outlined here:
http://www.microsoft.com/sql/techinfo/administration/2000/availability.mspx
--
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...
> HI,
> My application reads/ writes to my sql server. Actaully, i am looking for
> a plan where in future to create a disaster recovery plan. as of now I
> can't
> keep my sql server down and I would like to create plan where I can create
> 2
> server, load sql 2000..and if one fails, other will function.
> I am looking for a suggestion what would be better solution if I should
> use
> SQL locad balance, cluster, or mirror my harddrive..
> since the application will update my db, so i need to have both sql server
> data shoud be same.. can someone suggests me if there is a article I can
> find
> in doing this...
> would appreciate someone help..
> "Andrew J. Kelly" wrote:
>> If your system is read / write there really is no easy way to load
>> balance
>> SQL Server. Load balancing, HA and DR are different things and you need
>> to
>> be clear on what it is you want or need to do.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
>> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
>> > Hi,
>> >
>> > I am researching about best practice for SQL load balance.
>> > can someone suggest if there's article out there would expalin in
>> > details
>> > doing the SQL 2000 load balcance.
>> >
>> > I am planning the future failover so it does not impact users
>> > any suggestions would appreciate
>> >
>> >
>>|||Thanks Andrew,
I am researching on clustering the sql server. I will be using Vmware
product to test the cluster enviornment. I have one more questions, The
clustering the sql server stays stable in enviornment. does it have any pros
or cons by doin in cluster enviornment
"Andrew J. Kelly" wrote:
> That is usually what a CLUSTER is for. It is a hardware failover solution
> in the event one server fails the shared db is moved over to the other
> server and can be up and running in les than a few minutes. Another
> solution is to use Log Shipping. All are outlined here:
> http://www.microsoft.com/sql/techinfo/administration/2000/availability.mspx
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...
> > HI,
> > My application reads/ writes to my sql server. Actaully, i am looking for
> > a plan where in future to create a disaster recovery plan. as of now I
> > can't
> > keep my sql server down and I would like to create plan where I can create
> > 2
> > server, load sql 2000..and if one fails, other will function.
> > I am looking for a suggestion what would be better solution if I should
> > use
> > SQL locad balance, cluster, or mirror my harddrive..
> > since the application will update my db, so i need to have both sql server
> > data shoud be same.. can someone suggests me if there is a article I can
> > find
> > in doing this...
> > would appreciate someone help..
> >
> > "Andrew J. Kelly" wrote:
> >
> >> If your system is read / write there really is no easy way to load
> >> balance
> >> SQL Server. Load balancing, HA and DR are different things and you need
> >> to
> >> be clear on what it is you want or need to do.
> >>
> >> --
> >> Andrew J. Kelly SQL MVP
> >>
> >>
> >> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> >> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
> >> > Hi,
> >> >
> >> > I am researching about best practice for SQL load balance.
> >> > can someone suggest if there's article out there would expalin in
> >> > details
> >> > doing the SQL 2000 load balcance.
> >> >
> >> > I am planning the future failover so it does not impact users
> >> > any suggestions would appreciate
> >> >
> >> >
> >>
> >>
> >>
>
>|||If you are asking if testing in VMWARE is a good test for the real thing I
can't say. But I would not want to base my decision on such a test. One of
the most important things in considering a cluster is to make sure all your
hardware, OS etc. is on the Hardware Compatibility List for Clustering
(HCLC). If not then you are at risk of the cluster not working properly.
--
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:138B7723-52D9-487B-BBD3-FCBC54407F1C@.microsoft.com...
> Thanks Andrew,
> I am researching on clustering the sql server. I will be using Vmware
> product to test the cluster enviornment. I have one more questions, The
> clustering the sql server stays stable in enviornment. does it have any
> pros
> or cons by doin in cluster enviornment
>
> "Andrew J. Kelly" wrote:
>> That is usually what a CLUSTER is for. It is a hardware failover
>> solution
>> in the event one server fails the shared db is moved over to the other
>> server and can be up and running in les than a few minutes. Another
>> solution is to use Log Shipping. All are outlined here:
>> http://www.microsoft.com/sql/techinfo/administration/2000/availability.mspx
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
>> news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...
>> > HI,
>> > My application reads/ writes to my sql server. Actaully, i am looking
>> > for
>> > a plan where in future to create a disaster recovery plan. as of now I
>> > can't
>> > keep my sql server down and I would like to create plan where I can
>> > create
>> > 2
>> > server, load sql 2000..and if one fails, other will function.
>> > I am looking for a suggestion what would be better solution if I should
>> > use
>> > SQL locad balance, cluster, or mirror my harddrive..
>> > since the application will update my db, so i need to have both sql
>> > server
>> > data shoud be same.. can someone suggests me if there is a article I
>> > can
>> > find
>> > in doing this...
>> > would appreciate someone help..
>> >
>> > "Andrew J. Kelly" wrote:
>> >
>> >> If your system is read / write there really is no easy way to load
>> >> balance
>> >> SQL Server. Load balancing, HA and DR are different things and you
>> >> need
>> >> to
>> >> be clear on what it is you want or need to do.
>> >>
>> >> --
>> >> Andrew J. Kelly SQL MVP
>> >>
>> >>
>> >> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
>> >> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
>> >> > Hi,
>> >> >
>> >> > I am researching about best practice for SQL load balance.
>> >> > can someone suggest if there's article out there would expalin in
>> >> > details
>> >> > doing the SQL 2000 load balcance.
>> >> >
>> >> > I am planning the future failover so it does not impact users
>> >> > any suggestions would appreciate
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>

Need suggestion for SQL 2000

Hi,
I am researching about best practice for SQL load balance.
can someone suggest if there's article out there would expalin in details
doing the SQL 2000 load balcance.
I am planning the future failover so it does not impact users
any suggestions would appreciateIf your system is read / write there really is no easy way to load balance
SQL Server. Load balancing, HA and DR are different things and you need to
be clear on what it is you want or need to do.
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
> Hi,
> I am researching about best practice for SQL load balance.
> can someone suggest if there's article out there would expalin in details
> doing the SQL 2000 load balcance.
> I am planning the future failover so it does not impact users
> any suggestions would appreciate
>|||HI,
My application reads/ writes to my sql server. Actaully, i am looking for
a plan where in future to create a disaster recovery plan. as of now I can't
keep my sql server down and I would like to create plan where I can create 2
server, load sql 2000..and if one fails, other will function.
I am looking for a suggestion what would be better solution if I should use
SQL locad balance, cluster, or mirror my harddrive..
since the application will update my db, so i need to have both sql server
data shoud be same.. can someone suggests me if there is a article I can fin
d
in doing this...
would appreciate someone help..
"Andrew J. Kelly" wrote:

> If your system is read / write there really is no easy way to load balance
> SQL Server. Load balancing, HA and DR are different things and you need t
o
> be clear on what it is you want or need to do.
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
>
>|||That is usually what a CLUSTER is for. It is a hardware failover solution
in the event one server fails the shared db is moved over to the other
server and can be up and running in les than a few minutes. Another
solution is to use Log Shipping. All are outlined here:
http://www.microsoft.com/sql/techin...ailability.mspx
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...[vbcol=seagreen]
> HI,
> My application reads/ writes to my sql server. Actaully, i am looking for
> a plan where in future to create a disaster recovery plan. as of now I
> can't
> keep my sql server down and I would like to create plan where I can create
> 2
> server, load sql 2000..and if one fails, other will function.
> I am looking for a suggestion what would be better solution if I should
> use
> SQL locad balance, cluster, or mirror my harddrive..
> since the application will update my db, so i need to have both sql server
> data shoud be same.. can someone suggests me if there is a article I can
> find
> in doing this...
> would appreciate someone help..
> "Andrew J. Kelly" wrote:
>|||Thanks Andrew,
I am researching on clustering the sql server. I will be using Vmware
product to test the cluster enviornment. I have one more questions, The
clustering the sql server stays stable in enviornment. does it have any pros
or cons by doin in cluster enviornment
"Andrew J. Kelly" wrote:

> That is usually what a CLUSTER is for. It is a hardware failover solution
> in the event one server fails the shared db is moved over to the other
> server and can be up and running in les than a few minutes. Another
> solution is to use Log Shipping. All are outlined here:
> [url]http://www.microsoft.com/sql/techinfo/administration/2000/availability.mspx[/url
]
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...
>
>|||If you are asking if testing in VMWARE is a good test for the real thing I
can't say. But I would not want to base my decision on such a test. One of
the most important things in considering a cluster is to make sure all your
hardware, OS etc. is on the hardware Compatibility List for Clustering
(HCLC). If not then you are at risk of the cluster not working properly.
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:138B7723-52D9-487B-BBD3-FCBC54407F1C@.microsoft.com...[vbcol=seagreen]
> Thanks Andrew,
> I am researching on clustering the sql server. I will be using Vmware
> product to test the cluster enviornment. I have one more questions, The
> clustering the sql server stays stable in enviornment. does it have any
> pros
> or cons by doin in cluster enviornment
>
> "Andrew J. Kelly" wrote:
>

Need suggestion for SQL 2000

Hi,
I am researching about best practice for SQL load balance.
can someone suggest if there's article out there would expalin in details
doing the SQL 2000 load balcance.
I am planning the future failover so it does not impact users
any suggestions would appreciate
If your system is read / write there really is no easy way to load balance
SQL Server. Load balancing, HA and DR are different things and you need to
be clear on what it is you want or need to do.
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
> Hi,
> I am researching about best practice for SQL load balance.
> can someone suggest if there's article out there would expalin in details
> doing the SQL 2000 load balcance.
> I am planning the future failover so it does not impact users
> any suggestions would appreciate
>
|||HI,
My application reads/ writes to my sql server. Actaully, i am looking for
a plan where in future to create a disaster recovery plan. as of now I can't
keep my sql server down and I would like to create plan where I can create 2
server, load sql 2000..and if one fails, other will function.
I am looking for a suggestion what would be better solution if I should use
SQL locad balance, cluster, or mirror my harddrive..
since the application will update my db, so i need to have both sql server
data shoud be same.. can someone suggests me if there is a article I can find
in doing this...
would appreciate someone help..
"Andrew J. Kelly" wrote:

> If your system is read / write there really is no easy way to load balance
> SQL Server. Load balancing, HA and DR are different things and you need to
> be clear on what it is you want or need to do.
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:2B38DF31-D847-4193-A761-2125AFD7AE6D@.microsoft.com...
>
>
|||That is usually what a CLUSTER is for. It is a hardware failover solution
in the event one server fails the shared db is moved over to the other
server and can be up and running in les than a few minutes. Another
solution is to use Log Shipping. All are outlined here:
http://www.microsoft.com/sql/techinf...ilability.mspx
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...[vbcol=seagreen]
> HI,
> My application reads/ writes to my sql server. Actaully, i am looking for
> a plan where in future to create a disaster recovery plan. as of now I
> can't
> keep my sql server down and I would like to create plan where I can create
> 2
> server, load sql 2000..and if one fails, other will function.
> I am looking for a suggestion what would be better solution if I should
> use
> SQL locad balance, cluster, or mirror my harddrive..
> since the application will update my db, so i need to have both sql server
> data shoud be same.. can someone suggests me if there is a article I can
> find
> in doing this...
> would appreciate someone help..
> "Andrew J. Kelly" wrote:
|||Thanks Andrew,
I am researching on clustering the sql server. I will be using Vmware
product to test the cluster enviornment. I have one more questions, The
clustering the sql server stays stable in enviornment. does it have any pros
or cons by doin in cluster enviornment
"Andrew J. Kelly" wrote:

> That is usually what a CLUSTER is for. It is a hardware failover solution
> in the event one server fails the shared db is moved over to the other
> server and can be up and running in les than a few minutes. Another
> solution is to use Log Shipping. All are outlined here:
> http://www.microsoft.com/sql/techinf...ilability.mspx
> --
> Andrew J. Kelly SQL MVP
>
> "Pooja" <Pooja@.discussions.microsoft.com> wrote in message
> news:AA498550-7F88-4E80-9800-CC0BEA00914E@.microsoft.com...
>
>
|||If you are asking if testing in VMWARE is a good test for the real thing I
can't say. But I would not want to base my decision on such a test. One of
the most important things in considering a cluster is to make sure all your
hardware, OS etc. is on the Hardware Compatibility List for Clustering
(HCLC). If not then you are at risk of the cluster not working properly.
Andrew J. Kelly SQL MVP
"Pooja" <Pooja@.discussions.microsoft.com> wrote in message
news:138B7723-52D9-487B-BBD3-FCBC54407F1C@.microsoft.com...[vbcol=seagreen]
> Thanks Andrew,
> I am researching on clustering the sql server. I will be using Vmware
> product to test the cluster enviornment. I have one more questions, The
> clustering the sql server stays stable in enviornment. does it have any
> pros
> or cons by doin in cluster enviornment
>
> "Andrew J. Kelly" wrote:
sql

Monday, March 12, 2012

Need permission to use bulk load statement in SQL 2005?

Hello,
I've developed a tool in Visual Basic.NET and have a local instance of SQL
Server 2005 running. This tool loads a lot of data into my database. It runs
locally just fine, but when I set it to load the data into the remote
(webhosting) database, I get an error: "You do not have permission to use th
e
bulk load statement."
Can anyone tell me what kind of permission that I need to use this
statement? Using a simple Insert state would take weeks and weeks to perform
the operation. The remote database at the hosting company has a bunch of SQL
Server 2005 databases on it. I'm sure that they won't want to give me admin
rights. Is there anyway that they can give us specifically rights to use a
bulk load statement without giving us access to all the other databases on
the server?
ThanksAdd the login to the bulkadmin fixed server role.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"John Riddle" <JohnRiddle@.discussions.microsoft.com> wrote in message
news:256E7437-06C4-4392-A5DA-C9DF50F70A58@.microsoft.com...
Hello,
I've developed a tool in Visual Basic.NET and have a local instance of SQL
Server 2005 running. This tool loads a lot of data into my database. It runs
locally just fine, but when I set it to load the data into the remote
(webhosting) database, I get an error: "You do not have permission to use
the
bulk load statement."
Can anyone tell me what kind of permission that I need to use this
statement? Using a simple Insert state would take weeks and weeks to perform
the operation. The remote database at the hosting company has a bunch of SQL
Server 2005 databases on it. I'm sure that they won't want to give me admin
rights. Is there anyway that they can give us specifically rights to use a
bulk load statement without giving us access to all the other databases on
the server?
Thanks

Monday, February 20, 2012

Need help with XML Bulk Load

I have a source xml file which I think is fairly complex. It s an EDIFACT
D96A INVRPT file.
I just need to bring the data within into a single table
CREATE TABLE InventoryOnHand (
InventoryDate nvarchar(10) DEFAULT (getdate()),
Barcode nvarchar(50),
Quantity float,
Warehouse nvarchar(50)
)
I've been fiddling with creating a schema to read the data, but I keep
getting various errors.
If anyone wants to help, let me know & I'll email you a sample source file
and my attempts at a schema. I'm getting desperate - I've spent so many
hours mucking around I'm at the end of my tether, so any assistance is
greatly appreciated!
cheers
DannyPlease send me your files and I'll take a look.
Regards,
--
Monica Frintu
"dc" wrote:

> I have a source xml file which I think is fairly complex. It s an EDIFACT
> D96A INVRPT file.
> I just need to bring the data within into a single table
> CREATE TABLE InventoryOnHand (
> InventoryDate nvarchar(10) DEFAULT (getdate()),
> Barcode nvarchar(50),
> Quantity float,
> Warehouse nvarchar(50)
> )
> I've been fiddling with creating a schema to read the data, but I keep
> getting various errors.
> If anyone wants to help, let me know & I'll email you a sample source file
> and my attempts at a schema. I'm getting desperate - I've spent so many
> hours mucking around I'm at the end of my tether, so any assistance is
> greatly appreciated!
> cheers
> Danny
>
>|||Monica,
Thanks for your offer. You can you ensure your email address is correct -
I'm getting NDRs.
cheers
Danny
dannyc@.accolade.com.au
"Monica Frintu [MSFT]" <MonicaFrintuMSFT@.discussions.microsoft.com> wrote in
message news:66FD8513-C76B-48B1-80AC-7BD50ED994F1@.microsoft.com...
> Please send me your files and I'll take a look.
> Regards,
> --
> Monica Frintu
>
> "dc" wrote:
>|||Monica,
This might help instead
My table is thus:
CREATE TABLE AA_InventoryOnHand (
InventoryDate nvarchar(10),
Barcode nvarchar(50) ,
Quantity float
)
My sample XML file is long, but copying to notepad and saving as
V3_INVRPT.XML should help someone to diagnose. Go down to the
============== line
<?xml version="1.0" encoding="UTF-8"?>
<EDIFACT_D96A_INVRPT xmlns="http://holoncorp.com/xml/EDIFACT/D96A/INVRPT"
xmlns:v3="http://holoncorp.com/xml/EDIFACT/D96A/INVRPT">
<UNB UNB010_0001_syntaxIndentifier="UNOA" UNB010_0002_syntaxVersion="3"
UNB020_0004_senderIdentification="VISA Sydney"
UNB020_0007_partnerIdentificationCodeQua
lifier="ZZ"
UNB030_0007_partnerIdentificationCodeQua
lifier="ZZ"
UNB030_0010_recipientIdentification="Barilla"
UNB040_0017_dateOfPreparation="070510" UNB040_0019_timeOfPreparation="1017"
UNB050_0020_interchangeControlReference=
"1020"/>
<INVRPT>
<UNH UNH010_0062_referenceNumber="0001" UNH020_0051_controllingAgency="UN"
UNH020_0052_versionNumber="D" UNH020_0054_releaseNumber="96A"
UNH020_0057_associationAssignedCode="EAN005"
UNH020_0065_typeIdentifier="INVRPT"/>
<BGM BGM010_1001_messageName="35" BGM020_1004_messageNumber="1020"
BGM030_1225_messageFunction="9"/>
<DTM DTM010_2005_dateTimePeriodQualifier="366"
DTM010_2379_dateTimePeriodFormatQualifie
r="102"
DTM010_2380_dateTimePeriod="20070510"/>
<GRP2>
<NAD NAD010_3035_partyQualifier="GY" NAD020_3039_partyIdIdentification="VISA
Sydney" NAD020_3055_codeListResponsibleAgency="86"/>
<GRP4>
<CTA CTA010_3139_contactFunctionCode="WH"
CTA020_3412_departmentOrEmployeeName="Jim Vikas"/>
<COM COM010_3148_communicationAddressIdentifi
er=""
COM020_3155_communicationAddressQualifie
r="TE"/>
<COM COM010_3148_communicationAddressIdentifi
er=""
COM020_3155_communicationAddressQualifie
r="EM"/>
</GRP4>
</GRP2>
<GRP2>
<NAD NAD010_3035_partyQualifier="GM"
NAD020_3039_partyIdIdentification="Cantarella"
NAD020_3055_codeListResponsibleAgency="86"/>
</GRP2>
<GRP9>
<LIN LIN030_7140_itemNumber="841158000029"
LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="144" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="841158000043"
LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="166" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="2" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="AZZURRA" LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="1000" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="30" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="fab" LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="10" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="1" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
<GIN GIN010_7405_identityNumberQualifier="BX"
GIN020_7402_identityNumberRange="13"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="fab" LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="100" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="20" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
<GIN GIN010_7405_identityNumberQualifier="BX"
GIN020_7402_identityNumberRange="12"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="INSTANT" LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="1000" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="30" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="KING OSCAR"
LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="1000" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="40" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<GRP9>
<LIN LIN030_7140_itemNumber="sard brisling"
LIN030_7143_itemNumberTypeCode="EN"/>
<GRP12>
<INV INV040_4503_inventoryBalanceMethodCode="1"/>
<QTY QTY010_6060_quantity="1000" QTY010_6063_quantityQualifier="17"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="30" QTY010_6063_quantityQualifier="170"
QTY010_6411_measurementUnitCode="EA"/>
<QTY QTY010_6060_quantity="0" QTY010_6063_quantityQualifier="253"
QTY010_6411_measurementUnitCode="EA"/>
</GRP12>
</GRP9>
<UNT UNT010_0074_numberOfSegments="54" UNT020_0062_referenceNumber="0001"/>
</INVRPT>
<UNZ UNZ010_0020_interchangeControlReference=
"1020"
UNZ010_0036_interchangeControlCount="1"/>
</EDIFACT_D96A_INVRPT>
=======================
And here is the schema file I've written.
<?xml version="1.0" ?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:xml:datatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >
<ElementType name="EDIFACT_D96A_INVRPT" sql:is-constant="1">
<element type="UNB" />
<element type="LIN" />
<element type="QTY" />
</ElementType>
<ElementType name="UNB" sql:relation="AA_InventoryOnHand" >
<AttributeType name="UNB040_0017_dateOfPreparation" dt:type="string"
/>
<attribute type="UNB040_0017_dateOfPreparation"
sql:field="InventoryDate" />
</ElementType>
<ElementType name="LIN" sql:relation="AA_InventoryOnHand" >
<AttributeType name="LIN030_7140_itemNumber" dt:type="string" />
<attribute type="LIN030_7140_itemNumber" sql:field="Barcode" />
</ElementType>
<ElementType name="QTY" sql:relation="AA_InventoryOnHand" >
<AttributeType name="QTY010_6060_quantity" dt:type="float" />
<attribute type="QTY010_6060_quantity" sql:field="Quantity" />
</ElementType>
</Schema>
==============================
And here's a vbs file I'm running
Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data
source=DANNYCVM;database=MyDemoDB;uid=sa
;pwd=MysaPassword"
objBL.ErrorLogFile = "c:\error.log"
objBL.Execute "c:\Invmapping.xml", "c:\V3_INVRPT.xml"
Set objBL = Nothing
=============================
The table should be populated thus:
070510 841158000029 144
070510 841158000043 166
070510 841158000043 2
etc
"dc" <dannyc@.accoalde.com.au> wrote in message
news:uns4XWxkHHA.1624@.TK2MSFTNGP06.phx.gbl...
>I have a source xml file which I think is fairly complex. It s an EDIFACT
>D96A INVRPT file.
> I just need to bring the data within into a single table
> CREATE TABLE InventoryOnHand (
> InventoryDate nvarchar(10) DEFAULT (getdate()),
> Barcode nvarchar(50),
> Quantity float,
> Warehouse nvarchar(50)
> )
> I've been fiddling with creating a schema to read the data, but I keep
> getting various errors.
> If anyone wants to help, let me know & I'll email you a sample source file
> and my attempts at a schema. I'm getting desperate - I've spent so many
> hours mucking around I'm at the end of my tether, so any assistance is
> greatly appreciated!
> cheers
> Danny
>