From jnatola at hotmail.com Tue May 19 12:44:00 2009 From: jnatola at hotmail.com (jean-paul natola) Date: Tue, 19 May 2009 13:44:00 -0400 Subject: [dba-SQLServer] copy backup job Message-ID: Hi all, I have a daily backup job in sql studio that was created automatically by my GP application, I would like to copy the job (changing the database name obviously) to run for another DB is this possible from with studio mngmnt / agent /jobs ? thanks J _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009 From jwcolby at colbyconsulting.com Mon May 25 12:46:38 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 May 2009 13:46:38 -0400 Subject: [dba-SQLServer] Setting permissions on databases Message-ID: <4A1AD97E.1030404@colbyconsulting.com> I have done all of my work on SQL Server on my own servers with only myself as a user. I now have to set permissions to databases for other groups, at least I think they are groups. At the client, SQL Server 2008. I can see the permissions in the database properties in dialog for the databases. One db that has three groups (although it says "Type" is user), but my newly created database only has one (my user). I need to set my new database to give permissions to the same groups (or users) as the existing database has. I try to right click on the box that displays users for the database / properties / permissions but there is no way to add it there. Do I add new users / groups in Management Studio somewhere or do I have to go elsewhere? TIA, -- John W. Colby www.ColbyConsulting.com From mikedorism at verizon.net Mon May 25 13:00:53 2009 From: mikedorism at verizon.net (Doris Manning) Date: Mon, 25 May 2009 14:00:53 -0400 Subject: [dba-SQLServer] Setting permissions on databases In-Reply-To: <4A1AD97E.1030404@colbyconsulting.com> References: <4A1AD97E.1030404@colbyconsulting.com> Message-ID: In SQL Server 2005, you add new Logins through "Security / Logins". This allows you to control the databases those logins may access. In the Database itself, expand Security and then Roles. You would set your groups up under Application Roles and give those roles appropriate permission to access database objects. Then you assign your users/logins to their application role groups. SQL Server 2008 will hopefully be very similar. Doris Manning -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, May 25, 2009 1:47 PM To: Dba-Sqlserver Subject: [dba-SQLServer] Setting permissions on databases I have done all of my work on SQL Server on my own servers with only myself as a user. I now have to set permissions to databases for other groups, at least I think they are groups. At the client, SQL Server 2008. I can see the permissions in the database properties in dialog for the databases. One db that has three groups (although it says "Type" is user), but my newly created database only has one (my user). I need to set my new database to give permissions to the same groups (or users) as the existing database has. I try to right click on the box that displays users for the database / properties / permissions but there is no way to add it there. Do I add new users / groups in Management Studio somewhere or do I have to go elsewhere? TIA, -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon May 25 14:41:45 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 May 2009 15:41:45 -0400 Subject: [dba-SQLServer] Setting permissions on databases In-Reply-To: References: <4A1AD97E.1030404@colbyconsulting.com> Message-ID: <4A1AF479.7020907@colbyconsulting.com> That did it, thanks. John W. Colby www.ColbyConsulting.com Doris Manning wrote: > In SQL Server 2005, you add new Logins through "Security / Logins". This > allows you to control the databases those logins may access. > > In the Database itself, expand Security and then Roles. You would set your > groups up under Application Roles and give those roles appropriate > permission to access database objects. Then you assign your users/logins to > their application role groups. > > SQL Server 2008 will hopefully be very similar. > > Doris Manning > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, May 25, 2009 1:47 PM > To: Dba-Sqlserver > Subject: [dba-SQLServer] Setting permissions on databases > > I have done all of my work on SQL Server on my own servers with only myself > as a user. I now have to set permissions to databases for other groups, at > least I think they are groups. > > At the client, SQL Server 2008. I can see the permissions in the database > properties in dialog for the databases. One db that has three groups > (although it says "Type" is user), but my newly created database only has > one (my user). > > I need to set my new database to give permissions to the same groups (or > users) as the existing database has. I try to right click on the box that > displays users for the database / properties / permissions but there is no > way to add it there. Do I add new users / groups in Management Studio > somewhere or do I have to go elsewhere? > > TIA, > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fhtapia at gmail.com Thu May 28 10:46:39 2009 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 28 May 2009 08:46:39 -0700 Subject: [dba-SQLServer] copy backup job In-Reply-To: References: Message-ID: Jean, I hope you figured out your answer for this request :), with Management Studio re-creating jobs is a snap, just go to your management studio, open up the drop down for Sql Server Agent, Open up the Jobs folder Right Click the job of your choosing Choose Script Job as > Create To > New Query Editor Window -Francisco http://sqlthis.blogspot.com | Tsql and More... On Tue, May 19, 2009 at 10:44 AM, jean-paul natola wrote: > > Hi all, > > > > I have a daily backup job in sql studio that was created automatically by > my GP application, > > > > I would like to copy the job (changing the database name obviously) to run > for another DB is this possible from with studio mngmnt / agent /jobs ? > > > > > > thanks > J > > From jwcolby at colbyconsulting.com Sun May 31 17:01:08 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 31 May 2009 18:01:08 -0400 Subject: [dba-SQLServer] Sufficient rights Message-ID: <4A22FE24.9030102@colbyconsulting.com> I rebuilt one of my servers from the ground up yesterday, OS, SQL Server etc. Now when I try to reattach the databases I get a "create file encountered operating system error 5" error. When I Google that I find things that say that the user that SQL Server is trying to use to open the files doesn't have sufficient rights and was pointed to configuration manager / services. I am in Configuration manager / services and the SQL Server Integration Services uses the NT Authority \ Network Services user. All the others use LocalSystem. What user should all of these services use, and is this even the problem? Do these services not have sufficient rights? These directories are on a raid array which is the only survives over a rebuild, were created long ago by users long since killed (by system rebuilds). TIA for your help. BTW, I can create NEW databases (I tried), but cannot attach the existing databases. And yes, I detached the databases before I rebuilt the system. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun May 31 22:07:12 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 31 May 2009 23:07:12 -0400 Subject: [dba-SQLServer] What a mess (otherwise knbown as "who owns things") Message-ID: <4A2345E0.2000308@colbyconsulting.com> I rebuilt a server from C:\ format on up. New Windows Server 2003 X64, New SQL Server 2005 etc. Now the current administrator (apparently) does not own the files on the raid arrays which of course survive quite nicely. When I tried to attach a database it gave me an "insufficient rights" kind of error which I Googled and that tells me that I do not own the files. I took ownership which worked (I can now attach), but then I tried to attach and it said it couldn't because the files were read only. Only it DID the attach, and now I have a database in read only mode, which I cannot detach because... it is read only. Sigh. So... this invites MANY questions... 1) How do I take ownership of a disk drive on down and all the files on that disk drive? 2) Why are the files read only? 3) Now that I have one of the databases mounted (read only) how do I detach it so that I can make it read / write and reattach it? Or how do I make it non-readonly? 4)Why did all of this happen? 5) Is there an easy way to prevent all this in the future? I have a second server which I will be rebuilding when new parts get here mid week. New motherboard / processor and 5 new terabyte drives for the server I rebuilt this weekend and 5 new drives for the one to be rebuilt next. Obviously if there is something I can do in advance to prevent this mess I am all for that. In fact the new motherboard is the same motherboard as I have in the current rebuild, and my plan is to clone the boot drive and just use that clone in the new system. I have gone to much trouble to get all the multitude of software installed etc so when I am done I HOPE to end up with two literally identical machines, other than the second machine having some additional storage (and a next generation processor). Any words of wisdom out there? -- John W. Colby www.ColbyConsulting.com