Re: is it possible to move table(s) from one db to another?

From: Lara (wwilliam_at_umn.edu)
Date: 05/21/04


Date: 21 May 2004 07:25:40 -0700

If you need to move the table, with structure intact (indexes,
triggers, constraints, permissions, etc) I would probably recommend
using the DTS Import feature. This will better ensure that all
dependencies are intact. Select Into is quite fast, but may leave you
with some cleanup work on setting defaults, permissions, etc.

"Vinodk" <vinodk_sct@NO_SPAM_hotmail.com> wrote in message news:<usDWiJxPEHA.1348@TK2MSFTNGP12.phx.gbl>...
> Well Hari.
>
> Cool. The select into clause is the easiest implementation. But having said
> that this also copies the data not moves :) ...
>
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
>
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
>
>
> "Hari" <hari_prasad_k@hotmail.com> wrote in message
> news:%230rs5FuPEHA.556@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > It seems tin needs to move the table from one database to another
> database
> > in the same server. In this case he can select * INTO statement.
> >
> > For eg:
> >
> > You have 2 databases- 1 is HR and the 2nd is Finance..
> >
> > Incase if Tin need to move the EMPLOYEE table in HR to Finance then he can
> > execute the below command from Query Analyzer.
> >
> > select * into FINANCE..Employee from HR..Employee
> >
> > Once the tabe is successfully copied then you can drop the table from
> source
> > database. But ensure that full data is copied to destination.
> >
> > Note:
> > If you need the indexes then you have to create the indexes by scripting
> > them using the Enterprise manager -- Databases-- Alltasks-- Generate
> Scripts
> > by selecting the current database and table.
> >
> >
> > Thanks
> > Hari
> > MCDBA
> >
> >
> >
> > "Vinodk" <vinodk_sct@NO_SPAM_hotmail.com> wrote in message
> > news:OhXlH0tPEHA.628@TK2MSFTNGP11.phx.gbl...
> > > By move you mean you want the data to be copied right ? If yes, then you
> > > have:
> > >
> > > 1. Create a DTS package has a wizard approach that will transfer the
> same
> in
> > > a few clicks.
> > > 2. Script out all the data using available third party tools and script
> the
> > > data and import the same. One such script present at :
> > > http://vyaskn.tripod.com/code/generate_inserts.txt
> > >
> > > --
> > > HTH,
> > > Vinod Kumar
> > > MCSE, DBA, MCAD, MCSD
> > > http://www.extremeexperts.com
> > >
> > > Books Online for SQL Server SP3 at
> > > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
> > >
> > >
> > > "Tin" <oe@fawcette.com> wrote in message
> > > news:%23AM8vlrPEHA.1276@TK2MSFTNGP11.phx.gbl...
> > > > thanks in advance.
> > > >
> > > >
> > >
> > >
> >
> >



Relevant Pages

  • Re: Sql permissions headache
    ... By scripting all of your database objects and the permissions ... Knowing which permissions to assign each group is not going to be easy... ... creation (tables, views, stored procs, etc.), I put a GRANT statement to ...
    (microsoft.public.sqlserver.security)
  • Re: Sql permissions headache
    ... sync the databases and stored procs. ... By scripting all of your database objects and the permissions ... Knowing which permissions to assign each group is not going to be easy... ...
    (microsoft.public.sqlserver.security)
  • Re: List Users Permissions down to table.column action
    ... THIS STORED PROCEDURE GENERATES COMMANDS ... -- FIXED PROBLEMS WITH STATEMENT LEVEL PERMISSIONS GRANTING. ... -- CREATE TABLE TO HOLD LIST OF USERS IN CURRENT DATABASE ... -- GRANT USER ACCESS TO SERVER ROLES ...
    (microsoft.public.sqlserver.security)
  • Re: User access on a company intranet
    ... Yes they need full permissions on the folder where the backend is. ... You wouldn't need to do this in your copy of the database. ... However you can toggle the shiftkey bypass from another mdb file. ... When you want to implement security, you create a new mdw file, ...
    (microsoft.public.access.security)
  • Re: Active directory corruption
    ... During an installation of PHP I accidentally changed permissions for the ... Active Directory database is unavailable because it is damaged, ... Open a command prompt and run NTDSUTIL to verify the paths for the ...
    (microsoft.public.windows.server.sbs)