I have a DTS package that I currently execute manually. This DTS package
reads a text file and imports it into a table.
I would like to have it run automaticly.
For that to work correctly, it would need to check to see if the txt file is
there (the name is always teh same), if it is not there, then to quit. If
it is there, to read and import it as normal, then once completed, for it to
rename teh file and move it to another location on teh computer.
How do I do that?I'd use ActiveXScipt and the FileSystemObject. Here is some sample code:
Function Main()
dim fso, source, dest, oldFile
set fso = CreateObject("Scripting.FileSystemObject")
source = "\\myBox\FAAIVR\BENEFIT_GROUP_INFO.txt"
oldFile = replace(source, ".txt", "_" & replace(date - 7, "/","_") & ".txt")
if (fso.FileExists(source)) then
dest = replace(source, ".txt", "_" & replace(date, "/","_") & ".txt")
fso.MoveFile source, dest
end if
if (fso.FileExists(oldFile)) then
fso.DeleteFile (oldFile)
"Johnfli" wrote:
> I have a DTS package that I currently execute manually. This DTS package
> reads a text file and imports it into a table.
> I would like to have it run automaticly.
> For that to work correctly, it would need to check to see if the txt file is
> there (the name is always teh same), if it is not there, then to quit. If
> it is there, to read and import it as normal, then once completed, for it to
> rename teh file and move it to another location on teh computer.
> How do I do that?
>
>
Showing posts with label manually. Show all posts
Showing posts with label manually. Show all posts
Friday, March 30, 2012
Saturday, February 25, 2012
Move databases to a larger drive
I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.
One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>
|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>
|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML[vbcol=seagreen]
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
to[vbcol=seagreen]
> problem
> the
sees[vbcol=seagreen]
> should
on
>
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.
One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>
|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>
|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML[vbcol=seagreen]
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
to[vbcol=seagreen]
> problem
> the
sees[vbcol=seagreen]
> should
on
>
Move databases to a larger drive
I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
to[vbcol=seagreen]
> problem
> the
sees[vbcol=seagreen]
> should
on[vbcol=seagreen]
>
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
to[vbcol=seagreen]
> problem
> the
sees[vbcol=seagreen]
> should
on[vbcol=seagreen]
>
Move databases to a larger drive
I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> > I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> > SQLServer service was stopped, the physical files were manually copied
to
> > the new larger drives, and the SQLServer service was restarted. The
> problem
> > is that now when I go to expand the databases (the entire purpose of the
> > upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> > drive lettering was adjusted such that the new larger drives containing
> the
> > databases have the drive letters of the original drives, and SQL Exec
sees
> > the databases and brings them online. Is there some other process I
> should
> > have used? Is there a way to get SQL Exec to recognize the empty space
on
> > the new drive? Any and all help is greatly appreciated.
> >
> >
>
SQLServer service was stopped, the physical files were manually copied to
the new larger drives, and the SQLServer service was restarted. The problem
is that now when I go to expand the databases (the entire purpose of the
upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
drive lettering was adjusted such that the new larger drives containing the
databases have the drive letters of the original drives, and SQL Exec sees
the databases and brings them online. Is there some other process I should
have used? Is there a way to get SQL Exec to recognize the empty space on
the new drive? Any and all help is greatly appreciated.One must ask..
What the hell are you still doing on 6.5!
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Hi,
Have a look into the below link. ( Describes the various methods to load XML
to SQl 2000 tables)
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Thanks
Hari
MCDBA
"Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> SQLServer service was stopped, the physical files were manually copied to
> the new larger drives, and the SQLServer service was restarted. The
problem
> is that now when I go to expand the databases (the entire purpose of the
> upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> drive lettering was adjusted such that the new larger drives containing
the
> databases have the drive letters of the original drives, and SQL Exec sees
> the databases and brings them online. Is there some other process I
should
> have used? Is there a way to get SQL Exec to recognize the empty space on
> the new drive? Any and all help is greatly appreciated.
>|||Sorry I posted.. wrongly...
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OfImQ8dfEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Have a look into the below link. ( Describes the various methods to load
XML
> to SQl 2000 tables)
> http://www.perfectxml.com/articles/xml/importxmlsql.asp
> Thanks
> Hari
> MCDBA
>
> "Jason Rosenblum" <jrosenblum@.wcmh.org> wrote in message
> news:O$i6htcfEHA.4092@.TK2MSFTNGP10.phx.gbl...
> > I have a SQL 6.5 server running on WinNTthat was recently upgraded. The
> > SQLServer service was stopped, the physical files were manually copied
to
> > the new larger drives, and the SQLServer service was restarted. The
> problem
> > is that now when I go to expand the databases (the entire purpose of the
> > upgrade) SQL Exec doesn't appear to see the larger drive capacity. The
> > drive lettering was adjusted such that the new larger drives containing
> the
> > databases have the drive letters of the original drives, and SQL Exec
sees
> > the databases and brings them online. Is there some other process I
> should
> > have used? Is there a way to get SQL Exec to recognize the empty space
on
> > the new drive? Any and all help is greatly appreciated.
> >
> >
>
Subscribe to:
Posts (Atom)