From pete.phillipps at ntlworld.com Thu Nov 3 17:48:35 2005 From: pete.phillipps at ntlworld.com (Pete Phillipps) Date: Thu, 3 Nov 2005 23:48:35 -0000 Subject: [dba-SQLServer] MS Exams In-Reply-To: Message-ID: <20051103234838.IGJX11910.aamta12-winn.ispmail.ntl.com@vfttpete> Hello Everyone, Having taken the MS 70-073 course in preparation for the 70-229 DB Design and Implementation exam I'm wondering if anyone has an idea what sort of pass rate is required. I'm doing a practise exam every evening at the moment and am getting a consistent 70%-ish mark now but part of me feels that this is probably not high enough and that maybe I should wait until I am managing 80%. Pete "Many battles have been fought and won by soldiers nourished on beer" - Frederick the Great, 1777 From chizotz at mchsi.com Thu Nov 3 18:06:07 2005 From: chizotz at mchsi.com (chizotz at mchsi.com) Date: Fri, 04 Nov 2005 00:06:07 +0000 Subject: [dba-SQLServer] Problem Formulating Query Message-ID: <110420050006.25098.436AA5EF000931B50000620A2197913329969B019607080C@mchsi.com> I'm having problems formulating a query. Maybe I'm just tired or having a bad brain day, but... I have a table of accounts and associated data including an account number, a route number, a start date, and a stop date. These four fields form a compound primary key. A route may be assigned at different times to different accounts, but never to more than one account at a time. Therefore you would see data similar to this: Account Route StartDate EndDate OtherData ... 33333 1S01 01/01/2005 10/31/2005 blah blah blah 44444 1S01 11/01/2005 12/31/2999 blah blah blah 12345 1S02 01/01/2005 01/05/2005 blah blah blah 54321 1S02 01/06/2005 08/22/2005 blah blah blah 12345 1S02 08/23/2005 09/15/2005 blah blah blah 88888 1S02 09/17/2005 12/31/2999 blah blah blah Please note that there is a day unaccounted for in the above data for route 1S02, 09/16/2005. That is the condition I need to query for, to locate routes that were not assigned to an account and the dates they were unassigned. In theory, that should never happen but the dates are set manually in the app by the district reps and they sometimes error. The app checks for and disallows overlapping date ranges (i.e. a route can't be assigned to different accounts on the same date), but does not check for missing dates. Also, it is possible for a route to simply end and no longer be assigned to an account, so I'm only interested in routes with missing dates that have been assigned to accounts on later dates. I also have a date dimension table available with all dates from before the data business data begins through 12/31/2999 which I have been trying to use in joins to reveal only those routes that were unassigned. So far I can't get it to work. I hope I explained this clearly. Any help with this would be appreciated. Thanks, Ron From newsgrps at dalyn.co.nz Thu Nov 3 22:13:32 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 04 Nov 2005 17:13:32 +1300 Subject: [dba-SQLServer] Inherited Permissions Message-ID: <6.2.3.4.0.20051104170204.06a78d20@mail.dalyn.co.nz> SQL2000, AXP ade I have two roles set up in SQL called ManagerGrp and StaffGrp each with permissions for different sets of objects within a database. I also have a user called TeamManager who needs access to both sets of objects but has no permissions set directly. My initial thought was to make StaffGrp a user of ManagerGrp with the idea that the permissions from StaffGrp would be inherited by ManagerGrp. Then by making TeamManager a user of ManagerGrp, TeamManager would inherit the permisions of both ManagerGrp and StaffGrp. However the permissions of StaffGrp were not inherited by TeamManager. It was not until I made TeamManager a user of both Roles that they received permissions from both roles. If permissions are not inherited by roles from other roles that are set as users, then when would roles be made users of other roles? Regards David Emerson Dalyn Software Ltd 999 Moonshine Rd, RD 1 Judgeford, Porirua 6006 Phone (04) 235-6782 Fax (04) 235-6783 Mob (027) 280-9348 From tuxedo_man at hotmail.com Fri Nov 4 00:36:01 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 04 Nov 2005 06:36:01 +0000 Subject: [dba-SQLServer] MS Exams In-Reply-To: <20051103234838.IGJX11910.aamta12-winn.ispmail.ntl.com@vfttpete> Message-ID: the last ms exam i took was almost two years ago and i thought they removed the percentage score at the end of the exam; all they do is just tell you if you passed or failed. maybe they changed it back? >From: "Pete Phillipps" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: [dba-SQLServer] MS Exams >Date: Thu, 3 Nov 2005 23:48:35 -0000 > >Hello Everyone, > > Having taken the MS 70-073 course in preparation for the 70-229 DB >Design and Implementation exam I'm wondering if anyone has an idea what >sort >of pass rate is required. I'm doing a practise exam every evening at the >moment and am getting a consistent 70%-ish mark now but part of me feels >that this is probably not high enough and that maybe I should wait until I >am managing 80%. > >Pete > >"Many battles have been fought and won by soldiers nourished on beer" - >Frederick the Great, 1777 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From tuxedo_man at hotmail.com Fri Nov 4 00:52:07 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 04 Nov 2005 06:52:07 +0000 Subject: [dba-SQLServer] Inherited Permissions In-Reply-To: <6.2.3.4.0.20051104170204.06a78d20@mail.dalyn.co.nz> Message-ID: because teammanager is not part of the staffgrp, teammanager does not have staffgrp permissions. with the current setup, anyone who belongs to staffgrp would also have permissions of the managergrp as well because that user would have the permission staffgrp (because that user is part of the staffgrp) and also have the permission of the managergrp as well (because the staffgrp is part of (that is, is a user of) the managergrp who has permissions "intended for managers only"). you probably want it the other way around. hth Billy >From: David Emerson >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer] Inherited Permissions >Date: Fri, 04 Nov 2005 17:13:32 +1300 > >SQL2000, AXP ade > >I have two roles set up in SQL called ManagerGrp and StaffGrp each >with permissions for different sets of objects within a database. >I also have a user called TeamManager who needs access to both sets >of objects but has no permissions set directly. > >My initial thought was to make StaffGrp a user of ManagerGrp with the >idea that the permissions from StaffGrp would be inherited by >ManagerGrp. Then by making TeamManager a user of ManagerGrp, >TeamManager would inherit the permisions of both ManagerGrp and >StaffGrp. However the permissions of StaffGrp were not inherited by >TeamManager. It was not until I made TeamManager a user of both >Roles that they received permissions from both roles. > >If permissions are not inherited by roles from other roles that are >set as users, then when would roles be made users of other roles? > > >Regards > >David Emerson >Dalyn Software Ltd >999 Moonshine Rd, RD 1 >Judgeford, Porirua 6006 >Phone (04) 235-6782 >Fax (04) 235-6783 >Mob (027) 280-9348 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From jonathan.guise at donnslaw.co.uk Fri Nov 4 02:49:41 2005 From: jonathan.guise at donnslaw.co.uk (Jonathan Guise) Date: Fri, 4 Nov 2005 08:49:41 -0000 Subject: [dba-SQLServer] MS Exams Message-ID: <61F915314798D311A2F800A0C9C8318808335EF3@dibble.observatory.donnslaw.co.uk> I believe that you still get a score on the results page out of 1000 and sectional results. The 70-229 exam has a passing score of 700/1000. -----Original Message----- From: Billy Pang [mailto:tuxedo_man at hotmail.com] Sent: 04-Nov-2005 06:36 To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] MS Exams the last ms exam i took was almost two years ago and i thought they removed the percentage score at the end of the exam; all they do is just tell you if you passed or failed. maybe they changed it back? >From: "Pete Phillipps" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: [dba-SQLServer] MS Exams >Date: Thu, 3 Nov 2005 23:48:35 -0000 > >Hello Everyone, > > Having taken the MS 70-073 course in preparation for the 70-229 DB >Design and Implementation exam I'm wondering if anyone has an idea what >sort of pass rate is required. I'm doing a practise exam every evening >at the moment and am getting a consistent 70%-ish mark now but part of >me feels that this is probably not high enough and that maybe I should >wait until I am managing 80%. > >Pete > >"Many battles have been fought and won by soldiers nourished on beer" - >Frederick the Great, 1777 > >_______________________________________________ >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 -------------- next part -------------- The contents of this message and any attachments are the property of Donns Solicitors and are intended for the confidential use of the named recipient only. They may be legally privileged and should not be communicated to, or relied upon, by any other party without our written consent. If you are not the addressee, please notify us immediately so that we can make arrangements for its return. You should not show this e-mail to any person or take copies as you may be committing a criminal or civil offence for which you may be liable. The statement and opinions expressed in this e-mail message are those of the writer, and do not necessarily represent that of Donns Solicitors. Although any files attached to this e-mail will have been checked with virus protection software prior to transmission, you should carry out your own virus check before opening any attachment. Donns Solicitors does not accept any liability for any damage or loss which may be caused by software viruses... From Paul.Hartland at orridge.co.uk Fri Nov 4 02:56:13 2005 From: Paul.Hartland at orridge.co.uk (Paul Hartland) Date: Fri, 4 Nov 2005 08:56:13 -0000 Subject: [dba-SQLServer] MS Exams Message-ID: <14A7AB003EFD444BBB193A23128DA20E946F57@AL-PRI.Aldridge.local> On the topic of MS Exams, can anyone recommend a place in the UK that I can contact for further details or if we are able to take them online PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jonathan Guise Sent: 04 November 2005 08:50 To: 'dba-sqlserver at databaseadvisors.com' Subject: Re: [dba-SQLServer] MS Exams I believe that you still get a score on the results page out of 1000 and sectional results. The 70-229 exam has a passing score of 700/1000. -----Original Message----- From: Billy Pang [mailto:tuxedo_man at hotmail.com] Sent: 04-Nov-2005 06:36 To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] MS Exams the last ms exam i took was almost two years ago and i thought they removed the percentage score at the end of the exam; all they do is just tell you if you passed or failed. maybe they changed it back? >From: "Pete Phillipps" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: [dba-SQLServer] MS Exams >Date: Thu, 3 Nov 2005 23:48:35 -0000 > >Hello Everyone, > > Having taken the MS 70-073 course in preparation for the 70-229 DB >Design and Implementation exam I'm wondering if anyone has an idea what >sort of pass rate is required. I'm doing a practise exam every evening >at the moment and am getting a consistent 70%-ish mark now but part of >me feels that this is probably not high enough and that maybe I should >wait until I am managing 80%. > >Pete > >"Many battles have been fought and won by soldiers nourished on beer" - >Frederick the Great, 1777 > >_______________________________________________ >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 _______________________________________________ * This message is confidential. * This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential. * Access by any other party is unauthorised without the express written permission of the sender. * If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail. * This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent. * Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. The Orridge web site can be found at: http://www.orridge.co.uk From newsgrps at dalyn.co.nz Fri Nov 4 12:37:35 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sat, 05 Nov 2005 07:37:35 +1300 Subject: [dba-SQLServer] Inherited Permissions In-Reply-To: References: <6.2.3.4.0.20051104170204.06a78d20@mail.dalyn.co.nz> Message-ID: <6.2.3.4.0.20051105073507.0324deb0@mail.dalyn.co.nz> Ahh, that makes sense. Thanks. David At 4/11/2005, you wrote: >because teammanager is not part of the staffgrp, teammanager does not have >staffgrp permissions. with the current setup, anyone who belongs to staffgrp >would also have permissions of the managergrp as well because that user >would have the permission staffgrp (because that user is part of the >staffgrp) and also have the permission of the managergrp as well (because >the staffgrp is part of (that is, is a user of) the managergrp who has >permissions "intended for managers only"). you probably want it the other >way around. > >hth >Billy > > > >From: David Emerson > >Reply-To: dba-sqlserver at databaseadvisors.com > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer] Inherited Permissions > >Date: Fri, 04 Nov 2005 17:13:32 +1300 > > > >SQL2000, AXP ade > > > >I have two roles set up in SQL called ManagerGrp and StaffGrp each > >with permissions for different sets of objects within a database. > >I also have a user called TeamManager who needs access to both sets > >of objects but has no permissions set directly. > > > >My initial thought was to make StaffGrp a user of ManagerGrp with the > >idea that the permissions from StaffGrp would be inherited by > >ManagerGrp. Then by making TeamManager a user of ManagerGrp, > >TeamManager would inherit the permisions of both ManagerGrp and > >StaffGrp. However the permissions of StaffGrp were not inherited by > >TeamManager. It was not until I made TeamManager a user of both > >Roles that they received permissions from both roles. > > > >If permissions are not inherited by roles from other roles that are > >set as users, then when would roles be made users of other roles? > > > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >999 Moonshine Rd, RD 1 > >Judgeford, Porirua 6006 > >Phone (04) 235-6782 > >Fax (04) 235-6783 > >Mob (027) 280-9348 From fhtapia at gmail.com Tue Nov 8 10:23:45 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 8 Nov 2005 08:23:45 -0800 Subject: [dba-SQLServer] Read an XML file from SQL Server Message-ID: Arthur has been writing some really good articles for TechRepublic, Since I started getting more involved w/ XML and Sql Server (and Access) I thought this link would be useful to those who are just getting started, or need a good reference article. http://techrepublic.com.com/5100-9592_11-5796532.html?tag=nl.e046# -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From accessd at shaw.ca Tue Nov 8 10:36:52 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 08 Nov 2005 08:36:52 -0800 Subject: [dba-SQLServer] Read an XML file from SQL Server In-Reply-To: Message-ID: <02fb01c5e482$a07598f0$017ba8c0@xpserver> Arthur's looks great. Thanks, Francisco for bringing it to my attention. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia Sent: Tuesday, November 08, 2005 8:24 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Read an XML file from SQL Server Arthur has been writing some really good articles for TechRepublic, Since I started getting more involved w/ XML and Sql Server (and Access) I thought this link would be useful to those who are just getting started, or need a good reference article. http://techrepublic.com.com/5100-9592_11-5796532.html?tag=nl.e046# -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From alan.lawhon at us.army.mil Tue Nov 8 14:57:51 2005 From: alan.lawhon at us.army.mil (Lawhon, Alan C Contractor/Morgan Research) Date: Tue, 8 Nov 2005 14:57:51 -0600 Subject: [dba-SQLServer] Microsoft SQL Server 2005 Express Edition Message-ID: <5D5043687CFCE44288407A73E4CC6E17013EF39E@redstone819.ad.redstone.army.mil> Hey folks, Look what Microsoft just released - for "free" no less! http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4 448-8848-dcc397514b41&displaylang=en It's advertised as the replacement for MSDE in the "Introduction" section of the "ReadMe" file. You also need to have the Microsoft .NET Framework version 2.0 installed - which is a HUGE download - before you download SQL Server 2005 Express Edition. (I guess I should ditch dial-up and get broadband ...) Looks to me like this is the "training wheels" version of SQL Server 2005. Alan C. Lawhon From djkr at msn.com Tue Nov 8 16:46:15 2005 From: djkr at msn.com (DJK(John) Robinson) Date: Tue, 8 Nov 2005 22:46:15 -0000 Subject: [dba-SQLServer] Microsoft SQL Server 2005 Express Edition In-Reply-To: <5D5043687CFCE44288407A73E4CC6E17013EF39E@redstone819.ad.redstone.army.mil> Message-ID: There's more to come, too. Visual Studio 2005 Express Edition will be a free download, too. Announced today at the VS/SQLS/Biztalk launch. John -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Lawhon, Alan C Contractor/Morgan Research Sent: 08 November 2005 20:58 To: dba-SQLServer at databaseadvisors.com; AccessD at databaseadvisors.com; dba-ot at databaseadvisors.com Subject: [dba-SQLServer] Microsoft SQL Server 2005 Express Edition Hey folks, Look what Microsoft just released - for "free" no less! http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4 448-8848-dcc397514b41&displaylang=en It's advertised as the replacement for MSDE in the "Introduction" section of the "ReadMe" file. You also need to have the Microsoft .NET Framework version 2.0 installed - which is a HUGE download - before you download SQL Server 2005 Express Edition. (I guess I should ditch dial-up and get broadband ...) Looks to me like this is the "training wheels" version of SQL Server 2005. Alan C. Lawhon _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From djkr at msn.com Wed Nov 9 11:00:58 2005 From: djkr at msn.com (DJK(John) Robinson) Date: Wed, 9 Nov 2005 17:00:58 -0000 Subject: [dba-SQLServer] SQLS & VS 2005 Express Editions (cross-posted) In-Reply-To: Message-ID: http://msdn.microsoft.com/vstudio/express/ Just for a year. John -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DJK(John) Robinson Sent: 08 November 2005 22:52 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] SQLS & VS 2005 Express Editions (cross-posted) (cross-posted from [dba-SQLServer]) There's more to come. Visual Studio 2005 Express Edition will be a free download, too. Announced today at the VS/SQLS/Biztalk launch. John -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Lawhon, Alan C Contractor/Morgan Research Sent: 08 November 2005 20:58 To: dba-SQLServer at databaseadvisors.com; AccessD at databaseadvisors.com; dba-ot at databaseadvisors.com Subject: [dba-SQLServer] Microsoft SQL Server 2005 Express Edition Hey folks, Look what Microsoft just released - for "free" no less! http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4 448-8848-dcc397514b41&displaylang=en It's advertised as the replacement for MSDE in the "Introduction" section of the "ReadMe" file. You also need to have the Microsoft .NET Framework version 2.0 installed - which is a HUGE download - before you download SQL Server 2005 Express Edition. (I guess I should ditch dial-up and get broadband ...) Looks to me like this is the "training wheels" version of SQL Server 2005. Alan C. Lawhon _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ridermark at gmail.com Wed Nov 9 11:38:26 2005 From: ridermark at gmail.com (Mark Rider) Date: Wed, 9 Nov 2005 11:38:26 -0600 Subject: [dba-SQLServer] SQLS & VS 2005 Express Editions (cross-posted) In-Reply-To: References: Message-ID: On 11/9/05, DJK(John) Robinson wrote: > > http://msdn.microsoft.com/vstudio/express/ > Just for a year. > > According to their FAQ: *Do customers who acquire the Visual Studio Express products during the free promotional pricing period have to pay after the first year if they want to continue to use them? * No, as long as you download Visual Studio Express on or before November 7th 2006, you will not have to pay for it. -- Mark Rider http://commonsensesecurity.info There are 10 kinds of people in the world: Those who understand binary and those who don't. From DElam at jenkens.com Fri Nov 11 13:57:02 2005 From: DElam at jenkens.com (Elam, Debbie) Date: Fri, 11 Nov 2005 13:57:02 -0600 Subject: [dba-SQLServer] Log of read only users Message-ID: <7B1961ED924D1A459E378C9B1BB22B4C0492D064@natexch.jenkens.com> One system with a SQL 2000 backend, has been put on the internet for client lookups. They only have read only access, but my internal users would like to know when their clients have accessed the system. I can discover if they are currently logged into the system using Process Info in the Enterprise Manager, so it seems it should be possible to write a log file of that information. I don't need a lot of data, just that they logged on and when. Debbie - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. From artful at rogers.com Sat Nov 12 04:44:52 2005 From: artful at rogers.com (Arthur Fuller) Date: Sat, 12 Nov 2005 05:44:52 -0500 Subject: [dba-SQLServer] Read an XML file from SQL Server In-Reply-To: Message-ID: <200511121044.jACAixJ20941@databaseadvisors.com> Thank you, Francisco! Very honoured to receive your kind words. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia Sent: November 8, 2005 11:24 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Read an XML file from SQL Server Arthur has been writing some really good articles for TechRepublic, Since I started getting more involved w/ XML and Sql Server (and Access) I thought this link would be useful to those who are just getting started, or need a good reference article. http://techrepublic.com.com/5100-9592_11-5796532.html?tag=nl.e046# -- -Francisco From tuxedo_man at hotmail.com Mon Nov 14 23:18:14 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Tue, 15 Nov 2005 05:18:14 +0000 Subject: [dba-SQLServer] SQL Workout Message-ID: Hey group: I'm always looking for a good sql challenge and I came across a decent one a few days ago so I'd thought I'd share. The following logical problem (taken from a logical puzzles book) can be solved using only SQL. See if you can solve it using only SQL. I'll post my attempt in a few days. Billy ------------------------------ Whose round? Four friends met for happy hour drinks. They sat at a round table and over the course of the evening had four rounds of drinks. Each friend paid for a different round. Can you discover where each friend sat, his or her full name, and the order in which the four paid for drinks? 1) the first two people who paid for drinks sat across from each other 2) Arnie paid for the round just after Millican 3) Nieland, who didn't pay for the fourth round of drinks, paid for a round sometime after Beth did. 4) The person who sat in seat #2 and the person who bought the fourth round of drinks are of the opposite sexes. 5) Clarice bought a round of drinks sometime after the person who sat in seat #1 6) Kowalski and Lehmer sat across from each other. 7) Neither Dave nor Kowalski sat in seat #4 From artful at rogers.com Wed Nov 16 02:17:51 2005 From: artful at rogers.com (Arthur Fuller) Date: Wed, 16 Nov 2005 03:17:51 -0500 Subject: [dba-SQLServer] SQL Workout In-Reply-To: Message-ID: <200511160817.jAG8HlJ12536@databaseadvisors.com> There are problems here, probably subterfuge. The proposition waddles between given names and surnames. Perhaps that was intended as part of the puzzle. Arnie Millican Nieland Beth Clarice Kowalski Lehmer Dave Given that there are only four people at the table, sub-problem is to assign the surnames to the proper names and reduce these to (ultimately) four people. The sub-sub-problem is that I have no idea whether Nieland or Millican or Lehmer is a given name or a surname. In fact, Beth could be a surname, as could Clarice and Arnie, though each of these in the English-speaking world would most likely be given names. There may be a solution, but there are too many assumed propositions (IMO) for this to be interesting. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: November 15, 2005 12:18 AM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] SQL Workout Hey group: I'm always looking for a good sql challenge and I came across a decent one a few days ago so I'd thought I'd share. The following logical problem (taken from a logical puzzles book) can be solved using only SQL. See if you can solve it using only SQL. I'll post my attempt in a few days. Billy ------------------------------ Whose round? Four friends met for happy hour drinks. They sat at a round table and over the course of the evening had four rounds of drinks. Each friend paid for a different round. Can you discover where each friend sat, his or her full name, and the order in which the four paid for drinks? 1) the first two people who paid for drinks sat across from each other 2) Arnie paid for the round just after Millican 3) Nieland, who didn't pay for the fourth round of drinks, paid for a round sometime after Beth did. 4) The person who sat in seat #2 and the person who bought the fourth round of drinks are of the opposite sexes. 5) Clarice bought a round of drinks sometime after the person who sat in seat #1 6) Kowalski and Lehmer sat across from each other. 7) Neither Dave nor Kowalski sat in seat #4 From tuxedo_man at hotmail.com Wed Nov 16 06:33:35 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 16 Nov 2005 12:33:35 +0000 Subject: [dba-SQLServer] SQL Workout In-Reply-To: <200511160817.jAG8HlJ12536@databaseadvisors.com> Message-ID: Arnie, Beth, Dave and Clarice are first names. Assigning the last name to the first names from the very beginning (pretty tough, not possible..errr probable) would make the rest a walk in the park. >From: "Arthur Fuller" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: Re: [dba-SQLServer] SQL Workout >Date: Wed, 16 Nov 2005 03:17:51 -0500 > >There are problems here, probably subterfuge. The proposition waddles >between given names and surnames. Perhaps that was intended as part of the >puzzle. >Arnie >Millican >Nieland >Beth >Clarice >Kowalski >Lehmer >Dave >Given that there are only four people at the table, sub-problem is to >assign >the surnames to the proper names and reduce these to (ultimately) four >people. The sub-sub-problem is that I have no idea whether Nieland or >Millican or Lehmer is a given name or a surname. In fact, Beth could be a >surname, as could Clarice and Arnie, though each of these in the >English-speaking world would most likely be given names. >There may be a solution, but there are too many assumed propositions (IMO) >for this to be interesting. >A. > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang >Sent: November 15, 2005 12:18 AM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer] SQL Workout > >Hey group: > >I'm always looking for a good sql challenge and I came across a decent one >a > >few days ago so I'd thought I'd share. > >The following logical problem (taken from a logical puzzles book) can be >solved using only SQL. See if you can solve it using only SQL. I'll post >my attempt in a few days. > >Billy > >------------------------------ >Whose round? > >Four friends met for happy hour drinks. They sat at a round table and over >the course of the evening had four rounds of drinks. Each friend paid for >a > >different round. Can you discover where each friend sat, his or her full >name, and the order in which the four paid for drinks? > >1) the first two people who paid for drinks sat across from each other > >2) Arnie paid for the round just after Millican > >3) Nieland, who didn't pay for the fourth round of drinks, paid for a round >sometime after Beth did. > >4) The person who sat in seat #2 and the person who bought the fourth round >of drinks are of the opposite sexes. > >5) Clarice bought a round of drinks sometime after the person who sat in >seat #1 > >6) Kowalski and Lehmer sat across from each other. > >7) Neither Dave nor Kowalski sat in seat #4 > > >_______________________________________________ >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 Thu Nov 17 10:49:46 2005 From: jwcolby at ColbyConsulting.com (John Colby) Date: Thu, 17 Nov 2005 11:49:46 -0500 Subject: [dba-SQLServer] How good are you really? In-Reply-To: Message-ID: <035201c5eb96$eb65db70$667aa8c0@ColbyM6805> The challenge: DotNetNuke stores it's user info in a denormalized field in a table in SQL Server. One field has the definition of the data, for that record, at that instant: Website:S:0:0:TimeZone:S:0:4:PreferredLocale:S:4:5:Region:S:9:7:FirstName:S: 16:6:PostalCode:S:22:5:Street:S:27:22:LastName:S:49:11:Unit:S:60:0:Telephone :S:60:12:Country:S:72:13:IM:S:85:0:Fax:S:85:0:City:S:85:8:Cell:S:93:12: With the data itself as follows: -480en-USMontanaLouise82637918 Keller Dr. Box 642Hammersmark307-436-9731United StatesGlenrock307-259-8423 As you can see, the data is really a set of fields, with the field names embedded in the definition, then a start position within the data string, and the length of the data actually in the string. Is it possible to build a query or SP to pull the data out of the data field, using the formatting data and return a table of the data with field names and the data available? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ From stuart at lexacorp.com.pg Thu Nov 17 16:20:44 2005 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 18 Nov 2005 08:20:44 +1000 Subject: [dba-SQLServer] How good are you really? In-Reply-To: <035201c5eb96$eb65db70$667aa8c0@ColbyM6805> References: Message-ID: <437D8EDC.22803.A5B283A@stuart.lexacorp.com.pg> On 17 Nov 2005 at 11:49, John Colby wrote: ... > > Is it possible to build a query or SP to pull the data out of the data > field, using the formatting data and return a table of the data with field > names and the data available? > Yes. But seriously - what version os SQL Server. It would be more difficult in ver 7 or below, but if you can use UDFs, it wouldn't be took difficult. I will take a look at it over the weekend (it's Fri morning here already) -- Stuart From jwcolby at ColbyConsulting.com Thu Nov 17 16:30:29 2005 From: jwcolby at ColbyConsulting.com (John Colby) Date: Thu, 17 Nov 2005 17:30:29 -0500 Subject: [dba-SQLServer] How good are you really? In-Reply-To: <437D8EDC.22803.A5B283A@stuart.lexacorp.com.pg> Message-ID: <037101c5ebc6$840ca3c0$667aa8c0@ColbyM6805> Not sure what version, it is on my web hosting provider. By the info on their home page it is SQL Server 2000. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, November 17, 2005 5:21 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] How good are you really? On 17 Nov 2005 at 11:49, John Colby wrote: ... > > Is it possible to build a query or SP to pull the data out of the data > field, using the formatting data and return a table of the data with > field names and the data available? > Yes. But seriously - what version os SQL Server. It would be more difficult in ver 7 or below, but if you can use UDFs, it wouldn't be took difficult. I will take a look at it over the weekend (it's Fri morning here already) -- Stuart _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From rl_stewart at highstream.net Fri Nov 18 07:36:53 2005 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Fri, 18 Nov 2005 07:36:53 -0600 Subject: [dba-SQLServer] How good are you really? In-Reply-To: References: Message-ID: <6.2.3.4.2.20051118073540.02937318@pop3.highstream.net> John, You should know by now that anything is possible. Now, do you need someone to do it? :-) Robert At 12:00 PM 11/17/2005, you wrote: >Date: Thu, 17 Nov 2005 11:49:46 -0500 >From: "John Colby" >Subject: [dba-SQLServer] How good are you really? >To: >Message-ID: <035201c5eb96$eb65db70$667aa8c0 at ColbyM6805> >Content-Type: text/plain; charset="us-ascii" > >The challenge: > >DotNetNuke stores it's user info in a denormalized field in a table in SQL >Server. One field has the definition of the data, for that record, at that >instant: > >Website:S:0:0:TimeZone:S:0:4:PreferredLocale:S:4:5:Region:S:9:7:FirstName:S: >16:6:PostalCode:S:22:5:Street:S:27:22:LastName:S:49:11:Unit:S:60:0:Telephone >:S:60:12:Country:S:72:13:IM:S:85:0:Fax:S:85:0:City:S:85:8:Cell:S:93:12: > >With the data itself as follows: > > -480en-USMontanaLouise82637918 Keller Dr. Box >642Hammersmark307-436-9731United StatesGlenrock307-259-8423 > >As you can see, the data is really a set of fields, with the field names >embedded in the definition, then a start position within the data string, >and the length of the data actually in the string. > >Is it possible to build a query or SP to pull the data out of the data >field, using the formatting data and return a table of the data with field >names and the data available? > >John W. Colby From andrew.haslett at ilc.gov.au Sun Nov 20 16:29:11 2005 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Mon, 21 Nov 2005 08:59:11 +1030 Subject: [dba-SQLServer] How good are you really? Message-ID: <0A870603A2A816459078203FC07F4CD2BE3540@adl01s055.ilcorp.gov.au> Do you need to work with the database directly? If not, you can use the built in dotnetnuke methods to retrieve these values. Its quite easy to use.. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Friday, 18 November 2005 3:20 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] How good are you really? The challenge: DotNetNuke stores it's user info in a denormalized field in a table in SQL Server. One field has the definition of the data, for that record, at that instant: Website:S:0:0:TimeZone:S:0:4:PreferredLocale:S:4:5:Region:S:9:7:FirstNam e:S: 16:6:PostalCode:S:22:5:Street:S:27:22:LastName:S:49:11:Unit:S:60:0:Telep hone :S:60:12:Country:S:72:13:IM:S:85:0:Fax:S:85:0:City:S:85:8:Cell:S:93:12: With the data itself as follows: -480en-USMontanaLouise82637918 Keller Dr. Box 642Hammersmark307-436-9731United StatesGlenrock307-259-8423 As you can see, the data is really a set of fields, with the field names embedded in the definition, then a start position within the data string, and the length of the data actually in the string. Is it possible to build a query or SP to pull the data out of the data field, using the formatting data and return a table of the data with field names and the data available? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ *** This email any any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From jwcolby at ColbyConsulting.com Sun Nov 20 17:09:18 2005 From: jwcolby at ColbyConsulting.com (John Colby) Date: Sun, 20 Nov 2005 18:09:18 -0500 Subject: [dba-SQLServer] How good are you really? In-Reply-To: <0A870603A2A816459078203FC07F4CD2BE3540@adl01s055.ilcorp.gov.au> Message-ID: <040d01c5ee27$6f9a0ff0$667aa8c0@ColbyM6805> Well, I am not writing a VB.Net (or ASP.Net) module to do this. Not there yet on the .net front. I purchased XMod and an add-in for that called DataFeed or something like that, which makes it pretty trivial to pull data out of SQL Server and put it up on a grid control. However this data is not normalized. I have no idea whether Xmod allows me to communicate directly with the DNN methods, or map controls to such values. What I am trying to do is to list potentially the entire User attribute set - Name/Address/Phone/Email in a grid. Preferably with a sort mechanism. Built as a control which I can place on any page. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Haslett, Andrew Sent: Sunday, November 20, 2005 5:29 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] How good are you really? Do you need to work with the database directly? If not, you can use the built in dotnetnuke methods to retrieve these values. Its quite easy to use.. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Friday, 18 November 2005 3:20 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] How good are you really? The challenge: DotNetNuke stores it's user info in a denormalized field in a table in SQL Server. One field has the definition of the data, for that record, at that instant: Website:S:0:0:TimeZone:S:0:4:PreferredLocale:S:4:5:Region:S:9:7:FirstNam e:S: 16:6:PostalCode:S:22:5:Street:S:27:22:LastName:S:49:11:Unit:S:60:0:Telep hone :S:60:12:Country:S:72:13:IM:S:85:0:Fax:S:85:0:City:S:85:8:Cell:S:93:12: With the data itself as follows: -480en-USMontanaLouise82637918 Keller Dr. Box 642Hammersmark307-436-9731United StatesGlenrock307-259-8423 As you can see, the data is really a set of fields, with the field names embedded in the definition, then a start position within the data string, and the length of the data actually in the string. Is it possible to build a query or SP to pull the data out of the data field, using the formatting data and return a table of the data with field names and the data available? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ From newsgrps at dalyn.co.nz Mon Nov 28 16:03:27 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Nov 2005 11:03:27 +1300 Subject: [dba-SQLServer] Who Has adp/ade open? Message-ID: <7.0.0.16.0.20051129105929.01a41728@dalyn.co.nz> I am trying to identify what users have a database open. adp's don't seem to have an ldb file (presumably because they use SQL and not Jet). Apart from looking at the current activity in SQL management, is there any other way of finding out who has an adp or ade open? Regards David Emerson Dalyn Software Ltd 999 Moonshine Rd, RD 1 Judgeford, Porirua New Zealand 6006 Phone 0064 4 235-6782 Fax 0064 4 235-6783 From martyconnelly at shaw.ca Mon Nov 28 17:28:23 2005 From: martyconnelly at shaw.ca (MartyConnelly) Date: Mon, 28 Nov 2005 15:28:23 -0800 Subject: [dba-SQLServer] Who Has adp/ade open? References: <7.0.0.16.0.20051129105929.01a41728@dalyn.co.nz> Message-ID: <438B9297.4040902@shaw.ca> Is this because you don't have a version of SQL EM? Maybe a call to DBCC in SQL to get user connection. Another way that might be more exact. You could use WMI and check through each machine name in the domain and check for running adp task processes. You could then maybe and I stress maybe also find out if a particular adp file is open on that machine via some similar WMI method. WMI can also give you all machine names in a domain. Look at various sample scripts here http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ This might be time consuming. Something like this 'Reports the account name under which each process on a computer is running. 'you would have to run this for every machine name. Dim strComputer As String Dim strUserDomain As String Dim strNameofUser As String Dim colProcessLiust As Object Dim objProcess As Object Dim objWMIService As Object Dim colproperties as variant 'or is it object strComputer = "." 'This is the machine name in the domain. "." indicates "local" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcessList colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) debug.print "Process " & objProcess.Name & " is owned by " _ & strUserDomain & "\" & strNameOfUser & "." Next David Emerson wrote: >I am trying to identify what users have a database open. adp's don't >seem to have an ldb file (presumably because they use SQL and not >Jet). Apart from looking at the current activity in SQL management, >is there any other way of finding out who has an adp or ade open? > >Regards > >David Emerson >Dalyn Software Ltd >999 Moonshine Rd, RD 1 >Judgeford, Porirua >New Zealand 6006 >Phone 0064 4 235-6782 >Fax 0064 4 235-6783 > >__ > > > > -- Marty Connelly Victoria, B.C. Canada From newsgrps at dalyn.co.nz Mon Nov 28 17:49:24 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Nov 2005 12:49:24 +1300 Subject: [dba-SQLServer] Who Has adp/ade open? In-Reply-To: <438B9297.4040902@shaw.ca> References: <7.0.0.16.0.20051129105929.01a41728@dalyn.co.nz> <438B9297.4040902@shaw.ca> Message-ID: <7.0.0.16.0.20051129123608.01a33b70@dalyn.co.nz> Thanks Marty. Perhaps some background will help. The program is run as a runtime via terminal server. There can be up to 10-15 concurrent users at a time. Part of my program uses the following line to copy a spreadsheet into a table: DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile Sometimes this causes Access to crash (Access has encountered a problem and needs to close ...). In the past it has seemed to be caused by users having several copies of the program open at once (they only need one copy but try to tell them not to keep opening a new instance of the program but to use the one they already have open :'( ) and then closing their terminal server session down but not closing the databases first. When the server is rebooted then the problem line works fine until suddenly it decides to spit out the dummy again. I do have Enterprise Manager and can see what users have the connections to the database. Part of the problem is that there are three versions of the front end all connecting to the same SQL database. I was hoping to try to identify somehow what copies of the front end were open to see if there are any patterns. I am trying to a) find out if the user's work haboits are causing the problem, or b) if it is some other problem, trying to find out what. David At 29/11/2005, you wrote: >Is this because you don't have a version of SQL EM? > >Maybe a call to DBCC in SQL to get user connection. >Another way that might be more exact. >You could use WMI and check through each machine name in the domain and >check for running >adp task processes. You could then maybe and I stress maybe also find >out if a particular adp file is open >on that machine via some similar WMI method. > >WMI can also give you all machine names in a domain. > >Look at various sample scripts here >http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ > >This might be time consuming. >Something like this > >'Reports the account name under which each process on a computer is running. >'you would have to run this for every machine name. >Dim strComputer As String >Dim strUserDomain As String >Dim strNameofUser As String >Dim colProcessLiust As Object >Dim objProcess As Object >Dim objWMIService As Object >Dim colproperties as variant 'or is it object > >strComputer = "." 'This is the machine name in the domain. "." >indicates "local" >Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >Set colProcessList = objWMIService.ExecQuery _ > ("Select * from Win32_Process") >For Each objProcess in colProcessList > colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) > debug.print "Process " & objProcess.Name & " is owned by " _ > & strUserDomain & "\" & strNameOfUser & "." >Next > > >David Emerson wrote: > > >I am trying to identify what users have a database open. adp's don't > >seem to have an ldb file (presumably because they use SQL and not > >Jet). Apart from looking at the current activity in SQL management, > >is there any other way of finding out who has an adp or ade open? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >999 Moonshine Rd, RD 1 > >Judgeford, Porirua > >New Zealand 6006 > >Phone 0064 4 235-6782 > >Fax 0064 4 235-6783 > > > >__ > > > > > > > > > >-- >Marty Connelly >Victoria, B.C. >Canada > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From martyconnelly at shaw.ca Mon Nov 28 18:35:04 2005 From: martyconnelly at shaw.ca (MartyConnelly) Date: Mon, 28 Nov 2005 16:35:04 -0800 Subject: [dba-SQLServer] Who Has adp/ade open? References: <7.0.0.16.0.20051129105929.01a41728@dalyn.co.nz> <438B9297.4040902@shaw.ca> <7.0.0.16.0.20051129123608.01a33b70@dalyn.co.nz> Message-ID: <438BA238.9010402@shaw.ca> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ac2003_ta/html/odc_acmultibest.asp Opening an Access Project If you try to open an Access project (.adp) file or an Access project extension (.ade) file in a multi-user environment, you may receive an error message similar to the following: "The database DatabaseName will be opened read-only because one of the following occurred: The file is locked for editing by another user, or the file (or the folder in which it is located) is marked as read-only, or you specified that you wanted to open this file read-only." This error message occurs because an Access project is strictly a client and has no multi-user capability. The workaround for this issue is to deploy a copy of the .adp file or .ade file to each computer. So something different must be happening under terminal services I assume each user is running a copy of the adp under a seperate session. and then opening more in the same session. What you could do in code from an autoexec macro is check if a .txt file exists with anything in it. If it doesn't exist continue on using the existance as a switch. create txt file and deleting on close of the adp Or maybe better create a table entry in sql server with the user name on logon deleteing the name on logoff. and check beforehand if that user name pre-exists then dump em out with application.quit and a friendly warning. This might be a problem if there is a line drop. Then there would have to be intervention to remove the user name from the table. Another way might be to run a vbs script to startup the adp terminal session and check if the adp file for that session is already open. or this used to work with mdb's from the myst's of time not sure of adp's 'Usage: ' debug.Print IsItRunning("MSAccess", "System") ' to check Access itself 'Print IsItRunning("MSAccess", CurrentDb().Name) ' to check the specific application ' Print IsItRunning("MSAccess", "System.mda") ' to check that specific security file Public Function IsItRunning(strApp As String, strTopic As String) As Boolean 'Doesn't allow multiple copies of Access program running at the same time 'Implement to stop users from starting 2 copies of program ' Access version dependant, use Long for Access 97; int for Access 2 Dim Channel As Long Application.SetOption ("Ignore DDE Requests"), True On Error Resume Next Channel = DDEInitiate(strApp, strTopic) IsItRunning = (0 <> Channel) DDETerminate Channel On Error GoTo 0 Application.SetOption ("Ignore DDE Requests"), False End Function David Emerson wrote: >Thanks Marty. Perhaps some background will help. > >The program is run as a runtime via terminal server. There can be up >to 10-15 concurrent users at a time. >Part of my program uses the following line to copy a spreadsheet into a table: > >DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile > >Sometimes this causes Access to crash (Access has encountered a >problem and needs to close ...). > >In the past it has seemed to be caused by users having several copies >of the program open at once (they only need one copy but try to tell >them not to keep opening a new instance of the program but to use the >one they already have open :'( ) and then closing their terminal >server session down but not closing the databases first. > >When the server is rebooted then the problem line works fine until >suddenly it decides to spit out the dummy again. > >I do have Enterprise Manager and can see what users have the >connections to the database. Part of the problem is that there are >three versions of the front end all connecting to the same SQL >database. I was hoping to try to identify somehow what copies of the >front end were open to see if there are any patterns. > >I am trying to a) find out if the user's work haboits are causing the >problem, or b) if it is some other problem, trying to find out what. > >David > > >At 29/11/2005, you wrote: > > >>Is this because you don't have a version of SQL EM? >> >>Maybe a call to DBCC in SQL to get user connection. >>Another way that might be more exact. >>You could use WMI and check through each machine name in the domain and >>check for running >>adp task processes. You could then maybe and I stress maybe also find >>out if a particular adp file is open >>on that machine via some similar WMI method. >> >>WMI can also give you all machine names in a domain. >> >>Look at various sample scripts here >>http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ >> >>This might be time consuming. >>Something like this >> >>'Reports the account name under which each process on a computer is running. >>'you would have to run this for every machine name. >>Dim strComputer As String >>Dim strUserDomain As String >>Dim strNameofUser As String >>Dim colProcessLiust As Object >>Dim objProcess As Object >>Dim objWMIService As Object >>Dim colproperties as variant 'or is it object >> >>strComputer = "." 'This is the machine name in the domain. "." >>indicates "local" >>Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>Set colProcessList = objWMIService.ExecQuery _ >> ("Select * from Win32_Process") >>For Each objProcess in colProcessList >> colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) >> debug.print "Process " & objProcess.Name & " is owned by " _ >> & strUserDomain & "\" & strNameOfUser & "." >>Next >> >> >>David Emerson wrote: >> >> >> >>>I am trying to identify what users have a database open. adp's don't >>>seem to have an ldb file (presumably because they use SQL and not >>>Jet). Apart from looking at the current activity in SQL management, >>>is there any other way of finding out who has an adp or ade open? >>> >>>Regards >>> >>>David Emerson >>>Dalyn Software Ltd >>>999 Moonshine Rd, RD 1 >>>Judgeford, Porirua >>>New Zealand 6006 >>>Phone 0064 4 235-6782 >>>Fax 0064 4 235-6783 >>> >>>__ >>> >>> >>> >>> >>> >>> >>-- >>Marty Connelly >>Victoria, B.C. >>Canada >> >> >> >>_______________________________________________ >>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 > > > > > -- Marty Connelly Victoria, B.C. Canada From andrew.haslett at ilc.gov.au Mon Nov 28 18:38:10 2005 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Tue, 29 Nov 2005 11:08:10 +1030 Subject: [dba-SQLServer] Who Has adp/ade open? Message-ID: <0A870603A2A816459078203FC07F4CD2BE35A7@adl01s055.ilcorp.gov.au> There used to be a free utility called Jet4Admin from FMS (www.fmsinc.com), but they removed it from their site. It displayed a list of users / machines that were currently connected and you could send a message to users / restrict new connections to the mdb / etc. Note sure how it woulr work on an adp though, as I assume it also worked on the .ldb file. I'll see if I can find my copy anyway. Cheers, A -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Tuesday, 29 November 2005 10:19 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who Has adp/ade open? Thanks Marty. Perhaps some background will help. The program is run as a runtime via terminal server. There can be up to 10-15 concurrent users at a time. Part of my program uses the following line to copy a spreadsheet into a table: DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile Sometimes this causes Access to crash (Access has encountered a problem and needs to close ...). In the past it has seemed to be caused by users having several copies of the program open at once (they only need one copy but try to tell them not to keep opening a new instance of the program but to use the one they already have open :'( ) and then closing their terminal server session down but not closing the databases first. When the server is rebooted then the problem line works fine until suddenly it decides to spit out the dummy again. I do have Enterprise Manager and can see what users have the connections to the database. Part of the problem is that there are three versions of the front end all connecting to the same SQL database. I was hoping to try to identify somehow what copies of the front end were open to see if there are any patterns. I am trying to a) find out if the user's work haboits are causing the problem, or b) if it is some other problem, trying to find out what. David At 29/11/2005, you wrote: >Is this because you don't have a version of SQL EM? > >Maybe a call to DBCC in SQL to get user connection. >Another way that might be more exact. >You could use WMI and check through each machine name in the domain and >check for running adp task processes. You could then maybe and I stress >maybe also find out if a particular adp file is open on that machine >via some similar WMI method. > >WMI can also give you all machine names in a domain. > >Look at various sample scripts here >http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts >/ > >This might be time consuming. >Something like this > >'Reports the account name under which each process on a computer is running. >'you would have to run this for every machine name. >Dim strComputer As String >Dim strUserDomain As String >Dim strNameofUser As String >Dim colProcessLiust As Object >Dim objProcess As Object >Dim objWMIService As Object >Dim colproperties as variant 'or is it object > >strComputer = "." 'This is the machine name in the domain. "." >indicates "local" >Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & >"\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ > ("Select * from Win32_Process") >For Each objProcess in colProcessList > colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) > debug.print "Process " & objProcess.Name & " is owned by " _ > & strUserDomain & "\" & strNameOfUser & "." >Next > > >David Emerson wrote: > > >I am trying to identify what users have a database open. adp's don't > >seem to have an ldb file (presumably because they use SQL and not > >Jet). Apart from looking at the current activity in SQL management, > >is there any other way of finding out who has an adp or ade open? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >999 Moonshine Rd, RD 1 > >Judgeford, Porirua > >New Zealand 6006 > >Phone 0064 4 235-6782 > >Fax 0064 4 235-6783 > > > >__ > > > > > > > > > >-- >Marty Connelly >Victoria, B.C. >Canada > > > >_______________________________________________ >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 IMPORTANT - PLEASE READ *** This email any any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From newsgrps at dalyn.co.nz Mon Nov 28 18:45:22 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Nov 2005 13:45:22 +1300 Subject: [dba-SQLServer] Who Has adp/ade open? In-Reply-To: <0A870603A2A816459078203FC07F4CD2BE35A7@adl01s055.ilcorp.go v.au> References: <0A870603A2A816459078203FC07F4CD2BE35A7@adl01s055.ilcorp.gov.au> Message-ID: <7.0.0.16.0.20051129134419.01b4a840@dalyn.co.nz> Thanks Andrew, I suspect it won't help in this case as adp's don't use jet. David At 29/11/2005, you wrote: >There used to be a free utility called Jet4Admin from FMS >(www.fmsinc.com), but they removed it from their site. It displayed a >list of users / machines that were currently connected and you could >send a message to users / restrict new connections to the mdb / etc. > >Note sure how it woulr work on an adp though, as I assume it also worked >on the .ldb file. > >I'll see if I can find my copy anyway. > >Cheers, >A > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David >Emerson >Sent: Tuesday, 29 November 2005 10:19 AM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Who Has adp/ade open? > >Thanks Marty. Perhaps some background will help. > >The program is run as a runtime via terminal server. There can be up to >10-15 concurrent users at a time. >Part of my program uses the following line to copy a spreadsheet into a >table: > >DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", >Me!txtDataFile > >Sometimes this causes Access to crash (Access has encountered a problem >and needs to close ...). > >In the past it has seemed to be caused by users having several copies of >the program open at once (they only need one copy but try to tell them >not to keep opening a new instance of the program but to use the one >they already have open :'( ) and then closing their terminal server >session down but not closing the databases first. > >When the server is rebooted then the problem line works fine until >suddenly it decides to spit out the dummy again. > >I do have Enterprise Manager and can see what users have the connections >to the database. Part of the problem is that there are three versions >of the front end all connecting to the same SQL database. I was hoping >to try to identify somehow what copies of the front end were open to see >if there are any patterns. > >I am trying to a) find out if the user's work haboits are causing the >problem, or b) if it is some other problem, trying to find out what. > >David > > >At 29/11/2005, you wrote: > >Is this because you don't have a version of SQL EM? > > > >Maybe a call to DBCC in SQL to get user connection. > >Another way that might be more exact. > >You could use WMI and check through each machine name in the domain and > > >check for running adp task processes. You could then maybe and I stress > > >maybe also find out if a particular adp file is open on that machine > >via some similar WMI method. > > > >WMI can also give you all machine names in a domain. > > > >Look at various sample scripts here > >http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts > >/ > > > >This might be time consuming. > >Something like this > > > >'Reports the account name under which each process on a computer is >running. > >'you would have to run this for every machine name. > >Dim strComputer As String > >Dim strUserDomain As String > >Dim strNameofUser As String > >Dim colProcessLiust As Object > >Dim objProcess As Object > >Dim objWMIService As Object > >Dim colproperties as variant 'or is it object > > > >strComputer = "." 'This is the machine name in the domain. "." > >indicates "local" > >Set objWMIService = GetObject("winmgmts:" _ > > & "{impersonationLevel=impersonate}!\\" & strComputer & > >"\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ > > ("Select * from Win32_Process") > >For Each objProcess in colProcessList > > colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) > > debug.print "Process " & objProcess.Name & " is owned by " _ > > & strUserDomain & "\" & strNameOfUser & "." > >Next > > > > > >David Emerson wrote: > > > > >I am trying to identify what users have a database open. adp's don't > > > >seem to have an ldb file (presumably because they use SQL and not > > >Jet). Apart from looking at the current activity in SQL management, > > >is there any other way of finding out who has an adp or ade open? > > > > > >Regards > > > > > >David Emerson > > >Dalyn Software Ltd > > >999 Moonshine Rd, RD 1 > > >Judgeford, Porirua > > >New Zealand 6006 > > >Phone 0064 4 235-6782 > > >Fax 0064 4 235-6783 > > > > > >__ > > > > > > > > > > > > > > > >-- > >Marty Connelly > >Victoria, B.C. > >Canada > > > > > > > >_______________________________________________ > >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 > > > >IMPORTANT - PLEASE READ *** This email any any files transmitted >with it are confidential and may contain information protected by >law from disclosure. If you have received this message in error, >please notify the sender immediately and delete this email from your >system. No warranty is given that this email or files, if attached >to this email, are free from computer viruses or other defects. They >are provided on the basis the user assumes all responsibility for >loss, damage or consequence resulting directly or indirectly from >their use, whether caused by the negligence of the sender or not. >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Mon Nov 28 18:55:51 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Nov 2005 13:55:51 +1300 Subject: [dba-SQLServer] Who Has adp/ade open? In-Reply-To: <438BA238.9010402@shaw.ca> References: <7.0.0.16.0.20051129105929.01a41728@dalyn.co.nz> <438B9297.4040902@shaw.ca> <7.0.0.16.0.20051129123608.01a33b70@dalyn.co.nz> <438BA238.9010402@shaw.ca> Message-ID: <7.0.0.16.0.20051129135105.01b40f38@dalyn.co.nz> Interesting. Terminal Server must open separate instances of the programme because there is no problems with several users all having the programme open at the same time and updating data. There also doesn't seem to be any restrictions as to the number of times the programme is opened in the same session!! Thanks for the ideas for restricting the number of times they can open the programme. I hope it doesn't get to that but it may have too. David At 29/11/2005, you wrote: >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ac2003_ta/html/odc_acmultibest.asp > >Opening an Access Project >If you try to open an Access project (.adp) file or an Access project >extension (.ade) file in a multi-user environment, you may receive an >error message similar to the following: >"The database DatabaseName will be opened read-only because one of the >following occurred: The file is locked for editing by another user, or >the file (or the folder in which it is located) is marked as read-only, >or you specified that you wanted to open this file read-only." >This error message occurs because an Access project is strictly a client >and has no multi-user capability. The workaround for this issue is to >deploy a copy of the .adp file or .ade file to each computer. > >So something different must be happening under terminal services > >I assume each user is running a copy of the adp under a seperate session. >and then opening more in the same session. > >What you could do in code from an autoexec macro >is check if a .txt file exists with anything in it. >If it doesn't exist continue on using the existance as a switch. >create txt file >and deleting on close of the adp > >Or maybe better create a table entry in sql server with the user name on >logon >deleteing the name on logoff. >and check beforehand if that user name pre-exists then dump em out with >application.quit >and a friendly warning. >This might be a problem if there is a line drop. Then there would >have to be intervention to remove the user name from the table. > >Another way might be to run a vbs script to startup the adp terminal session >and check if the adp file for that session is already open. > >or this used to work with mdb's from the myst's of time not sure of adp's > >'Usage: > ' debug.Print IsItRunning("MSAccess", "System") >' to check Access itself > > 'Print IsItRunning("MSAccess", CurrentDb().Name) >' to check the specific application > > ' Print IsItRunning("MSAccess", "System.mda") >' to check that specific security file > >Public Function IsItRunning(strApp As String, strTopic As String) As >Boolean > 'Doesn't allow multiple copies of Access program running at the same >time > 'Implement to stop users from starting 2 copies of program > ' Access version dependant, use Long for Access 97; int for Access 2 > Dim Channel As Long > Application.SetOption ("Ignore DDE Requests"), True > On Error Resume Next > Channel = DDEInitiate(strApp, strTopic) > IsItRunning = (0 <> Channel) > DDETerminate Channel > On Error GoTo 0 > Application.SetOption ("Ignore DDE Requests"), False >End Function > > > > >David Emerson wrote: > > >Thanks Marty. Perhaps some background will help. > > > >The program is run as a runtime via terminal server. There can be up > >to 10-15 concurrent users at a time. > >Part of my program uses the following line to copy a spreadsheet > into a table: > > > >DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile > > > >Sometimes this causes Access to crash (Access has encountered a > >problem and needs to close ...). > > > >In the past it has seemed to be caused by users having several copies > >of the program open at once (they only need one copy but try to tell > >them not to keep opening a new instance of the program but to use the > >one they already have open :'( ) and then closing their terminal > >server session down but not closing the databases first. > > > >When the server is rebooted then the problem line works fine until > >suddenly it decides to spit out the dummy again. > > > >I do have Enterprise Manager and can see what users have the > >connections to the database. Part of the problem is that there are > >three versions of the front end all connecting to the same SQL > >database. I was hoping to try to identify somehow what copies of the > >front end were open to see if there are any patterns. > > > >I am trying to a) find out if the user's work haboits are causing the > >problem, or b) if it is some other problem, trying to find out what. > > > >David > > > > > >At 29/11/2005, you wrote: > > > > > >>Is this because you don't have a version of SQL EM? > >> > >>Maybe a call to DBCC in SQL to get user connection. > >>Another way that might be more exact. > >>You could use WMI and check through each machine name in the domain and > >>check for running > >>adp task processes. You could then maybe and I stress maybe also find > >>out if a particular adp file is open > >>on that machine via some similar WMI method. > >> > >>WMI can also give you all machine names in a domain. > >> > >>Look at various sample scripts here > >>http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ > >> > >>This might be time consuming. > >>Something like this > >> > >>'Reports the account name under which each process on a computer > is running. > >>'you would have to run this for every machine name. > >>Dim strComputer As String > >>Dim strUserDomain As String > >>Dim strNameofUser As String > >>Dim colProcessLiust As Object > >>Dim objProcess As Object > >>Dim objWMIService As Object > >>Dim colproperties as variant 'or is it object > >> > >>strComputer = "." 'This is the machine name in the domain. "." > >>indicates "local" > >>Set objWMIService = GetObject("winmgmts:" _ > >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > >>Set colProcessList = objWMIService.ExecQuery _ > >> ("Select * from Win32_Process") > >>For Each objProcess in colProcessList > >> colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) > >> debug.print "Process " & objProcess.Name & " is owned by " _ > >> & strUserDomain & "\" & strNameOfUser & "." > >>Next > >> > >> > >>David Emerson wrote: > >> > >> > >> > >>>I am trying to identify what users have a database open. adp's don't > >>>seem to have an ldb file (presumably because they use SQL and not > >>>Jet). Apart from looking at the current activity in SQL management, > >>>is there any other way of finding out who has an adp or ade open? > >>> > >>>Regards > >>> > >>>David Emerson > >>>Dalyn Software Ltd > >>>999 Moonshine Rd, RD 1 > >>>Judgeford, Porirua > >>>New Zealand 6006 > >>>Phone 0064 4 235-6782 > >>>Fax 0064 4 235-6783 From cfoust at infostatsystems.com Tue Nov 29 16:10:45 2005 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 29 Nov 2005 14:10:45 -0800 Subject: [dba-SQLServer] Who Has adp/ade open? Message-ID: The FMS utility was probably removed because it is fairly easy to build one for yourself now. It uses the ADO Jet UserRoster to retrieve the information. I built something along those lines for our internal use in my office. Charlotte Foust -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Haslett, Andrew Sent: Monday, November 28, 2005 4:38 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who Has adp/ade open? There used to be a free utility called Jet4Admin from FMS (www.fmsinc.com), but they removed it from their site. It displayed a list of users / machines that were currently connected and you could send a message to users / restrict new connections to the mdb / etc. Note sure how it woulr work on an adp though, as I assume it also worked on the .ldb file. I'll see if I can find my copy anyway. Cheers, A -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Tuesday, 29 November 2005 10:19 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who Has adp/ade open? Thanks Marty. Perhaps some background will help. The program is run as a runtime via terminal server. There can be up to 10-15 concurrent users at a time. Part of my program uses the following line to copy a spreadsheet into a table: DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile Sometimes this causes Access to crash (Access has encountered a problem and needs to close ...). In the past it has seemed to be caused by users having several copies of the program open at once (they only need one copy but try to tell them not to keep opening a new instance of the program but to use the one they already have open :'( ) and then closing their terminal server session down but not closing the databases first. When the server is rebooted then the problem line works fine until suddenly it decides to spit out the dummy again. I do have Enterprise Manager and can see what users have the connections to the database. Part of the problem is that there are three versions of the front end all connecting to the same SQL database. I was hoping to try to identify somehow what copies of the front end were open to see if there are any patterns. I am trying to a) find out if the user's work haboits are causing the problem, or b) if it is some other problem, trying to find out what. David At 29/11/2005, you wrote: >Is this because you don't have a version of SQL EM? > >Maybe a call to DBCC in SQL to get user connection. >Another way that might be more exact. >You could use WMI and check through each machine name in the domain and >check for running adp task processes. You could then maybe and I stress >maybe also find out if a particular adp file is open on that machine >via some similar WMI method. > >WMI can also give you all machine names in a domain. > >Look at various sample scripts here >http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts >/ > >This might be time consuming. >Something like this > >'Reports the account name under which each process on a computer is running. >'you would have to run this for every machine name. >Dim strComputer As String >Dim strUserDomain As String >Dim strNameofUser As String >Dim colProcessLiust As Object >Dim objProcess As Object >Dim objWMIService As Object >Dim colproperties as variant 'or is it object > >strComputer = "." 'This is the machine name in the domain. "." >indicates "local" Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & >"\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ > ("Select * from Win32_Process") >For Each objProcess in colProcessList > colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) > debug.print "Process " & objProcess.Name & " is owned by " _ > & strUserDomain & "\" & strNameOfUser & "." >Next > > >David Emerson wrote: > > >I am trying to identify what users have a database open. adp's don't > >seem to have an ldb file (presumably because they use SQL and not > >Jet). Apart from looking at the current activity in SQL management, > >is there any other way of finding out who has an adp or ade open? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >999 Moonshine Rd, RD 1 > >Judgeford, Porirua > >New Zealand 6006 > >Phone 0064 4 235-6782 > >Fax 0064 4 235-6783 > > > >__ > > > > > > > > > >-- >Marty Connelly >Victoria, B.C. >Canada > > > >_______________________________________________ >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 IMPORTANT - PLEASE READ *** This email any any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Tue Nov 29 23:52:49 2005 From: artful at rogers.com (Arthur Fuller) Date: Wed, 30 Nov 2005 00:52:49 -0500 Subject: [dba-SQLServer] Who Has adp/ade open? In-Reply-To: <438BA238.9010402@shaw.ca> Message-ID: <200511300552.jAU5qkJ08763@databaseadvisors.com> You can just open Query Analyzer and run sp_who against the database of interest. You will probably see multiple connections per user. I could be wrong, but I think that this is because Access might open multiple connections to deal with, say, a form that has several data-driven combo-boxes as well as its basic record source. Nevertheless, you could always write a table UDF that selects distinct, based on the results of the sp_who stored procedure. To view this procedure, just open the master database, find it and view its properties. You can then copy and paste to a new sproc or UDF and make your desired changes. HTH, Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of MartyConnelly Sent: November 28, 2005 7:35 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who Has adp/ade open? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ac2003_ ta/html/odc_acmultibest.asp Opening an Access Project If you try to open an Access project (.adp) file or an Access project extension (.ade) file in a multi-user environment, you may receive an error message similar to the following: "The database DatabaseName will be opened read-only because one of the following occurred: The file is locked for editing by another user, or the file (or the folder in which it is located) is marked as read-only, or you specified that you wanted to open this file read-only." This error message occurs because an Access project is strictly a client and has no multi-user capability. The workaround for this issue is to deploy a copy of the .adp file or .ade file to each computer. So something different must be happening under terminal services I assume each user is running a copy of the adp under a seperate session. and then opening more in the same session. What you could do in code from an autoexec macro is check if a .txt file exists with anything in it. If it doesn't exist continue on using the existance as a switch. create txt file and deleting on close of the adp Or maybe better create a table entry in sql server with the user name on logon deleteing the name on logoff. and check beforehand if that user name pre-exists then dump em out with application.quit and a friendly warning. This might be a problem if there is a line drop. Then there would have to be intervention to remove the user name from the table. Another way might be to run a vbs script to startup the adp terminal session and check if the adp file for that session is already open. or this used to work with mdb's from the myst's of time not sure of adp's 'Usage: ' debug.Print IsItRunning("MSAccess", "System") ' to check Access itself 'Print IsItRunning("MSAccess", CurrentDb().Name) ' to check the specific application ' Print IsItRunning("MSAccess", "System.mda") ' to check that specific security file Public Function IsItRunning(strApp As String, strTopic As String) As Boolean 'Doesn't allow multiple copies of Access program running at the same time 'Implement to stop users from starting 2 copies of program ' Access version dependant, use Long for Access 97; int for Access 2 Dim Channel As Long Application.SetOption ("Ignore DDE Requests"), True On Error Resume Next Channel = DDEInitiate(strApp, strTopic) IsItRunning = (0 <> Channel) DDETerminate Channel On Error GoTo 0 Application.SetOption ("Ignore DDE Requests"), False End Function David Emerson wrote: >Thanks Marty. Perhaps some background will help. > >The program is run as a runtime via terminal server. There can be up >to 10-15 concurrent users at a time. >Part of my program uses the following line to copy a spreadsheet into a table: > >DoCmd.TransferSpreadsheet acImport, , "dbo.ttmpTemporary", Me!txtDataFile > >Sometimes this causes Access to crash (Access has encountered a >problem and needs to close ...). > >In the past it has seemed to be caused by users having several copies >of the program open at once (they only need one copy but try to tell >them not to keep opening a new instance of the program but to use the >one they already have open :'( ) and then closing their terminal >server session down but not closing the databases first. > >When the server is rebooted then the problem line works fine until >suddenly it decides to spit out the dummy again. > >I do have Enterprise Manager and can see what users have the >connections to the database. Part of the problem is that there are >three versions of the front end all connecting to the same SQL >database. I was hoping to try to identify somehow what copies of the >front end were open to see if there are any patterns. > >I am trying to a) find out if the user's work haboits are causing the >problem, or b) if it is some other problem, trying to find out what. > >David > > >At 29/11/2005, you wrote: > > >>Is this because you don't have a version of SQL EM? >> >>Maybe a call to DBCC in SQL to get user connection. >>Another way that might be more exact. >>You could use WMI and check through each machine name in the domain and >>check for running >>adp task processes. You could then maybe and I stress maybe also find >>out if a particular adp file is open >>on that machine via some similar WMI method. >> >>WMI can also give you all machine names in a domain. >> >>Look at various sample scripts here >>http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ >> >>This might be time consuming. >>Something like this >> >>'Reports the account name under which each process on a computer is running. >>'you would have to run this for every machine name. >>Dim strComputer As String >>Dim strUserDomain As String >>Dim strNameofUser As String >>Dim colProcessLiust As Object >>Dim objProcess As Object >>Dim objWMIService As Object >>Dim colproperties as variant 'or is it object >> >>strComputer = "." 'This is the machine name in the domain. "." >>indicates "local" >>Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>Set colProcessList = objWMIService.ExecQuery _ >> ("Select * from Win32_Process") >>For Each objProcess in colProcessList >> colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) >> debug.print "Process " & objProcess.Name & " is owned by " _ >> & strUserDomain & "\" & strNameOfUser & "." >>Next >> >> >>David Emerson wrote: >> >> >> >>>I am trying to identify what users have a database open. adp's don't >>>seem to have an ldb file (presumably because they use SQL and not >>>Jet). Apart from looking at the current activity in SQL management, >>>is there any other way of finding out who has an adp or ade open? >>> >>>Regards >>> >>>David Emerson >>>Dalyn Software Ltd >>>999 Moonshine Rd, RD 1 >>>Judgeford, Porirua >>>New Zealand 6006 >>>Phone 0064 4 235-6782 >>>Fax 0064 4 235-6783 >>> >>>__ >>> >>> >>> >>> >>> >>> >>-- >>Marty Connelly >>Victoria, B.C. >>Canada >> >> >> >>_______________________________________________ >>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 > > > > > -- Marty Connelly Victoria, B.C. Canada _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Jeff at outbaktech.com Wed Nov 30 13:15:29 2005 From: Jeff at outbaktech.com (Jeff Barrows) Date: Wed, 30 Nov 2005 13:15:29 -0600 Subject: [dba-SQLServer] Replication between Server and Laptop Message-ID: Just wondering if anyone had a tried and true method for syncing the SQL Server data to a laptop (for weekend, on call people) but not needing to sync back from the laptop to the server. Having never needed to use replication, are there any gotcha's I need to look out for? Jeff Barrows MCP, MCAD, MCSD Outbak Technologies, LLC Racine, WI jeff at outbaktech.com From john at winhaven.net Wed Nov 30 13:52:38 2005 From: john at winhaven.net (John Bartow) Date: Wed, 30 Nov 2005 13:52:38 -0600 Subject: [dba-SQLServer] Replication between Server and Laptop In-Reply-To: Message-ID: <001701c5f5e7$9fd67650$7b01a8c0@ScuzzPaq> Hi Jeff, One forthcoming gotcha: as of SQL Server 2005 Access is no longer able to be a replication subscriber to SQL Server. Probably missed the point here but thought I'd share that -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Just wondering if anyone had a tried and true method for syncing the SQL Server data to a laptop (for weekend, on call people) but not needing to sync back from the laptop to the server. Having never needed to use replication, are there any gotcha's I need to look out for?