Showing posts with label rename. Show all posts
Showing posts with label rename. Show all posts

Thursday, March 22, 2012

duplicate database

Is there a way to copy/duplicate and rename a database on the same server? I
need to make a copy for another application. I appreciate any tips or advice
you can provide!

TIA - RobYou can do this by either detaching, renaming & attaching the database files
with a different name or you can backup the database & restore it as a
different name. For smaller databases, you can even do the Copy database
wizard which can create a copy of the database with a different name.

Please refer to SQL Server Books Online for details on any of these
approaches and check the following MSKB links :
http://support.microsoft.com/default.aspx?kbid=314546
http://support.microsoft.com/defaul...scid=kb;q224071

--
- Anith
( Please reply to newsgroups only )|||Thanks for the reply! I can copy with a number of methods but I always loose
the database rules when I copy or import data (i.e. primary keys, identity,
default values, etc.). Any ideas or tips to keep the database and rules
intact?

TIA - Rob

"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:iy9Yb.7035$hm4.4664@.newsread3.news.atl.earthl ink.net...
> You can do this by either detaching, renaming & attaching the database
files
> with a different name or you can backup the database & restore it as a
> different name. For smaller databases, you can even do the Copy database
> wizard which can create a copy of the database with a different name.
> Please refer to SQL Server Books Online for details on any of these
> approaches and check the following MSKB links :
> http://support.microsoft.com/default.aspx?kbid=314546
> http://support.microsoft.com/defaul...scid=kb;q224071
> --
> - Anith
> ( Please reply to newsgroups only )|||"Rob Wahmann" <rob@.dotcomstudio.biz> wrote in message news:<H0gYb.8966$PY.8805@.newssvr26.news.prodigy.com>...
> Thanks for the reply! I can copy with a number of methods but I always loose
> the database rules when I copy or import data (i.e. primary keys, identity,
> default values, etc.). Any ideas or tips to keep the database and rules
> intact?
> TIA - Rob
> "Anith Sen" <anith@.bizdatasolutions.com> wrote in message
> news:iy9Yb.7035$hm4.4664@.newsread3.news.atl.earthl ink.net...
> > You can do this by either detaching, renaming & attaching the database
> files
> > with a different name or you can backup the database & restore it as a
> > different name. For smaller databases, you can even do the Copy database
> > wizard which can create a copy of the database with a different name.
> > Please refer to SQL Server Books Online for details on any of these
> > approaches and check the following MSKB links :
> > http://support.microsoft.com/default.aspx?kbid=314546
> > http://support.microsoft.com/defaul...scid=kb;q224071
> > --
> > - Anith
> > ( Please reply to newsgroups only )

You shouldn't lose anything if you use backup/restore or
detach/attach, as they don't make any changes within the database.
Backup/restore has the advantage that the source database is always
online during the process.

Simon

Friday, February 17, 2012

DTS with ActiveX script schedule problem

Hello gang, can someone help me with a problem?
I have a DTS package that uses ActiveX script to copy and rename files. I
can run this DTS package manually and the files are renamed and copied.
However, if I schedule this package with a job, the job runs successfully bu
t
the files are not copied and renamed. I have logged both the DTS activity
and Job activity and everything appears successful but no files are written.
Has anyone ran into this same problem.
These are the items I have thouroughly checked out:
The paths are correct (because the DTS package works)
The owner of the DTS has privleges to write(because the DTS package works)
The Owner of the Job has privileges to write(because the log activity shows
the steps in the DTS running)
Thanks for your help in advance.
Thanks Kllyj64BTW. Both the Job and the DTS package are running on the actual server, so
I
am not having a problem about "where I am executing the objects."
--
Thanks Kllyj64
"kllyj64" wrote:

> Hello gang, can someone help me with a problem?
> I have a DTS package that uses ActiveX script to copy and rename files. I
> can run this DTS package manually and the files are renamed and copied.
> However, if I schedule this package with a job, the job runs successfully
but
> the files are not copied and renamed. I have logged both the DTS activity
> and Job activity and everything appears successful but no files are writte
n.
> Has anyone ran into this same problem.
> These are the items I have thouroughly checked out:
> The paths are correct (because the DTS package works)
> The owner of the DTS has privleges to write(because the DTS package works)
> The Owner of the Job has privileges to write(because the log activity show
s
> the steps in the DTS running)
> Thanks for your help in advance.
>
> --
> Thanks Kllyj64|||I found the problem, SQL jobs runs under NT and does not recognize mapped
drives. I changed the DTS ActiveX scripts to use UNC drives and the job
worked. I should have looked further before posting.
--
Thanks Kllyj64
"kllyj64" wrote:
[vbcol=seagreen]
> BTW. Both the Job and the DTS package are running on the actual server, s
o I
> am not having a problem about "where I am executing the objects."
> --
> Thanks Kllyj64
>
> "kllyj64" wrote:
>

DTS with ActiveX script schedule problem

Hello gang, can someone help me with a problem?
I have a DTS package that uses ActiveX script to copy and rename files. I
can run this DTS package manually and the files are renamed and copied.
However, if I schedule this package with a job, the job runs successfully but
the files are not copied and renamed. I have logged both the DTS activity
and Job activity and everything appears successful but no files are written.
Has anyone ran into this same problem.
These are the items I have thouroughly checked out:
The paths are correct (because the DTS package works)
The owner of the DTS has privleges to write(because the DTS package works)
The Owner of the Job has privileges to write(because the log activity shows
the steps in the DTS running)
Thanks for your help in advance.
--
Thanks Kllyj64BTW. Both the Job and the DTS package are running on the actual server, so I
am not having a problem about "where I am executing the objects."
--
Thanks Kllyj64
"kllyj64" wrote:
> Hello gang, can someone help me with a problem?
> I have a DTS package that uses ActiveX script to copy and rename files. I
> can run this DTS package manually and the files are renamed and copied.
> However, if I schedule this package with a job, the job runs successfully but
> the files are not copied and renamed. I have logged both the DTS activity
> and Job activity and everything appears successful but no files are written.
> Has anyone ran into this same problem.
> These are the items I have thouroughly checked out:
> The paths are correct (because the DTS package works)
> The owner of the DTS has privleges to write(because the DTS package works)
> The Owner of the Job has privileges to write(because the log activity shows
> the steps in the DTS running)
> Thanks for your help in advance.
>
> --
> Thanks Kllyj64|||I found the problem, SQL jobs runs under NT and does not recognize mapped
drives. I changed the DTS ActiveX scripts to use UNC drives and the job
worked. I should have looked further before posting.
--
Thanks Kllyj64
"kllyj64" wrote:
> BTW. Both the Job and the DTS package are running on the actual server, so I
> am not having a problem about "where I am executing the objects."
> --
> Thanks Kllyj64
>
> "kllyj64" wrote:
> > Hello gang, can someone help me with a problem?
> >
> > I have a DTS package that uses ActiveX script to copy and rename files. I
> > can run this DTS package manually and the files are renamed and copied.
> > However, if I schedule this package with a job, the job runs successfully but
> > the files are not copied and renamed. I have logged both the DTS activity
> > and Job activity and everything appears successful but no files are written.
> > Has anyone ran into this same problem.
> >
> > These are the items I have thouroughly checked out:
> > The paths are correct (because the DTS package works)
> > The owner of the DTS has privleges to write(because the DTS package works)
> > The Owner of the Job has privileges to write(because the log activity shows
> > the steps in the DTS running)
> >
> > Thanks for your help in advance.
> >
> >
> > --
> > Thanks Kllyj64