You are here: Re: SqlServer2005: Transfer Sql Server Objects « MsSQL Server « IT news, forums, messages
Re: SqlServer2005: Transfer Sql Server Objects

Posted by Erland Sommarskog on 12/03/06 15:04

Mark Olbert (ChairmanMAO@newsgroups.nospam) writes:
> I'm not that familiar with BCP (I tended to just use the DTS Wizard in
> Enterprise Manager), but I can read up on it.

As a quick start here is a sample command exporting data out:

bcp database..tbl out tbl.bcp -n -T -S myserver

-n specifies native format, which is the best for moving data between two
SQL Server databases in most cases. -T specifies trusted connection. Use
-U and -P to specify username and password for SQL authentication if
that is what you use.

For importing data to the other server, just change "out" to "in" and the
server name of course. ...but if the table has an identity column you
also need to specify -E to use the values in the file.

If the databases have different collation you need to use a format file.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация