Link to home
Start Free TrialLog in
Avatar of Amien90
Amien90

asked on

SQL Server Enterprise Manager --> Job Scheduling --> Export Output SQL-Query to File

how can i do this .. i know there is job scheduling .. but that option doenst give the possibily to choose between export formats .. i need lets say an export of a certain table (query) every day in a excel file or csv file..

right-click gives me the option to export the complete table .. but not schedules and not a certain query ..

Also in SQL Server Agent/Jobs/Add Job .. i dont know where to select an output file..

thanks in advanced



Avatar of James Murrell
James Murrell
Flag of United Kingdom of Great Britain and Northern Ireland image

in EM you can right click on the table you want to export, All tasks > Export Data - and the DTS Manager pops up and allows you to export in many formats, it will guide you through what to export, and when

What is the version of MS SQL Server are you using? It seems you need DTS or SSIS.
Right-click gives you the option to export the complete table/view or Use Query, at the end of the wizard you have the option to save the DTS or the SSIS then you right click on the DTS or SSIS and  .. but not schedules and not a certain query to do an Schedule Package in 2000 or in 2005/2008 in agent wizard will allow you to select the SQL server Integration Service Package.
If you are using Reporting Services it could be a nice solution using subscriptions.

Correction:
What is the version of MS SQL Server are you using? It seems you need DTS or SSIS.
Right-click gives you the option to export the complete table/view or Use Query, at the end of the wizard you have the option to save the DTS or the SSIS

In 2000: Then you right click on the DTS Schedule Package 
In 2005/2008: create a job wizard will allow you to select the SQL server Integration Service Package.
If you are using Reporting Services it could be a nice solution using subscriptions.
Avatar of Amien90
Amien90

ASKER

Thanks..

when i add a job .. and then delete it in SQL Server agent .. and then add a job again.. i get this error when adding a new job:

Error Source: Microsoft OLE DB Provider for SQL Server

Error Description: DTS Package 'New Package' already exist with a different ID in this category .. do i need to delete something else?
Avatar of Amien90

ASKER

when exporting i get the following error:

Executed as user: test. DTSRun:  Loading...   DTSRun:  Executing...   DTSRun OnStart:  Copy Data from Results to C:\Documents and Settings\test Step   DTSRun OnError:  Copy Data from Results to C:\Documents and Settings\test Step, Error = -2147467259 (80004005)      Error string:  Error opening datafile: Access is denied.         Error source:  Microsoft Data Transformation Services Flat File Rowset Provider      Help file:  DTSFFile.hlp      Help context:  0      Error Detail Records:      Error:  5 (5); Provider Error:  5 (5)      Error string:  Error opening datafile: Access is denied.         Error source:  Microsoft Data Transformation Services Flat File Rowset Provider      Help file:  DTSFFile.hlp      Help context:  0      DTSRun OnFinish:  Copy Data from Results to C:\Documents and Settings\test Step   DTSRun:  Package execution complete.  Process Exit Code 1.  The step failed.

seems like i dont have access to the datafile .. this while SQL Server Enterprise manager should have access cause i'm running queries from the database.
has any one changed the local admin password
Avatar of Amien90

ASKER

local admin password was not changed
i'm using MS SQL Enterprise Manager V8

so .. a job was added .. i had the possibily to make a query and select output  file .. but now i have two issues:

1. error when job is executed
2. DTS Package 'New Package' already exist with a different ID in this category .. issue
ASKER CERTIFIED SOLUTION
Avatar of Ernariash
Ernariash
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial