Unix Technical Forum

Equivalent of Oracle's export/import in sql server

This is a discussion on Equivalent of Oracle's export/import in sql server within the Oracle Database forums, part of the Database Server Software category; --> I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp to export/improt data. ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 07:40 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Equivalent of Oracle's export/import in sql server

I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
to
export/improt data. However, they work one table at a time. I want
to
export all
the tables/views/stored procedure etc inside a database (i.e.,
Northwind)
and then drop Northwind, and then import the entire database
Northwind.

I looked at DTS Wizard. Is there any way to export all the
tables/views/packages etc using one "command", is answer no?. I find
DTS is table based, so
it only exports schema of a table and its data. How about views? I
want to
export all the tables at the same time and then selectively import.
Oracle
lets you do that, but cannot find this in sqlserver (I do not want to
copy the entire database from one sql server to another, only copy
information in a file and then selectively restore from it).

I looked at backup/restore. Backup kets you backup entire database,
but there is no way to restore just a table from this backup.

Really appreciate if you can point me in the right direction how to do
this in sql server 2000.

I posted this question in sql server forums, did not get a
satisfactory answer, so trying in this Oracle forum.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 07:40 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

On Aug 24, 10:32 pm, zigzag...@yahoo.com wrote:
> I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
> to
> export/improt data. However, they work one table at a time. I want
> to
> export all
> the tables/views/stored procedure etc inside a database (i.e.,
> Northwind)
> and then drop Northwind, and then import the entire database
> Northwind.
>
> I looked at DTS Wizard. Is there any way to export all the
> tables/views/packages etc using one "command", is answer no?. I find
> DTS is table based, so
> it only exports schema of a table and its data. How about views? I
> want to
> export all the tables at the same time and then selectively import.
> Oracle
> lets you do that, but cannot find this in sqlserver (I do not want to
> copy the entire database from one sql server to another, only copy
> information in a file and then selectively restore from it).
>
> I looked at backup/restore. Backup kets you backup entire database,
> but there is no way to restore just a table from this backup.
>
> Really appreciate if you can point me in the right direction how to do
> this in sql server 2000.
>
> I posted this question in sql server forums, did not get a
> satisfactory answer, so trying in this Oracle forum.


