Showing posts with label content. Show all posts
Showing posts with label content. Show all posts

Wednesday, March 28, 2012

Newbie Question - Please be gentle!

Can I run a script as an automated process?
i.e. I have a simple script that deletes the content of a table so I can
import fresh data, I know how to set up the DTS to import the data
automatically, but I have to run the script every day manually before the DTS
runs & I want the delete script to run at a predefined time rather than
having to remember to do it. Does that make sense?
Tia
Jonathan
Sure. It's hard to give precise directions without know what you're scripts
look like, but... if you already have a DTS job you can easily create a
step in that package (that's what the DTS container is called) that will cun
a TSQL script. Then you can easily schedule that from SQLAgent. You can
right click on the job name from DTS and select 'schedule job' which will
walk you throught the process of setting up the DTS package to run from SQL
agent.
Hope that helps,
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Jonathan" <Jonathan@.discussions.microsoft.com> wrote in message
news:F7E842B8-BFD6-4922-8ED2-4AD0BCE55CA6@.microsoft.com...
> Can I run a script as an automated process?
> i.e. I have a simple script that deletes the content of a table so I can
> import fresh data, I know how to set up the DTS to import the data
> automatically, but I have to run the script every day manually before the
DTS
> runs & I want the delete script to run at a predefined time rather than
> having to remember to do it. Does that make sense?
> Tia
> Jonathan

Newbie Question - Please be gentle!

Can I run a script as an automated process?
i.e. I have a simple script that deletes the content of a table so I can
import fresh data, I know how to set up the DTS to import the data
automatically, but I have to run the script every day manually before the DT
S
runs & I want the delete script to run at a predefined time rather than
having to remember to do it. Does that make sense?
Tia
JonathanSure. It's hard to give precise directions without know what you're scripts
look like, but... if you already have a DTS job you can easily create a
step in that package (that's what the DTS container is called) that will cun
a TSQL script. Then you can easily schedule that from SQLAgent. You can
right click on the job name from DTS and select 'schedule job' which will
walk you throught the process of setting up the DTS package to run from SQL
agent.
Hope that helps,
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Jonathan" <Jonathan@.discussions.microsoft.com> wrote in message
news:F7E842B8-BFD6-4922-8ED2-4AD0BCE55CA6@.microsoft.com...
> Can I run a script as an automated process?
> i.e. I have a simple script that deletes the content of a table so I can
> import fresh data, I know how to set up the DTS to import the data
> automatically, but I have to run the script every day manually before the
DTS
> runs & I want the delete script to run at a predefined time rather than
> having to remember to do it. Does that make sense?
> Tia
> Jonathan

Newbie Question - Please be gentle!

Can I run a script as an automated process?
i.e. I have a simple script that deletes the content of a table so I can
import fresh data, I know how to set up the DTS to import the data
automatically, but I have to run the script every day manually before the DTS
runs & I want the delete script to run at a predefined time rather than
having to remember to do it. Does that make sense?
Tia
JonathanSure. It's hard to give precise directions without know what you're scripts
look like, but... if you already have a DTS job you can easily create a
step in that package (that's what the DTS container is called) that will cun
a TSQL script. Then you can easily schedule that from SQLAgent. You can
right click on the job name from DTS and select 'schedule job' which will
walk you throught the process of setting up the DTS package to run from SQL
agent.
Hope that helps,
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Jonathan" <Jonathan@.discussions.microsoft.com> wrote in message
news:F7E842B8-BFD6-4922-8ED2-4AD0BCE55CA6@.microsoft.com...
> Can I run a script as an automated process?
> i.e. I have a simple script that deletes the content of a table so I can
> import fresh data, I know how to set up the DTS to import the data
> automatically, but I have to run the script every day manually before the
DTS
> runs & I want the delete script to run at a predefined time rather than
> having to remember to do it. Does that make sense?
> Tia
> Jonathan

Monday, February 20, 2012

newbee question on cloning a database

Hi,
I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
efore I do that I would like to have a copy of CTX_dev, in case something
goes wrong .
My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
export CTX_stg to CTX_dev. However I don't have enough disk space in C:
drive, so is there away I can create a database in D: and then Export to it?
Or are there better ways to do this?
TIA
You can use BACKUP DATABASE to back it up to D:, do it through enterprise
manager or the syntax in Query Analyser...
BACKUP DATABASE CTX_dev TO DISK = 'd:\CTX_Dev.bak' WITH INIT
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)
|||why not use backup and restore?
It does sound to me like you have database change management problems -
perhaps we could help...
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Database change management for SQL Server
"Raymond Du" wrote:

> Hi,
> I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
> in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
> efore I do that I would like to have a copy of CTX_dev, in case something
> goes wrong .
> My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
> export CTX_stg to CTX_dev. However I don't have enough disk space in C:
> drive, so is there away I can create a database in D: and then Export to it?
> Or are there better ways to do this?
> TIA
>
>
|||Other options are log shipping or Replication

newbee question on cloning a database

Hi,
I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
efore I do that I would like to have a copy of CTX_dev, in case something
goes wrong .
My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
export CTX_stg to CTX_dev. However I don't have enough disk space in C:
drive, so is there away I can create a database in D: and then Export to it?
Or are there better ways to do this?
TIAYou can use BACKUP DATABASE to back it up to D:, do it through enterprise
manager or the syntax in Query Analyser...
BACKUP DATABASE CTX_dev TO DISK = 'd:\CTX_Dev.bak' WITH INIT
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)|||why not use backup and restore?
It does sound to me like you have database change management problems -
perhaps we could help...
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Database change management for SQL Server
"Raymond Du" wrote:

> Hi,
> I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
> in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
> efore I do that I would like to have a copy of CTX_dev, in case something
> goes wrong .
> My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
> export CTX_stg to CTX_dev. However I don't have enough disk space in C:
> drive, so is there away I can create a database in D: and then Export to i
t?
> Or are there better ways to do this?
> TIA
>
>|||Other options are log shipping or Replication

newbee question on cloning a database

Hi,
I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
efore I do that I would like to have a copy of CTX_dev, in case something
goes wrong .
My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
export CTX_stg to CTX_dev. However I don't have enough disk space in C:
drive, so is there away I can create a database in D: and then Export to it?
Or are there better ways to do this?
TIAYou can use BACKUP DATABASE to back it up to D:, do it through enterprise
manager or the syntax in Query Analyser...
BACKUP DATABASE CTX_dev TO DISK = 'd:\CTX_Dev.bak' WITH INIT
--
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)|||why not use backup and restore?
It does sound to me like you have database change management problems -
perhaps we could help...
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Database change management for SQL Server
"Raymond Du" wrote:
> Hi,
> I have 2 databases: CTX_stg and CTX_dev in a SQL sever. Each is about 3 GB
> in size, I am trying to copy all the content of CTX_stg to CTX_dev, but
> efore I do that I would like to have a copy of CTX_dev, in case something
> goes wrong .
> My plan is to use DTS Export wizard export CTX_dev to CTX_dev_bak, then
> export CTX_stg to CTX_dev. However I don't have enough disk space in C:
> drive, so is there away I can create a database in D: and then Export to it?
> Or are there better ways to do this?
> TIA
>
>|||Other options are log shipping or Replication