473,881 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

backup/restore of Tables ONLY (please)

I'm having difficulty searching for an answer to this challenge. Can
someone give me a clue on the right keywords to use to find a
discussion on this subject? All of the ones I saw appear to touch on
older versions. I'm working with SQL Server 2000, and need to backup
and restore only tables, because the full backup/restore appears to
mess up users/security, or something or another.

Thanks for the assist.

Jan 28 '07 #1
6 27951

"javelin" <go************ *@spamgourmet.c omwrote in message
news:11******** **************@ m58g2000cwm.goo glegroups.com.. .
I'm having difficulty searching for an answer to this challenge. Can
someone give me a clue on the right keywords to use to find a
discussion on this subject? All of the ones I saw appear to touch on
older versions. I'm working with SQL Server 2000, and need to backup
and restore only tables, because the full backup/restore appears to
mess up users/security, or something or another.
There really isn't. You backup and restore an entire database. Unless
you're using filegroups, etc.

However, most likely what you need is sp_change_users _login to reconcile the
users in the database with the logins on the server.

Check that out. It will most likely solve your problems.

>
Thanks for the assist.

Jan 28 '07 #2
javelin (go************ *@spamgourmet.c om) writes:
I'm having difficulty searching for an answer to this challenge. Can
someone give me a clue on the right keywords to use to find a
discussion on this subject? All of the ones I saw appear to touch on
older versions. I'm working with SQL Server 2000, and need to backup
and restore only tables, because the full backup/restore appears to
mess up users/security, or something or another.
You cannot backup and restore individual tables. SQL 6.5 had such a
feature, but thankfully this folly was dropped.

You can however backup and restore single filegroups.

But it is not likely to be the solution to your problem. BACKUP/RESTORE
as such does not mess up users, but if you restore a backup on a different
server, you lose the mapping between database users and server logins.
Obviously - the logins in two servers are likely to be different.

As Greg said, user sp_change_users _login to sort out the situation.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jan 28 '07 #3
There are two requirements here, the first being the need to restore
tables to a different server than the backup originated from without
messing up mapping of server logins. The second is the need for a user
to work remotely on one single table without implementing fancy
database features, such as replication. Why not? Because the DBA is a
real "P.I.T.A.", and there's no way to convince him he's wrong! I did
discover one script to "generate INSERT statements from the existing
data" (found here: http://vyaskn.tripod.com/code.htm#inserts).
However, this one doesn't work well with tables with many columns, and
my table is definitely a "many-columned" table. If someone has
experience with fixing this script to be more flexible and suit my
needs, I could use it to have the remote user modify records in the
table and have the insert scripts generated from this code.

Thanks again for further advice.

On Jan 28, 4:34 am, Erland Sommarskog <esq...@sommars kog.sewrote:
javelin (google.1.jvm.. .@spamgourmet.c om) writes:
I'm having difficulty searching for an answer to this challenge. Can
someone give me a clue on the right keywords to use to find a
discussion on this subject? All of the ones I saw appear to touch on
older versions. I'm working with SQL Server 2000, and need to backup
and restore only tables, because the full backup/restore appears to
mess up users/security, or something or another.You cannot backup and restore individual tables. SQL 6.5 had such a
feature, but thankfully this folly was dropped.

You can however backup and restore single filegroups.

But it is not likely to be the solution to your problem. BACKUP/RESTORE
as such does not mess up users, but if you restore a backup on a different
server, you lose the mapping between database users and server logins.
Obviously - the logins in two servers are likely to be different.

As Greg said, user sp_change_users _login to sort out the situation.

--
Erland Sommarskog, SQL Server MVP, esq...@sommarsk og.se

Books Online for SQL Server 2005 athttp://www.microsoft.c om/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.c om/sql/prodinfo/previousversion s/books.mspx
Jan 29 '07 #4
javelin (go************ *@spamgourmet.c om) writes:
There are two requirements here, the first being the need to restore
tables to a different server than the backup originated from without
messing up mapping of server logins.
As I said, this can be handled with sp_change_users _login, please
see Books Online for details.
The second is the need for a user to work remotely on one single table
without implementing fancy database features, such as replication.
Have you looked at bulk copy? There is also some Import/Export GUI
stuff in Enterprise Manager that I have never used myself.
Why not? Because the DBA is a real "P.I.T.A.", and there's no way to
convince him he's wrong!
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jan 29 '07 #5
Since you rule out the traditional methods for BACKUP/RESTORE, then maybe
you can take a look at linked servers (that is if you have direct
connectivity between the two servers, which I assume you do because you
mention replication). You can set up a remote linked server and then
directly query and transfer the tables that you need. It can be easily
automated via a stored procedure that can be scheduled to run as a job.
Simple enough. Not the fastest approach but seems you are already looking at
generating INSERT statements to dump the data out...