I know about partial restore in sql server which will let you restore
the entire filegroup (tablespace in Oracle's terminology) to a
database with diifferent name. Then one can do export/import to
transfer a few tables from new database to original. I do not see this
to be same as Oracle's export/import.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 07:40 AM
Brian Peasland
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

zigzagdna@yahoo.com wrote:
> I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
> to
> export/improt data. However, they work one table at a time. I want
> to
> export all
> the tables/views/stored procedure etc inside a database (i.e.,
> Northwind)
> and then drop Northwind, and then import the entire database
> Northwind.
>
> I looked at DTS Wizard. Is there any way to export all the
> tables/views/packages etc using one "command", is answer no?. I find
> DTS is table based, so
> it only exports schema of a table and its data. How about views? I
> want to
> export all the tables at the same time and then selectively import.
> Oracle
> lets you do that, but cannot find this in sqlserver (I do not want to
> copy the entire database from one sql server to another, only copy
> information in a file and then selectively restore from it).
>
> I looked at backup/restore. Backup kets you backup entire database,
> but there is no way to restore just a table from this backup.
>
> Really appreciate if you can point me in the right direction how to do
> this in sql server 2000.
>
> I posted this question in sql server forums, did not get a
> satisfactory answer, so trying in this Oracle forum.
>


Detach the Northwind database. That will also drop the database. From
there, you can copy the database's datafile(s) and transaction log
file(s) anywhere you want. When you want to "restore" the contents,
simply attach the database to the server in question.

HTH,
Brian


--
================================================== =================

Brian Peasland
dba@nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown

--
Posted via a free Usenet account from http://www.teranews.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 07:40 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

On Aug 25, 12:48 pm, Brian Peasland <d...@nospam.peasland.net> wrote:
> zigzag...@yahoo.com wrote:
> > I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
> > to
> > export/improt data. However, they work one table at a time. I want
> > to
> > export all
> > the tables/views/stored procedure etc inside a database (i.e.,
> > Northwind)
> > and then drop Northwind, and then import the entire database
> > Northwind.

>
> > I looked at DTS Wizard. Is there any way to export all the
> > tables/views/packages etc using one "command", is answer no?. I find
> > DTS is table based, so
> > it only exports schema of a table and its data. How about views? I
> > want to
> > export all the tables at the same time and then selectively import.
> > Oracle
> > lets you do that, but cannot find this in sqlserver (I do not want to
> > copy the entire database from one sql server to another, only copy
> > information in a file and then selectively restore from it).

>
> > I looked at backup/restore. Backup kets you backup entire database,
> > but there is no way to restore just a table from this backup.

>
> > Really appreciate if you can point me in the right direction how to do
> > this in sql server 2000.

>
> > I posted this question in sql server forums, did not get a
> > satisfactory answer, so trying in this Oracle forum.

>
> Detach the Northwind database. That will also drop the database. From
> there, you can copy the database's datafile(s) and transaction log
> file(s) anywhere you want. When you want to "restore" the contents,
> simply attach the database to the server in question.
>
> HTH,
> Brian
>
> --
> ================================================== =================
>
> Brian Peasland
> d...@nospam.peasland.nethttp://www.peasland.net
>
> Remove the "nospam." from the email address to email me.
>
> "I can give it to you cheap, quick, and good.
> Now pick two out of the three" - Unknown
>
> --
> Posted via a free Usenet account fromhttp://www.teranews.com- Hide quoted text -
>
> - Show quoted text -


This is similar to transportable tablespaces in Oracle, not export/
import,

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 07:40 AM
k.rajenderen@gmail.com
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

Hai,

I'm new to Oracle DBA . Is it is recommended to study SQL Server along
with Oracle.Please don't ignore this mail as it is more vital for me
also like to all those like me.just reply me all ur suggestions as i'm
waiting for that.Plz reply

Rajenderenk

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 07:40 AM
Niall Litchfield
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

zigzagdna@yahoo.com wrote:
>
> This is similar to transportable tablespaces in Oracle, not export/
> import,
>

the direct equivalent is the bcp utility. (bulk copy). It's documented
in books online.

--
Niall Litchfield
Oracle DBA
http://www.orawin.info/services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-26-2008, 07:40 AM
Frank van Bortel
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

k.rajenderen@gmail.com wrote:
> Hai,
>
> I'm new to Oracle DBA . Is it is recommended to study SQL Server along
> with Oracle.Please don't ignore this mail as it is more vital for me
> also like to all those like me.just reply me all ur suggestions as i'm
> waiting for that.Plz reply
>
> Rajenderenk
>


Learn to spell properly, or invest in a keyboard that has all keys.

Do *not* study Oracle and something other; first of all, you do not
have the time. Secondly, you start comparing, and finding common
solutions. Common means average, mediocre - you will only come up
mediocre systems.

Who recommends (unless you take recommendations from a machine,
which would make the use of 'it' correct)?
- --
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFG0X9rLw8L4IAs830RAuqbAKCVkWuqiJGOMlshX9PXO3 dOAC6NnQCgk6pt
otLZXyCrA8A3HxZmTNYi+BA=
=KH8T
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-26-2008, 07:40 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

On Aug 26, 4:26 am, Niall Litchfield <niall.litchfi...@dial.pipex.com>
wrote:
> zigzag...@yahoo.com wrote:
>
> > This is similar to transportable tablespaces in Oracle, not export/
> > import,

>
> the direct equivalent is the bcp utility. (bulk copy). It's documented
> in books online.
>
> --
> Niall Litchfield
> Oracle DBAhttp://www.orawin.info/services


Problem with bcp is that it works only one table at a time, so yes if
you are doing exp/imp one table at a time, bcp is the equivalent.
After doing lot of research, it appears that there is no equivalent of
exp/imp or expdp/impdb in SQL Server 2000. Closet one can get is the
backup command which will backup one sql server database (schema/user
in oracle), and then you can restore the database in its entirety or
do a partial restore (which is restoring contents in a file/filegroup
- tablespace in Oracle).
I am not saying that this is a shortcoming of sqlserver in anyway,
It is just that if one is used to Oracle's exp/imp or expdb/impdb, one
will not find all its features in sql sever 2000 as far as I know.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-26-2008, 07:40 AM
Tony Rogerson
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

Your question was answer already here by Tibor:
http://groups.google.co.uk/group/mic...3313bccdb9241f

But for the sake of clarity...

Open Enterprise Manager.

Click your server

Click Data Transformation Services

Right click Local Packages, New Package

From the left tool bar, under Task, select 'Copy SQL Server Objects Task',
it's the icon that has two boxes with a red arrow connecting one to the
other.

On the Source tab, select your source server and database

On the Destination tab select your destination server and database

On the copy tab select the objects to copy, by default 'All objects' is
selected.

Click OK

Execute the package

Save the package if you want to redo the excercise.

The Options button gives you various options.

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]


