Question: Re-associate Dbo With Sa??
Dec 28, 2006
Hi all.
Running SQL2K SP4 on W2K3 Standard, SP4.
I have just refreshed a database on one server with a backup from
another. The database had existed previously on the target server, and
I am just refreshing its contents. I used the following approach
1) From the target server, create a SQL script with users and roles
2) From the source server, back up the db
3) Transfer the file
4) Restore the db, checking the location of the data and log files to
ensure correctness
5) Remove orphaned users
6) Run in the users/roles script generated in step 1
7) Run in a canned script containing object-level grants.
I've done this dozens of times in other databases, but something a
little unusual has occurred here:
My dbo user is orphaned. Normally it's associated with the 'sa' login,
but at this point there is no associated user.
I can see why this has happened - on the source db, the dbo user has
been associated with a non-default login.
And, many of the objects in the db are owned by dbo.
The only viable option I see is to change the ownership of these
objects, drop dbo, re-add it with the association to sa, and reassert
the object-level grants.
But what I would prefer is some way to change the association of the
dbo user, to associate it with 'sa' without the need to drop and
recreate.
Can anyone suggest an alternative strategy to associate a login and a
user after-the-fact?
Thanks much for all input!
BD
View 4 Replies
May 8, 2008
Hi. We're trying to setup a new case management system and I'm having a problem trying to store some of the information. I think I know how to go about it; however, I'm not sure if it's right.
We have two tables: Cases and Clients. The cases table stores relevant case information like case number, case type, etc. The Clients table stores information like name, address, phone number, email, etc.
What is the best way to associate these two tables together? I'm assuming I need a third table. Right? Thanks!
View 7 Replies
View Related
Aug 16, 2007
Hi there,
I'm wondering if there is a way to associate a job or task of some kind (i.e. SQL Agent job or SSIS package) with the generation of a report?
I have a need to provide an on-demand report that somehow initiates the updating of its data source prior to generation. In other words, I'd like the report to do *something* that can start an external process (external to the report) and wait for that process to complete before proceeding with the report generation.
As you can probably tell, updating the data source is expensive. It is normally scheduled along with a scheduled report, but I'd like the report to be runnable on demand when that is (rarely) the need, and I'd also like to guarantee the data source is updated when the scheduled report runs, which I can only do if I can somhow create a dependency between the updating process and the report generation.
Any ideas?
(The only way I can see to execute code synchronously from the report is to build a custom data processing extension/provider, which is fairly absurd.)
Thanks
Sam
View 2 Replies
View Related
Aug 26, 2006
Hello, im brand new to these forums, scrolled through a bit of the forum(mainly trying to figure out how to go about what im about to ask) and it seems like a good forum...anyways onto my question.
i am in need of ideas/know-how on how to structure a database like such:
its an online motorcycle accessories website, and this is the information i need to store in the db(basically these will be my tables in the db)
bike manufacturer
bike name
products
now my main question is how would i structure those tables so i can get this effect.
each product in the product table needs to have a bike associated to it, 99% of the time it will be more than one bike associated to it, so how would i go about doing that?
originally i had set it up with the bikes name being different columns in the products table with a bit type set to 1 if that product was available for that bike and 0 if it wasnt available. however as you are probably already thinking that isnt the best way to do that.
so what is the best way?
any info at all would be greatly appreciated.
thanks in advance
View 2 Replies
View Related
Aug 21, 2007
Currently a 2005 login has been granted sysadmin because I can not figure out how to grant the same login the SqlAgentUserRole. I thought I would use SSMS but there must be a trick. The role only exists in the msdb database, which the login has not been granted explicit access to. And the login does not appear in the list of Role Members or its sub windows. This should be real easy and intuitive . . .
Thanks!
Michael
View 3 Replies
View Related
Aug 21, 2006
i begin for Data mining ( analysis manager - sql server 2000)
i create some mining model with Microsoft_decision_ trees or Clustering. it's oK
but now i want to create a model to know "If customer 1 has product A in their basket, what products should I recommend ".
i read and see that "Microsoft analysis manager sp1" have support association rules.
i install pack 4. but i don't see anything else . how i create a model with association rules.
View 3 Replies
View Related
Nov 22, 2004
Hi all, I've had this issue in the past but dealt with it in a way that I don't think is correct:
Let's say I have a database on Server1. On Server1 I create a login and a user on the database. Now I have User1 with a login authorization on Server1 as well as a user within my database. If I detach that database now, and re-attach it on a different server, User1 exists. Of course, on the new Server2 User1 does not have authorization to login. I've deleted the existing user in the database and then re-created a login on the server, cascading through with the GUI setup to re-create the user within the database, too. Of course this gets ugly if the user has objects within the database. If I create a server login with the same name as the database user the login is not associated with the user too, correct?
I'd like to know the way that I can create a server authorization tied to the existing database user without dropping that database user, preferably within Enterprise Manager.
Thanks all,
MC
View 1 Replies
View Related
Apr 20, 2007
I'm currently running SQL Server 2005, and have been exploring the feasibility of grouping users to use a default file group and data file. This would be to group a set of users to have their new tables reside in a specific data file. I only see mechanisms for moving an already existing objects into a file group or to set the entire databases default file group--not a user level association or dynamic assignment of the default for that user, script, etc.
It's not looking good.
I'm looking for confimration that it's not possible or leads on doing so.
Thanx in advance
View 1 Replies
View Related