|
Hi, thanks for the kind words!
For SQLAzureMWBatchUpload, the file that has all of the info is the file created by SQLAzureMW or SQLAzureMWBatchBackup.
All you have to do is point SQLAzureMWBatchUpload to the file i.e.:
<add
key="FileToProcess"
value="C:\SQLAzureMW\BCPData\23-May-2011 1601\HousingDB.sql"/>
If you open up the sql file (in my case HousingDB.sql), you will see toward the bottom a list of BCPArgs (commented out).
This is the actual BCP command, I just trap “-- BCPArgs:9:” and replace
it with BCP.EXE. Note that the 9 in this case shows the number of records in the file.
Example of sql file:
SET
ANSI_NULLS ON
SET
QUOTED_IDENTIFIER ON
IF
NOT EXISTS
(SELECT
* FROM sys.objects
WHERE object_id
= OBJECT_ID(N'[dbo].[zctaState]')
AND type
in (N'U'))
BEGIN
CREATE
TABLE [dbo].[zctaState](
[state_code] [char](2)
COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL,
[state_name] [varchar](20)
COLLATE SQL_Latin1_General_CP1_CI_AS
NULL,
[fips_code] [char](2)
COLLATE SQL_Latin1_General_CP1_CI_AS
NULL,
PRIMARY
KEY CLUSTERED
(
[state_code] ASC
)WITH
(STATISTICS_NORECOMPUTE
= OFF,
IGNORE_DUP_KEY =
OFF)
)
END
GO
-- BCPArgs:9:[dbo].[AcquiredAssetNew] in "c:\SQLAzureMW\BCPData\23-May-2011 1601\dbo.AcquiredAssetNew.dat" -E -n -b 10000 -a 16384
GO
-- BCPArgs:4:[dbo].[route] in "c:\SQLAzureMW\BCPData\23-May-2011 1601\dbo.route.dat" -E -n -b 10000 -a 16384
GO
-- BCPArgs:24:[dbo].[site] in "c:\SQLAzureMW\BCPData\23-May-2011 1601\dbo.site.dat" -E -n -b 10000 -a 16384
You will note in the BCPArgs, that the pointer to your dat file is there.
Does this help?
Everything you need in schema and BCP commands should be in your saved SQL file.
Let me know if you have any questions.
Regards,
George
|