Showing posts with label import. Show all posts
Showing posts with label import. Show all posts

Friday, March 30, 2012

Job/Sheduled DTS/...: Rename a File

Hi,
I need to import a file with a Sheduled DTS, and after I have imported it I
shoudl rename the File. Is there any way to do this with a DTS or Job?
Thanks a lot,
PieterDragu,
have a look at this link. It has examples of different uses of the
filesystemobject which you'll need to call in VBScript:
http://www.sqldts.com/default.aspx?292
HTH,
Paul Ibison|||Pieter,
Execute a batch file either using DTS or sql job.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"DraguVaso" <pietercoucke@.hotmail.com> wrote in message
news:#ntqwtPWEHA.1760@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I need to import a file with a Sheduled DTS, and after I have imported it
I
> shoudl rename the File. Is there any way to do this with a DTS or Job?
> Thanks a lot,
> Pieter
>|||Great! Thanks! How do I execute such a script in my Job?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eJj$21PWEHA.4056@.TK2MSFTNGP11.phx.gbl...
> Dragu,
> have a look at this link. It has examples of different uses of the
> filesystemobject which you'll need to call in VBScript:
> http://www.sqldts.com/default.aspx?292
> HTH,
> Paul Ibison
>|||Dragu,
these scripts can be copied and pasted into an activeX script task.
Regards,
Paul Ibison|||Thanks! :-)
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O88QAeQWEHA.1356@.TK2MSFTNGP09.phx.gbl...
> Dragu,
> these scripts can be copied and pasted into an activeX script task.
> Regards,
> Paul Ibison
>

Job/Sheduled DTS/...: Rename a File

Hi,
I need to import a file with a Sheduled DTS, and after I have imported it I
shoudl rename the File. Is there any way to do this with a DTS or Job?
Thanks a lot,
PieterDragu,
have a look at this link. It has examples of different uses of the
filesystemobject which you'll need to call in vbscript :
http://www.sqldts.com/default.aspx?292
HTH,
Paul Ibison|||Pieter,
Execute a batch file either using DTS or sql job.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"DraguVaso" <pietercoucke@.hotmail.com> wrote in message
news:#ntqwtPWEHA.1760@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I need to import a file with a Sheduled DTS, and after I have imported it
I
> shoudl rename the File. Is there any way to do this with a DTS or Job?
> Thanks a lot,
> Pieter
>|||Great! Thanks! How do I execute such a script in my Job?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eJj$21PWEHA.4056@.TK2MSFTNGP11.phx.gbl...
> Dragu,
> have a look at this link. It has examples of different uses of the
> filesystemobject which you'll need to call in vbscript :
> http://www.sqldts.com/default.aspx?292
> HTH,
> Paul Ibison
>|||Dragu,
these scripts can be copied and pasted into an activeX script task.
Regards,
Paul Ibison|||Thanks! :-)
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O88QAeQWEHA.1356@.TK2MSFTNGP09.phx.gbl...
> Dragu,
> these scripts can be copied and pasted into an activeX script task.
> Regards,
> Paul Ibison
>sql

Job/Sheduled DTS/...: Rename a File

Hi,
I need to import a file with a Sheduled DTS, and after I have imported it I
shoudl rename the File. Is there any way to do this with a DTS or Job?
Thanks a lot,
Pieter
Dragu,
have a look at this link. It has examples of different uses of the
filesystemobject which you'll need to call in vbscript:
http://www.sqldts.com/default.aspx?292
HTH,
Paul Ibison
|||Pieter,
Execute a batch file either using DTS or sql job.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"DraguVaso" <pietercoucke@.hotmail.com> wrote in message
news:#ntqwtPWEHA.1760@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I need to import a file with a Sheduled DTS, and after I have imported it
I
> shoudl rename the File. Is there any way to do this with a DTS or Job?
> Thanks a lot,
> Pieter
>
|||Great! Thanks! How do I execute such a script in my Job?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eJj$21PWEHA.4056@.TK2MSFTNGP11.phx.gbl...
> Dragu,
> have a look at this link. It has examples of different uses of the
> filesystemobject which you'll need to call in vbscript:
> http://www.sqldts.com/default.aspx?292
> HTH,
> Paul Ibison
>
|||Dragu,
these scripts can be copied and pasted into an activeX script task.
Regards,
Paul Ibison
|||Thanks! :-)
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O88QAeQWEHA.1356@.TK2MSFTNGP09.phx.gbl...
> Dragu,
> these scripts can be copied and pasted into an activeX script task.
> Regards,
> Paul Ibison
>

