Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Wednesday, March 21, 2012

Scheduled SSIS

Hello all,

I was very familiar in creating quite complex DTS packages in SQL2000. Now with 2007 that is all gone. I looked at the command line utility and it's UI counter part but these are just for executing. I keep getting references to the SSIS designer but I can't find where it is.

Can someone point me in the right direction?

Thanks,

Jesse

So, dtsrun.exe has now become dtexec.exe and it's counterpart on the UI is dtexecui.exe. The UI you see in the UI there is the same type of ui you'll see in the SQL Server Agent job. You'll just simply need to select SQL Server Integration Services for the step type and you'll get the same screens.

Brian

|||The designer components is installed when you select Client/Workstation components during SQL Setup. Run SQL Server Business Intelligence Development Studio, create new Integration Services project, now you have a package to design.|||

Yes I did that but when I open SQL Server Business Intelligence Development Studio it just looks like a standard visual basic studio that there is nothing under new projects that says intergration services project.

Do I just have a bad install maybe?

|||BIDS is a standard Visual Studio, but in the New Project dialog it should contain Business Intelligence Projects folder, with Integration Services Project in it.|||

I found it!

I feal incredably greatfull to everyone that helped and incredably stupid for not spoting earlier.

Thank you all.

Scheduled SSIS

Hello all,

I was very familiar in creating quite complex DTS packages in SQL2000. Now with 2007 that is all gone. I looked at the command line utility and it's UI counter part but these are just for executing. I keep getting references to the SSIS designer but I can't find where it is.

Can someone point me in the right direction?

Thanks,

Jesse

So, dtsrun.exe has now become dtexec.exe and it's counterpart on the UI is dtexecui.exe. The UI you see in the UI there is the same type of ui you'll see in the SQL Server Agent job. You'll just simply need to select SQL Server Integration Services for the step type and you'll get the same screens.

Brian

|||The designer components is installed when you select Client/Workstation components during SQL Setup. Run SQL Server Business Intelligence Development Studio, create new Integration Services project, now you have a package to design.|||

Yes I did that but when I open SQL Server Business Intelligence Development Studio it just looks like a standard visual basic studio that there is nothing under new projects that says intergration services project.

Do I just have a bad install maybe?

|||BIDS is a standard Visual Studio, but in the New Project dialog it should contain Business Intelligence Projects folder, with Integration Services Project in it.|||

I found it!

I feal incredably greatfull to everyone that helped and incredably stupid for not spoting earlier.

Thank you all.

sql

Scheduled reports never run

