|
Posted by Erland Sommarskog on 08/22/06 22:04
Nasir (nmajeed@prosrm.com) writes:
> Is there any easy way to export out all objects and data, so it can be
> exported into any collation of SQL server.
SELECT 'bcp yourdb.' + quotename(schema_name(schema_id)) + '.' +
quotename(name) + ' out "' + name + '.bcp" ' +
'-T -n -C RAW'
FROM sys.objects
WHERE type = 'U'
Copy and paste into BAT file. To copy back, you need to add the -E option
for tables with identity columns. That is left as an exercise for the
reader. :-)
I believe the -C RAW option should prevent character conversions, but
you have to play around with that.
> Also, if I create multiple users in a databases, that they can have
> independent schemas; can they be backed up separately and restores
> separately to the same database.
Particularly, in SQL 2005, users don't have to have a schema at all.
Or they can own several.
No, you cannot backup a schema on its own. But you can backup on filegroup
level, I believe.
> Where did DTS go. It was nice to load or export different formats of data?
DTS was succeeded by SQL Server Integration Services in SQL 2005. I
know nothing about neither.
--
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]
|