Friday, March 23, 2012

Job runs succesfully, but database not updated

I have created a job to run an executable. This executable has to read an
Excelsheet in order to import the data into the database.
I got the message that the job has run succesfully, but the data is not in
the database.
My job looks like this:
c:\mydirectory\bin\excelimport.exe /Slocal) /D:DataComp 20051020
S: --> the local server
D:--> database name
Thank you for your help.
Kind regards,
LoHi
You don't say where the job expects the excel file to be! Have you looks at
SQL profiler to see what is happening when the program runs?
John
"lo" wrote:

> I have created a job to run an executable. This executable has to read an
> Excelsheet in order to import the data into the database.
> I got the message that the job has run succesfully, but the data is not in
> the database.
> My job looks like this:
> c:\mydirectory\bin\excelimport.exe /Slocal) /D:DataComp 20051020
> S: --> the local server
> D:--> database name
> --
> Thank you for your help.
> Kind regards,
> Lo|||I have run the profiler, but here as well I get no error message once or eve
r.
I have updated the string like this
c:\mydirectory\bin\excelimport.exe /Slocal) /D:[DataComp 20051020]
The path to the excel sheet is in the excelimport.exe.
Do you have any other idea'
Thank you for your help.
Kind regards,
Lo
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> You don't say where the job expects the excel file to be! Have you looks a
t
> SQL profiler to see what is happening when the program runs?
> John
> "lo" wrote:
>|||Hi
I would not expect any error messages from SQL Profile, just the information
about which database it is running against and what SQL statements are being
executed by the job. You can then confirm that it is not connecting to the
correct database or that it is not finding the file.
Do you have a dynamic properties task to change the destination database?
You may want to see http://www.sqldts.com/default.aspx?252
John
"lo" wrote:
[vbcol=seagreen]
> I have run the profiler, but here as well I get no error message once or e
ver.
> I have updated the string like this
> c:\mydirectory\bin\excelimport.exe /Slocal) /D:[DataComp 20051020]
> The path to the excel sheet is in the excelimport.exe.
> Do you have any other idea'
>
> --
> Thank you for your help.
> Kind regards,
> Lo
>
> "John Bell" wrote:
>

Job runs succesfully, but database not updated