I can run reports in Report Manager, but none of the subscriptions I set up
ever run. I have tried creating subscriptions that run both at a preset
time and according to a shared schedule. In the ReportServerService log
files, I see that polling of various types is initiated but nothing after
that. The Cleanup runs every 10 minutes but nothing elese does. See log
file below:
ReportingServicesService!resourceutilities!17c!6/23/2004-07:27:56:: i INFO:
Reporting Services starting SKU: Developer
ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
Running Requests Scavenger timer enabled: Cycle: 60 seconds
ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
Running Requests DB timer enabled: Cycle: 60 seconds
ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
Execution Log Entry Expiration timer enabled: Cycle: 66723 seconds
ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO: Memory
stats update timer enabled: Cycle: 60 seconds
ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
Initializing crypto as user: Proposion\Steve
ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Exporting
public key
ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Performing
sku validation
ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Importing
existing encryption key
ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57:: EventPolling
polling service started
ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
NotificationPolling polling service started
ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57:: SchedulePolling
polling service started
ReportingServicesService!dbpolling!ef0!6/23/2004-07:27:57:: EventPolling
heartbeat thread started.
ReportingServicesService!dbpolling!e04!6/23/2004-07:27:57::
NotificationPolling heartbeat thread started.
ReportingServicesService!dbpolling!f84!6/23/2004-07:27:57:: Polling started
ReportingServicesService!library!17c!6/23/2004-07:46:09:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 0 running jobs
ReportingServicesService!library!17c!6/23/2004-07:56:06:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 0 running jobs
ReportingServicesService!library!17c!6/23/2004-08:06:06:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 0 running jobs
Shouldn't there at least be an indication that events are triggered and why
reports can't run?
Interestingly, if I look at the Shared Schedules in Report Manager and the
"Next Run" shows the expected time (which has now elapsed) but the "Last
Run" still says "Never Run".
I have tries restarting SQLSERVERAGENT and Reporting Service services, as
well as completely rebooting.
Thanks for your help!Is there an error listed on the job in JOBS on the SQL server? And if so what are they?
"Stephen Walch" <swalch@.proposion.com> wrote in message news:eqzhZkTWEHA.4092@.TK2MSFTNGP11.phx.gbl...
> I can run reports in Report Manager, but none of the subscriptions I set up
> ever run. I have tried creating subscriptions that run both at a preset
> time and according to a shared schedule. In the ReportServerService log
> files, I see that polling of various types is initiated but nothing after
> that. The Cleanup runs every 10 minutes but nothing elese does. See log
> file below:
> ReportingServicesService!resourceutilities!17c!6/23/2004-07:27:56:: i INFO:
> Reporting Services starting SKU: Developer
> ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
> ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> Running Requests Scavenger timer enabled: Cycle: 60 seconds
> ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> Running Requests DB timer enabled: Cycle: 60 seconds
> ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> Execution Log Entry Expiration timer enabled: Cycle: 66723 seconds
> ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO: Memory
> stats update timer enabled: Cycle: 60 seconds
> ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> Initializing crypto as user: Proposion\Steve
> ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Exporting
> public key
> ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Performing
> sku validation
> ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO: Importing
> existing encryption key
> ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57:: EventPolling
> polling service started
> ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
> NotificationPolling polling service started
> ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57:: SchedulePolling
> polling service started
> ReportingServicesService!dbpolling!ef0!6/23/2004-07:27:57:: EventPolling
> heartbeat thread started.
> ReportingServicesService!dbpolling!e04!6/23/2004-07:27:57::
> NotificationPolling heartbeat thread started.
> ReportingServicesService!dbpolling!f84!6/23/2004-07:27:57:: Polling started
> ReportingServicesService!library!17c!6/23/2004-07:46:09:: i INFO: Cleaned 0
> batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> chunks, 0 running jobs
> ReportingServicesService!library!17c!6/23/2004-07:56:06:: i INFO: Cleaned 0
> batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> chunks, 0 running jobs
> ReportingServicesService!library!17c!6/23/2004-08:06:06:: i INFO: Cleaned 0
> batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> chunks, 0 running jobs
>
> Shouldn't there at least be an indication that events are triggered and why
> reports can't run?
> Interestingly, if I look at the Shared Schedules in Report Manager and the
> "Next Run" shows the expected time (which has now elapsed) but the "Last
> Run" still says "Never Run".
> I have tries restarting SQLSERVERAGENT and Reporting Service services, as
> well as completely rebooting.
> Thanks for your help!
>|||I see no files listed in the "C:\Program Files\Microsoft SQL
Server\MSSQL\JOBS" directory, if that is what you mean. (Sorry I am rather
new to SQL server.)
-Steve
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
news:e%23btTsTWEHA.3120@.TK2MSFTNGP12.phx.gbl...
> Is there an error listed on the job in JOBS on the SQL server? And if so
what are they?
> "Stephen Walch" <swalch@.proposion.com> wrote in message
news:eqzhZkTWEHA.4092@.TK2MSFTNGP11.phx.gbl...
> > I can run reports in Report Manager, but none of the subscriptions I set
up
> > ever run. I have tried creating subscriptions that run both at a preset
> > time and according to a shared schedule. In the ReportServerService log
> > files, I see that polling of various types is initiated but nothing
after
> > that. The Cleanup runs every 10 minutes but nothing elese does. See log
> > file below:
> >
> > ReportingServicesService!resourceutilities!17c!6/23/2004-07:27:56:: i
INFO:
> > Reporting Services starting SKU: Developer
> > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
> > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > Running Requests Scavenger timer enabled: Cycle: 60 seconds
> > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > Running Requests DB timer enabled: Cycle: 60 seconds
> > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > Execution Log Entry Expiration timer enabled: Cycle: 66723 seconds
> > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
Memory
> > stats update timer enabled: Cycle: 60 seconds
> > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> > Initializing crypto as user: Proposion\Steve
> > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
Exporting
> > public key
> > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
Performing
> > sku validation
> > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
Importing
> > existing encryption key
> > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
EventPolling
> > polling service started
> > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
> > NotificationPolling polling service started
> > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
SchedulePolling
> > polling service started
> > ReportingServicesService!dbpolling!ef0!6/23/2004-07:27:57:: EventPolling
> > heartbeat thread started.
> > ReportingServicesService!dbpolling!e04!6/23/2004-07:27:57::
> > NotificationPolling heartbeat thread started.
> > ReportingServicesService!dbpolling!f84!6/23/2004-07:27:57:: Polling
started
> > ReportingServicesService!library!17c!6/23/2004-07:46:09:: i INFO:
Cleaned 0
> > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > chunks, 0 running jobs
> > ReportingServicesService!library!17c!6/23/2004-07:56:06:: i INFO:
Cleaned 0
> > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > chunks, 0 running jobs
> > ReportingServicesService!library!17c!6/23/2004-08:06:06:: i INFO:
Cleaned 0
> > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > chunks, 0 running jobs
> >
> >
> > Shouldn't there at least be an indication that events are triggered and
why
> > reports can't run?
> >
> > Interestingly, if I look at the Shared Schedules in Report Manager and
the
> > "Next Run" shows the expected time (which has now elapsed) but the "Last
> > Run" still says "Never Run".
> >
> > I have tries restarting SQLSERVERAGENT and Reporting Service services,
as
> > well as completely rebooting.
> >
> > Thanks for your help!
> >
> >
>|||If you go into Enterprise Manager and then:
Management -> SQL Server Agent -> Jobs there will be a list of all the jobs on your server (SQL Server Agent is like a daemon that
runs in the backgroup and runs timed tasks on the server, this is what reporting services uses to kick off reports that are on a
schedule)
One you see all the jobs you will find out that all your reporting services schedules are a mixture of letters and numbers. If you
look in the "Last Run Status" column you should see one with "Failed" (You can sort out the list by clicking on the "category" title
and looking where "Report Server" is entered. Right click on your failed job and choose "View job History". Then check the "Show
step details" box on the top right of the dialog box.
You can then click on the steps and get the server messages for that step (if any). Any error message information will be stored
there.
"Stephen Walch" <swalch@.proposion.com> wrote in message news:%23Jb%23yAVWEHA.3944@.tk2msftngp13.phx.gbl...
> I see no files listed in the "C:\Program Files\Microsoft SQL
> Server\MSSQL\JOBS" directory, if that is what you mean. (Sorry I am rather
> new to SQL server.)
> -Steve
> "Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
> news:e%23btTsTWEHA.3120@.TK2MSFTNGP12.phx.gbl...
> > Is there an error listed on the job in JOBS on the SQL server? And if so
> what are they?
> >
> > "Stephen Walch" <swalch@.proposion.com> wrote in message
> news:eqzhZkTWEHA.4092@.TK2MSFTNGP11.phx.gbl...
> > > I can run reports in Report Manager, but none of the subscriptions I set
> up
> > > ever run. I have tried creating subscriptions that run both at a preset
> > > time and according to a shared schedule. In the ReportServerService log
> > > files, I see that polling of various types is initiated but nothing
> after
> > > that. The Cleanup runs every 10 minutes but nothing elese does. See log
> > > file below:
> > >
> > > ReportingServicesService!resourceutilities!17c!6/23/2004-07:27:56:: i
> INFO:
> > > Reporting Services starting SKU: Developer
> > > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > > Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
> > > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > > Running Requests Scavenger timer enabled: Cycle: 60 seconds
> > > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > > Running Requests DB timer enabled: Cycle: 60 seconds
> > > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> > > Execution Log Entry Expiration timer enabled: Cycle: 66723 seconds
> > > ReportingServicesService!runningjobs!17c!6/23/2004-07:27:56:: i INFO:
> Memory
> > > stats update timer enabled: Cycle: 60 seconds
> > > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> > > Initializing crypto as user: Proposion\Steve
> > > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> Exporting
> > > public key
> > > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> Performing
> > > sku validation
> > > ReportingServicesService!crypto!d88!6/23/2004-07:27:57:: i INFO:
> Importing
> > > existing encryption key
> > > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
> EventPolling
> > > polling service started
> > > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
> > > NotificationPolling polling service started
> > > ReportingServicesService!dbpolling!d88!06/23/2004-07:27:57::
> SchedulePolling
> > > polling service started
> > > ReportingServicesService!dbpolling!ef0!6/23/2004-07:27:57:: EventPolling
> > > heartbeat thread started.
> > > ReportingServicesService!dbpolling!e04!6/23/2004-07:27:57::
> > > NotificationPolling heartbeat thread started.
> > > ReportingServicesService!dbpolling!f84!6/23/2004-07:27:57:: Polling
> started
> > > ReportingServicesService!library!17c!6/23/2004-07:46:09:: i INFO:
> Cleaned 0
> > > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > > chunks, 0 running jobs
> > > ReportingServicesService!library!17c!6/23/2004-07:56:06:: i INFO:
> Cleaned 0
> > > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > > chunks, 0 running jobs
> > > ReportingServicesService!library!17c!6/23/2004-08:06:06:: i INFO:
> Cleaned 0
> > > batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> > > chunks, 0 running jobs
> > >
> > >
> > > Shouldn't there at least be an indication that events are triggered and
> why
> > > reports can't run?
> > >
> > > Interestingly, if I look at the Shared Schedules in Report Manager and
> the
> > > "Next Run" shows the expected time (which has now elapsed) but the "Last
> > > Run" still says "Never Run".
> > >
> > > I have tries restarting SQLSERVERAGENT and Reporting Service services,
> as
> > > well as completely rebooting.
> > >
> > > Thanks for your help!
> > >
> > >
> >
> >
>sql