Another alternative is to use a DTS package to transfer the tables. It can
be also fully automated, but assumes as above that you have connectivity
between the servers.

If you do not have direct connectivity then you can use a similar approach
to dumping with INSERT statements, but via DTS. In essence in the source
server you can create a DTS task to dump the table data to a text file, then
on the destination server import the data to a table using the reverse
process. The same scenario is doable using the BCP utility.

HTH,

Plamen Ratchev
http://www.SQLStudio.com
Jan 30 '07 #6
Plamen:

Thanks for the interesting advice. I am going to try and get direct
connectivity to the target server. If I can, the copy tables DTS
function is nice and straightforward . I don't know if the BCP utility
has been tried, but I'll give that a shot as well.

Thanks also to Erland Sommarskog for all your great advice. I'll be
experimenting with options for a few days.

Thanks again.

J
On Jan 29, 11:06 pm, "Plamen Ratchev" <Pla...@SQLStud io.comwrote:
Since you rule out the traditional methods for BACKUP/RESTORE, then maybe
you can take a look at linked servers (that is if you have direct
connectivity between the two servers, which I assume you do because you
mention replication). You can set up a remote linked server and then
directly query and transfer the tables that you need. It can be easily
automated via a stored procedure that can be scheduled to run as a job.
Simple enough. Not the fastest approach but seems you are already looking at
generating INSERT statements to dump the data out...

Another alternative is to use a DTS package to transfer the tables. It can
be also fully automated, but assumes as above that you have connectivity
between the servers.

If you do not have direct connectivity then you can use a similar approach
to dumping with INSERT statements, but via DTS. In essence in the source
server you can create a DTS task to dump the table data to a text file, then
on the destination server import the data to a table using the reverse
process. The same scenario is doable using the BCP utility.

HTH,

Plamen Ratchevhttp://www.SQLStudio.c om

Jan 30 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2240
by: Thomas Bartkus | last post by:
Is it safe to say that restoring the directory from a backup would that restore all database data and structure? All usr/pwd and GRANT info? Thomas Bartkus
2
3091
by: Vikrant | last post by:
Friends, I have read DB2/UDB 8.x 'RESTORE DATABASE Command', with my 'limited' knowledge & skill. I think it should address my concern, but I want advice/ opinion / experience and any care I must take to restore DB2/UDB 8.x database 64 to 32 bit). (1) Due to hardware limitaion I can not have 64 bit DB2/UDB 8 on AIX 4.3.3 host. Let us call this as host vhost32. I can migrate 7.2EE FP11 32bit to 8.x 32 bit on vhost32. This is my test...
4
3824
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but my concern is, such big size db, I'm afraid something unexpected will destory all the effort. Who have related experience? Can you give some advice? Thanks in advance:)
4
6412
by: Brice Avila | last post by:
Hello, IHAC running DB2 7.1.1.93 on Solaris 8. When he tried restoring this instance from a different server (alternate client restore) he encountered: db2 => restore database dumbunny load /usr/openv/netbackup/bin/nbdb2.so open 1 sessions taken at 20041022181323 buffer 1024 replace existing without prompting
1
2059
by: Paul Aspinall | last post by:
Does anyone have any sample code, or references to help when calling SQL DMO to backup / restore DB via C# Thanks
1
1537
by: G. Dean Blake | last post by:
How can I backup and restore a SQLServer DB from a .net VB program? Thanks, G
3
2632
by: aka | last post by:
Hi, I'm actually working on the migration of a DB2 unicode db (V8.2 FP 15) from a Sunfire machine with SunOS (64 bit, Big-endian) to an AIX 5.3 (64-bit, Big-endian) server located in US. The target server has DB2 V8.2 FP 15 installed and instance name and filesystem user groups rights an so on are all identical. From the manuals I see that a crossplatform backup-restore should be supported between the two systems. I did a full offline...
2
3485
mgpsivan
by: mgpsivan | last post by:
Hi, How can we backup or restore a database with all its tables,procedures,views,triggers etc., when i tried using mysqldump command i'm able to backup the tables and procedures alone.But restoring it is still a ? Can any one help me with this problem. Please let me know the way to backup and restore the complete database. Thanks Sivan.G
0
1112
by: muddasirmunir | last post by:
Can you please name me the best utility/software/aplication that can Backup/Restore SQL Server 2000 Databas in a proficient manner and easy to use for the end user.
0
9776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10724
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10825
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9556
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7953
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5781
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.