I have created a job to run an executable. This executable has to read an
Excelsheet in order to import the data into the database.
I got the message that the job has run succesfully, but the data is not in
the database.
My job looks like this:
c:\mydirectory\bin\excelimport.exe /S:(local) /D:DataComp 20051020
S: --> the local server
D:--> database name
--
Thank you for your help.
Kind regards,
LoHi
You don't say where the job expects the excel file to be! Have you looks at
SQL profiler to see what is happening when the program runs?
John
"lo" wrote:
> I have created a job to run an executable. This executable has to read an
> Excelsheet in order to import the data into the database.
> I got the message that the job has run succesfully, but the data is not in
> the database.
> My job looks like this:
> c:\mydirectory\bin\excelimport.exe /S:(local) /D:DataComp 20051020
> S: --> the local server
> D:--> database name
> --
> Thank you for your help.
> Kind regards,
> Lo|||I have run the profiler, but here as well I get no error message once or ever.
I have updated the string like this
c:\mydirectory\bin\excelimport.exe /S:(local) /D:[DataComp 20051020]
The path to the excel sheet is in the excelimport.exe.
Do you have any other idea'
Thank you for your help.
Kind regards,
Lo
"John Bell" wrote:
> Hi
> You don't say where the job expects the excel file to be! Have you looks at
> SQL profiler to see what is happening when the program runs?
> John
> "lo" wrote:
> > I have created a job to run an executable. This executable has to read an
> > Excelsheet in order to import the data into the database.
> > I got the message that the job has run succesfully, but the data is not in
> > the database.
> > My job looks like this:
> > c:\mydirectory\bin\excelimport.exe /S:(local) /D:DataComp 20051020
> > S: --> the local server
> > D:--> database name
> >
> > --
> > Thank you for your help.
> >
> > Kind regards,
> >
> > Lo|||Hi
I would not expect any error messages from SQL Profile, just the information
about which database it is running against and what SQL statements are being
executed by the job. You can then confirm that it is not connecting to the
correct database or that it is not finding the file.
Do you have a dynamic properties task to change the destination database?
You may want to see http://www.sqldts.com/default.aspx?252
John
"lo" wrote:
> I have run the profiler, but here as well I get no error message once or ever.
> I have updated the string like this
> c:\mydirectory\bin\excelimport.exe /S:(local) /D:[DataComp 20051020]
> The path to the excel sheet is in the excelimport.exe.
> Do you have any other idea'
>
> --
> Thank you for your help.
> Kind regards,
> Lo
>
> "John Bell" wrote:
> > Hi
> >
> > You don't say where the job expects the excel file to be! Have you looks at
> > SQL profiler to see what is happening when the program runs?
> >
> > John
> >
> > "lo" wrote:
> >
> > > I have created a job to run an executable. This executable has to read an
> > > Excelsheet in order to import the data into the database.
> > > I got the message that the job has run succesfully, but the data is not in
> > > the database.
> > > My job looks like this:
> > > c:\mydirectory\bin\excelimport.exe /S:(local) /D:DataComp 20051020
> > > S: --> the local server
> > > D:--> database name
> > >
> > > --
> > > Thank you for your help.
> > >
> > > Kind regards,
> > >
> > > Lo

Friday, February 24, 2012

jeff

SQL .mdf file import.
How can i import a .mdf file(291MB in size) into a txt
file?
a step by step guide - as i know nothign about SQL 2000
thanks / Regards,
Jeff
Hi,
You can't import/export from a physical SQL server data file to a text file
or viceversa.
To do this first attach the MDF file as a database inside SQL server. After
that use the SQL server utilities BCP OUT or DTS to export the data from
tables to a Text file.
Thanks
Hari
MCDBA
"antz" <anonymous@.discussions.microsoft.com> wrote in message
news:58b501c42d31$6064e950$a001280a@.phx.gbl...
> SQL .mdf file import.
> How can i import a .mdf file(291MB in size) into a txt
> file?
> a step by step guide - as i know nothign about SQL 2000
> thanks / Regards,
> Jeff
|||thanks -
how do i go about attaching the mdf file?
to export it?
thanks
Jeff
>--Original Message--
>Hi,
>You can't import/export from a physical SQL server data
file to a text file
>or viceversa.
>To do this first attach the MDF file as a database
inside SQL server. After
>that use the SQL server utilities BCP OUT or DTS to
export the data from
>tables to a Text file.
>Thanks
>Hari
>MCDBA
>
>"antz" <anonymous@.discussions.microsoft.com> wrote in
message
>news:58b501c42d31$6064e950$a001280a@.phx.gbl...
>
>.
>
|||Hi Jeff,
Login to SQl server using the Query analyzer and try attaching the MDF file
as a database.
sp_attach_single_file_db
'dbname','physical_file_name_of_mdf_file_with_exac t_path'
Note:
Normally each database consists of 1 MDF and 1 LDF (Transactionlog) file. In
your case it seems you do not have the LDF file. So the above command may
file due to below reasons:-
1. If the database is not detached earlier
2. If the original database had more than 1 LDF files.
If your case does not fall in above categories then you will be able to
attach and then you can export contents to a text file using DTS or BCP.
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:5a4a01c42d48$588653b0$a101280a@.phx.gbl...[vbcol=seagreen]
> thanks -
> how do i go about attaching the mdf file?
> to export it?
> thanks
> Jeff
> file to a text file
> inside SQL server. After
> export the data from
> message