Tuesday, March 20, 2012

Scheduled Jobs

When creating a scheduled job is it possible to output the file to a shared drive on the network
When browsing for file location whien creating the job only local physical drives are shown and when inputting unc share the job fails
any ideas ?If you know the name/IP address of the network file then you can output the file by using:

\\servername\d$\data\filename.dat

where 'd$' is the drive you're writing to on that server.

(NB This doesn't work if you are doing any file handling using the Scripting Runtime DLL through T-SQL)

Monday, March 12, 2012

Scheduled DTS import and Delete Query

Hi there,
I am new to SQL Server, we are running SQL Server 7
I am having some trouble with creating a delete query.
Basically, i have developed a Access database that exports data to a .csv
file, to be imported to SQL server via a scheduled DTS package.
Most of the .csv files will only have new data to ammend to the SQL tables
which is fine doing the above.
But some of the .csv files have the entire data dump of the Access table and
needs to imported over the current data in the SQL table.
What i was thinking was to make a Query/View to delete the data in the
relevant table and then call the DTS package.
I have no idea how to do this - View? Stored Procedure?
But ideally it would delete the data and then call the DTS package, all in
one function.....
Also, would it then be possible to schedule/automate this service?
Thanks for any help
Regards
GuyOK
Reimporting all the data is fine if you have
A. No constraints reliant on the data
B. Your quantity of data is not too large
Personally I would do things like this
1. Have a working table in a staging area to hold each CSV.
2. Import each CSV into their respective staging table
3. Use TSQL statements to compare the working table data with that is in
your destination tables. By comparing Key values you can determine whether
the Data in the real tables requires
1. Adding
2. Updating
3. Deleteing.
As for scheduling then yes you can do this using SQL Server Agent and a Job.
Be careful to read this though
http://support.microsoft.com/?kbid=269074
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Guy Hocking" <guy.hocking@.bradflack.com> wrote in message
news:O6KLUlnsDHA.2244@.TK2MSFTNGP09.phx.gbl...
> Hi there,
> I am new to SQL Server, we are running SQL Server 7
> I am having some trouble with creating a delete query.
> Basically, i have developed a Access database that exports data to a .csv
> file, to be imported to SQL server via a scheduled DTS package.
> Most of the .csv files will only have new data to ammend to the SQL tables
> which is fine doing the above.
> But some of the .csv files have the entire data dump of the Access table
and
> needs to imported over the current data in the SQL table.
> What i was thinking was to make a Query/View to delete the data in the
> relevant table and then call the DTS package.
> I have no idea how to do this - View? Stored Procedure?
> But ideally it would delete the data and then call the DTS package, all in
> one function.....
> Also, would it then be possible to schedule/automate this service?
> Thanks for any help
> Regards
> Guy
>|||In article <O6KLUlnsDHA.2244@.TK2MSFTNGP09.phx.gbl>, Guy Hocking
<guy.hocking@.bradflack.com> writes
>Hi there,
>I am new to SQL Server, we are running SQL Server 7
>I am having some trouble with creating a delete query.
>Basically, i have developed a Access database that exports data to a .csv
>file, to be imported to SQL server via a scheduled DTS package.
>Most of the .csv files will only have new data to ammend to the SQL tables
>which is fine doing the above.
>But some of the .csv files have the entire data dump of the Access table and
>needs to imported over the current data in the SQL table.
>What i was thinking was to make a Query/View to delete the data in the
>relevant table and then call the DTS package.
>I have no idea how to do this - View? Stored Procedure?
>But ideally it would delete the data and then call the DTS package, all in
>one function.....
>Also, would it then be possible to schedule/automate this service?
>Thanks for any help
>Regards
>Guy
>
You can use the Execute SQL Task to run a Delete statement on your
table. Just link this with workflow to run before your the export
(DataPump) task. You will need to open the package manually to add this,
if still using the Wizard only.
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org|||Thanks for that Allan,
I dont think the amount of data isnt too much (how much is too much?), and i
would rather to all the guinea-pig work in Access. The data is currently
exported into another table in Access with the same naming convention and
design as its SQL equivalent, then the data is exporeted to CSV, once done
the data is tagged in access so it is not exported again.
However, some of the tables will be very different as the data will change
frequently, it seems alot easier to re-import as its only 30-40k of records,
nothing monsterous and it doesnt take an age as iv tested it.
This difficulty is i have no idea where to write the query? view, stored
procedure, i really dont know........i cant seem to create a "delete"
function view, it only seems to do the SELECT function.
I am very new to SQL, so i apoligise for my ignorance
Guy
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:Or4GN9nsDHA.536@.tk2msftngp13.phx.gbl...
> OK
> Reimporting all the data is fine if you have
> A. No constraints reliant on the data
> B. Your quantity of data is not too large
> Personally I would do things like this
> 1. Have a working table in a staging area to hold each CSV.
> 2. Import each CSV into their respective staging table
> 3. Use TSQL statements to compare the working table data with that is in
> your destination tables. By comparing Key values you can determine
whether
> the Data in the real tables requires
> 1. Adding
> 2. Updating
> 3. Deleteing.
> As for scheduling then yes you can do this using SQL Server Agent and a
Job.
> Be careful to read this though
> http://support.microsoft.com/?kbid=269074
>
>
> --
> --
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
> www.SQLDTS.com
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "Guy Hocking" <guy.hocking@.bradflack.com> wrote in message
> news:O6KLUlnsDHA.2244@.TK2MSFTNGP09.phx.gbl...
> > Hi there,
> >
> > I am new to SQL Server, we are running SQL Server 7
> > I am having some trouble with creating a delete query.
> >
> > Basically, i have developed a Access database that exports data to a
.csv
> > file, to be imported to SQL server via a scheduled DTS package.
> > Most of the .csv files will only have new data to ammend to the SQL
tables
> > which is fine doing the above.
> > But some of the .csv files have the entire data dump of the Access table
> and
> > needs to imported over the current data in the SQL table.
> >
> > What i was thinking was to make a Query/View to delete the data in the
> > relevant table and then call the DTS package.
> > I have no idea how to do this - View? Stored Procedure?
> > But ideally it would delete the data and then call the DTS package, all
in
> > one function.....
> >
> > Also, would it then be possible to schedule/automate this service?
> >
> > Thanks for any help
> >
> > Regards
> >
> > Guy
> >
> >
>|||ok allsorted, thanks ever so much 4 your help
Kind regards
guy
"Darren Green" <darren.green@.reply-to-newsgroup-only.uk.com> wrote in
message news:HF+FI9EP4ew$Ewl9@.sqldts.com...
> In article <O6KLUlnsDHA.2244@.TK2MSFTNGP09.phx.gbl>, Guy Hocking
> <guy.hocking@.bradflack.com> writes
> >Hi there,
> >
> >I am new to SQL Server, we are running SQL Server 7
> >I am having some trouble with creating a delete query.
> >
> >Basically, i have developed a Access database that exports data to a .csv
> >file, to be imported to SQL server via a scheduled DTS package.
> >Most of the .csv files will only have new data to ammend to the SQL
tables
> >which is fine doing the above.
> >But some of the .csv files have the entire data dump of the Access table
and
> >needs to imported over the current data in the SQL table.
> >
> >What i was thinking was to make a Query/View to delete the data in the
> >relevant table and then call the DTS package.
> >I have no idea how to do this - View? Stored Procedure?
> >But ideally it would delete the data and then call the DTS package, all
in
> >one function.....
> >
> >Also, would it then be possible to schedule/automate this service?
> >
> >Thanks for any help
> >
> >Regards
> >
> >Guy
> >
> You can use the Execute SQL Task to run a Delete statement on your
> table. Just link this with workflow to run before your the export
> (DataPump) task. You will need to open the package manually to add this,
> if still using the Wizard only.
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>|||OK
Too much is if it takes too long. Too long is business driven.
In my solution I would advocate inserting ALL records into the staging area
tables and then using ExecuteSQL tasks to do the
INSERT, UPDATE, DELETE queries.
--
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Guy Hocking" <guy.hocking@.bradflack.com> wrote in message
news:O4KsyCosDHA.2208@.TK2MSFTNGP10.phx.gbl...
> Thanks for that Allan,
> I dont think the amount of data isnt too much (how much is too much?), and
i
> would rather to all the guinea-pig work in Access. The data is currently
> exported into another table in Access with the same naming convention and
> design as its SQL equivalent, then the data is exporeted to CSV, once done
> the data is tagged in access so it is not exported again.
> However, some of the tables will be very different as the data will change
> frequently, it seems alot easier to re-import as its only 30-40k of
records,
> nothing monsterous and it doesnt take an age as iv tested it.
> This difficulty is i have no idea where to write the query? view, stored
> procedure, i really dont know........i cant seem to create a "delete"
> function view, it only seems to do the SELECT function.
> I am very new to SQL, so i apoligise for my ignorance
> Guy
>
>
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:Or4GN9nsDHA.536@.tk2msftngp13.phx.gbl...
> > OK
> >
> > Reimporting all the data is fine if you have
> >
> > A. No constraints reliant on the data
> > B. Your quantity of data is not too large
> >
> > Personally I would do things like this
> >
> > 1. Have a working table in a staging area to hold each CSV.
> > 2. Import each CSV into their respective staging table
> > 3. Use TSQL statements to compare the working table data with that is
in
> > your destination tables. By comparing Key values you can determine
> whether
> > the Data in the real tables requires
> >
> > 1. Adding
> > 2. Updating
> > 3. Deleteing.
> >
> > As for scheduling then yes you can do this using SQL Server Agent and a
> Job.
> > Be careful to read this though
> >
> > http://support.microsoft.com/?kbid=269074
> >
> >
> >
> >
> > --
> >
> > --
> > Allan Mitchell (Microsoft SQL Server MVP)
> > MCSE,MCDBA
> > www.SQLDTS.com
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> >
> >
> > "Guy Hocking" <guy.hocking@.bradflack.com> wrote in message
> > news:O6KLUlnsDHA.2244@.TK2MSFTNGP09.phx.gbl...
> > > Hi there,
> > >
> > > I am new to SQL Server, we are running SQL Server 7
> > > I am having some trouble with creating a delete query.
> > >
> > > Basically, i have developed a Access database that exports data to a
> .csv
> > > file, to be imported to SQL server via a scheduled DTS package.
> > > Most of the .csv files will only have new data to ammend to the SQL
> tables
> > > which is fine doing the above.
> > > But some of the .csv files have the entire data dump of the Access
table
> > and
> > > needs to imported over the current data in the SQL table.
> > >
> > > What i was thinking was to make a Query/View to delete the data in the
> > > relevant table and then call the DTS package.
> > > I have no idea how to do this - View? Stored Procedure?
> > > But ideally it would delete the data and then call the DTS package,
all
> in
> > > one function.....
> > >
> > > Also, would it then be possible to schedule/automate this service?
> > >
> > > Thanks for any help
> > >
> > > Regards
> > >
> > > Guy
> > >
> > >
> >
> >
>