dbTalk Databases Forums  

How do I distribute data with application?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss How do I distribute data with application? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jack T.
 
Posts: n/a

Default How do I distribute data with application? - 09-10-2004 , 08:59 PM






Situation:
Development uses MSSQL for the application. The demo application CD uses
MSDE and needs to ship with data that came from the developments MSSQL
server.

What I've tried:
I can just copy and mount the MDF and LDF files, and mount them on the MSDE
system. However the only one that has access to them is sa. When I look at
the database, I see the other users, and the tables that they own. However,
they do not have login rights to the SQL server. If I set them up with
login rights on the SQL server, I cannot allow them access to the database
because I receive an error that there is already a user with the same name.
Thus they are two different users with the same name.

Any ideas?

Thanks,
Jack T.



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How do I distribute data with application? - 09-10-2004 , 11:58 PM






You can use BACKUP and RESTORE.

The reason you cannot add back your users as you have discovered is that
although the destination SQL Server has a login of XX and your DB has a
login of XX, to SQL Server these are not the same thing.

You either need to use

Exec sp_revokedbaccess 'User Name'
Exec sp_grantdbaccess 'XX','User Name'


Or you can use

sp_change_users_login



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Jack T." <71045.3122_No_Spam_Here (AT) compuserve (DOT) com> wrote

Quote:
Situation:
Development uses MSSQL for the application. The demo application CD uses
MSDE and needs to ship with data that came from the developments MSSQL
server.

What I've tried:
I can just copy and mount the MDF and LDF files, and mount them on the
MSDE
system. However the only one that has access to them is sa. When I look
at
the database, I see the other users, and the tables that they own.
However,
they do not have login rights to the SQL server. If I set them up with
login rights on the SQL server, I cannot allow them access to the database
because I receive an error that there is already a user with the same
name.
Thus they are two different users with the same name.

Any ideas?

Thanks,
Jack T.





Reply With Quote
  #3  
Old   
Jack T.
 
Posts: n/a

Default Re: How do I distribute data with application? - 09-11-2004 , 10:58 AM



Quote:
You can use BACKUP and RESTORE.
I tried that. I wasn't able to make it work. The BACKUP seems to have the
path embedded because on restore it wants to overwrite or append the files
in the same location that the backup came from. If there is a way to do
this, that would be great.

I will look at revoke and grant.

Thanks tons,
Jack T.




Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How do I distribute data with application? - 09-11-2004 , 11:06 AM



Have a look at the WITH MOVE option to the RESTORE cmd

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Jack T." <71045.3122_No_Spam_Here (AT) compuserve (DOT) com> wrote

Quote:
You can use BACKUP and RESTORE.

I tried that. I wasn't able to make it work. The BACKUP seems to have
the
path embedded because on restore it wants to overwrite or append the files
in the same location that the backup came from. If there is a way to do
this, that would be great.

I will look at revoke and grant.

Thanks tons,
Jack T.





Reply With Quote
  #5  
Old   
Jack T.
 
Posts: n/a

Default Re: How do I distribute data with application? - 09-11-2004 , 12:04 PM



Quote:
Have a look at the WITH MOVE option to the RESTORE cmd
Fabulous! I'll take a look.

Thanks,
Jack T.




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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.