Showing posts with label connected. Show all posts
Showing posts with label connected. Show all posts

Tuesday, March 20, 2012

Copy Database Wizard

I want to copy a database that is currently in use. The
DTS package fails if any user is connected. What command
would I issue to block all new connections to the
database? With new connections blocked and existing ones
finished, I should be able to copy the file the way the
wizard configures the package.Check out the ALTER DATABASE command in BOL
Nathan H.O.|||I assume that you are recommending something like:
ALTER DATABASE myDB SET SINGLE_USER
This command locks when the database is already in use.
>--Original Message--
>Check out the ALTER DATABASE command in BOL
>Nathan H.O.
>|||Not if you specify the proper ROLLBACK option.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Dan" <deletethisprefixandthefirstperiod.cathedr@.dshs.wa.gov> wrote in message
news:2aab201c39270$35205650$a601280a@.phx.gbl...
> I assume that you are recommending something like:
> ALTER DATABASE myDB SET SINGLE_USER
> This command locks when the database is already in use.
>
> >--Original Message--
> >Check out the ALTER DATABASE command in BOL
> >
> >Nathan H.O.
> >

Copy database without the data on a Cd?

Hi all,
We have a website with a database connected to a SQL server. I need
to copy that database without the data onto a CD so I can place the
program on another server?
Any help would be greatly appreciated.
You can generate create table/procedure/view scripts from within Enterprise
Manager / Mangement Studio. Or you can use a 3rd party tool like SQL
Compare from www.red-gate.com ...
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegro ups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>
|||You can make a backup and restore the database on another server or under a
different name. Then run the script I posted in my blog to delete all data
in the database -
http://www.sqljunkies.com/WebLog/roman/archive/2006/03/08/18620.aspx. After
that you'll have a database with no data, you can back it up and distribute.
As Aaron mentionned, you could also script out all database objects but you
may have to tweak those scripts manually and have them execute in the right
order because script generation tools often don't handle dependencies. So
when you run the script, it might fail if a referenced object hasn't been
created yet.
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegro ups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>
|||ApexSQL Diff should help here.
TheSQLGuru
President
Indicium Resources, Inc.
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegro ups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>

Copy database without the data on a Cd?

Hi all,
We have a website with a database connected to a SQL server. I need
to copy that database without the data onto a CD so I can place the
program on another server?
Any help would be greatly appreciated.You can generate create table/procedure/view scripts from within Enterprise
Manager / Mangement Studio. Or you can use a 3rd party tool like SQL
Compare from www.red-gate.com ...
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>|||You can make a backup and restore the database on another server or under a
different name. Then run the script I posted in my blog to delete all data
in the database -
http://www.sqljunkies.com/WebLog/ro.../08/18620.aspx. After
that you'll have a database with no data, you can back it up and distribute.
As Aaron mentionned, you could also script out all database objects but you
may have to tweak those scripts manually and have them execute in the right
order because script generation tools often don't handle dependencies. So
when you run the script, it might fail if a referenced object hasn't been
created yet.
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>|||ApexSQL Diff should help here.
TheSQLGuru
President
Indicium Resources, Inc.
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>sqlsql

Copy database without the data on a Cd?

Hi all,
We have a website with a database connected to a SQL server. I need
to copy that database without the data onto a CD so I can place the
program on another server?
Any help would be greatly appreciated.You can generate create table/procedure/view scripts from within Enterprise
Manager / Mangement Studio. Or you can use a 3rd party tool like SQL
Compare from www.red-gate.com ...
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>|||You can make a backup and restore the database on another server or under a
different name. Then run the script I posted in my blog to delete all data
in the database -
http://www.sqljunkies.com/WebLog/roman/archive/2006/03/08/18620.aspx. After
that you'll have a database with no data, you can back it up and distribute.
As Aaron mentionned, you could also script out all database objects but you
may have to tweak those scripts manually and have them execute in the right
order because script generation tools often don't handle dependencies. So
when you run the script, it might fail if a referenced object hasn't been
created yet.
Roman
--
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>|||ApexSQL Diff should help here.
--
TheSQLGuru
President
Indicium Resources, Inc.
<mchin247@.gmail.com> wrote in message
news:1184684718.199501.113020@.e9g2000prf.googlegroups.com...
> Hi all,
> We have a website with a database connected to a SQL server. I need
> to copy that database without the data onto a CD so I can place the
> program on another server?
> Any help would be greatly appreciated.
>