<zigzagdna@yahoo.com> wrote in message
news:1188009120.765287.188480@z24g2000prh.googlegr oups.com...
>I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
> to
> export/improt data. However, they work one table at a time. I want
> to
> export all
> the tables/views/stored procedure etc inside a database (i.e.,
> Northwind)
> and then drop Northwind, and then import the entire database
> Northwind.
>
> I looked at DTS Wizard. Is there any way to export all the
> tables/views/packages etc using one "command", is answer no?. I find
> DTS is table based, so
> it only exports schema of a table and its data. How about views? I
> want to
> export all the tables at the same time and then selectively import.
> Oracle
> lets you do that, but cannot find this in sqlserver (I do not want to
> copy the entire database from one sql server to another, only copy
> information in a file and then selectively restore from it).
>
> I looked at backup/restore. Backup kets you backup entire database,
> but there is no way to restore just a table from this backup.
>
> Really appreciate if you can point me in the right direction how to do
> this in sql server 2000.
>
> I posted this question in sql server forums, did not get a
> satisfactory answer, so trying in this Oracle forum.
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-26-2008, 07:40 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: Equivalent of Oracle's export/import in sql server

On Aug 26, 2:12 pm, "Tony Rogerson" <tonyroger...@torver.net> wrote:
> Your question was answer already here by Tibor:http://groups.google.co.uk/group/mic...rver.server/br...
>
> But for the sake of clarity...
>
> Open Enterprise Manager.
>
> Click your server
>
> Click Data Transformation Services
>
> Right click Local Packages, New Package
>
> From the left tool bar, under Task, select 'Copy SQL Server Objects Task',
> it's the icon that has two boxes with a red arrow connecting one to the
> other.
>
> On the Source tab, select your source server and database
>
> On the Destination tab select your destination server and database
>
> On the copy tab select the objects to copy, by default 'All objects' is
> selected.
>
> Click OK
>
> Execute the package
>
> Save the package if you want to redo the excercise.
>
> The Options button gives you various options.
>
> --
> Tony Rogerson, SQL Server MVPhttp://sqlblogcasts.com/blogs/tonyrogerson
> [Ramblings from the field from a SQL consultant]http://sqlserverfaq.com
> [UK SQL User Community]
>
> <zigzag...@yahoo.com> wrote in message
>
> news:1188009120.765287.188480@z24g2000prh.googlegr oups.com...
>
>
>
> >I am an Oracle DBA learning SQL Server 2000. I used DTS as well as bcp
> > to
> > export/improt data. However, they work one table at a time. I want
> > to
> > export all
> > the tables/views/stored procedure etc inside a database (i.e.,
> > Northwind)
> > and then drop Northwind, and then import the entire database
> > Northwind.

>
> > I looked at DTS Wizard. Is there any way to export all the
> > tables/views/packages etc using one "command", is answer no?. I find
> > DTS is table based, so
> > it only exports schema of a table and its data. How about views? I
> > want to
> > export all the tables at the same time and then selectively import.
> > Oracle
> > lets you do that, but cannot find this in sqlserver (I do not want to
> > copy the entire database from one sql server to another, only copy
> > information in a file and then selectively restore from it).

>
> > I looked at backup/restore. Backup kets you backup entire database,
> > but there is no way to restore just a table from this backup.

>
> > Really appreciate if you can point me in the right direction how to do
> > this in sql server 2000.

>
> > I posted this question in sql server forums, did not get a
> > satisfactory answer, so trying in this Oracle forum.- Hide quoted text -

>
> - Show quoted text -


I did look at that, but this is not what I want. DTS lets you copy
from One SQL Server instance1/database1 to another instance2/
databse2. instance 2 can be same as instance1, It does let you select
schema objects to transfer. What I am looking is to save output of
instance1/database1 in a file and then later transfer it (some
objects from it) to instance2/database2. So the part of saving
information to a file is missing.

Thanks a lot for your reply though.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com