From jwcolby at colbyconsulting.com Fri Mar 5 13:21:45 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 05 Mar 2010 14:21:45 -0500 Subject: [dba-SQLServer] Update without using a view Message-ID: <4B9159C9.7000701@colbyconsulting.com> Guys, I have a recurring situation where I will get a zip9 and need to split it into zip5 / zip4. I add the two fields to the table, then use right() and left() to carve out the pieces in a query as follows: SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 FROM dbo.AZSMKRevalidate That works great. Now if I save that to a view vSplitzip and use the following: the update happens and all is well. My problem is that I really want to not have to create the view, but rather to do something like: UPDATE (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 FROM dbo.AZSMKRevalidate) SET [Zip5] = [SplitZip5] ,[Zip4] = [SplitZip4] IOW to replace the view with the exact same SQL statement as is stored in the view. When I do that however SQL Server pukes, with the infamous "error near (". Obviously I need the changes to post back down to the original table that I created the new fields on. I want to do this because if I can do it this way, then I can throw everything into a stored procedure where I pass in the name of the db and table, have the SP create the new fields in the table, build the SQL statement on the fly, and do the split on any db / table. So is it possible to do an update to a select statement like this? I have seen " AS T1" kind of thing but tried that and couldn't get that to work either. Any assistance greatly appreciated. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Mar 5 14:19:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 05 Mar 2010 15:19:59 -0500 Subject: [dba-SQLServer] [dba-VB] Update without using a view In-Reply-To: <4B9159C9.7000701@colbyconsulting.com> References: <4B9159C9.7000701@colbyconsulting.com> Message-ID: <4B91676F.60000@colbyconsulting.com> Guys, Sorry the previous email got mangled in the creation. I have a recurring situation where I will get a zip9 and need to split it into zip5 / zip4. I add the two fields to the table, then use right() and left() to carve out the pieces in a query as follows: SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 FROM dbo.AZSMKRevalidate That works great. Now if I save that to a view vSplitzip and use the following: UPDATE vSplitZip SET [Zip5] = [SplitZip5] ,[Zip4] = [SplitZip4]> the update happens and all is well. My problem is that I really want to not have to create the view, but rather to do something like: UPDATE (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 FROM dbo.AZSMKRevalidate) SET [Zip5] = [SplitZip5] ,[Zip4] = [SplitZip4] IOW to replace the view with the exact same SQL statement as is stored in the view. When I do that however SQL Server pukes, with the infamous "error near (". Obviously I need the changes to post back down to the original table that I created the new fields on. I want to do this because if I can do it this way, then I can throw everything into a stored procedure where I pass in the name of the db and table, have the SP create the new fields in the table, build the SQL statement on the fly, and do the split on any db / table. So is it possible to do an update to a select statement like this? I have seen " AS T1" kind of thing but tried that and couldn't get that to work either. Any assistance greatly appreciated. John W. Colby www.ColbyConsulting.com jwcolby wrote: > Guys, > > I have a recurring situation where I will get a zip9 and need to split it into zip5 / zip4. I add > the two fields to the table, then use right() and left() to carve out the pieces in a query as follows: > > SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 > FROM dbo.AZSMKRevalidate > > That works great. > > Now if I save that to a view vSplitzip and use the following: > > UPDATE vSplitZip > SET [Zip5] = [SplitZip5] > ,[Zip4] = [SplitZip4] > > the update happens and all is well. > > My problem is that I really want to not have to create the view, but rather to do something like: > > UPDATE > (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 > FROM dbo.AZSMKRevalidate) > > SET [Zip5] = [SplitZip5] > ,[Zip4] = [SplitZip4] > > IOW to replace the view with the exact same SQL statement as is stored in the view. > > When I do that however SQL Server pukes, with the infamous "error near (". Obviously I need the > changes to post back down to the original table that I created the new fields on. > > I want to do this because if I can do it this way, then I can throw everything into a stored > procedure where I pass in the name of the db and table, have the SP create the new fields in the > table, build the SQL statement on the fly, and do the split on any db / table. > > So is it possible to do an update to a select statement like this? I have seen " AS T1" kind of > thing but tried that and couldn't get that to work either. > > Any assistance greatly appreciated. > From jwcolby at colbyconsulting.com Fri Mar 5 14:39:05 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 05 Mar 2010 15:39:05 -0500 Subject: [dba-SQLServer] [dba-VB] Update without using a view In-Reply-To: <4B91676F.60000@colbyconsulting.com> References: <4B9159C9.7000701@colbyconsulting.com> <4B91676F.60000@colbyconsulting.com> Message-ID: <4B916BE9.6020506@colbyconsulting.com> And of course I figured it out. WITH T1 AS (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 FROM dbo.AZSMKRevalidate) UPDATE T1 SET [Zip5] = [SplitZip5] ,[Zip4] = [SplitZip4] GO Sorry for the ring. John W. Colby www.ColbyConsulting.com jwcolby wrote: > Guys, > > Sorry the previous email got mangled in the creation. > > I have a recurring situation where I will get a zip9 and need to split it into zip5 / zip4. I add > the two fields to the table, then use right() and left() to carve out the pieces in a query as follows: > > SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 > FROM dbo.AZSMKRevalidate > > That works great. > > Now if I save that to a view vSplitzip and use the following: > > UPDATE vSplitZip > SET [Zip5] = [SplitZip5] > ,[Zip4] = [SplitZip4]> > > the update happens and all is well. > > My problem is that I really want to not have to create the view, but rather to do something like: > > UPDATE > (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 > FROM dbo.AZSMKRevalidate) > > SET [Zip5] = [SplitZip5] > ,[Zip4] = [SplitZip4] > > IOW to replace the view with the exact same SQL statement as is stored in the view. > > When I do that however SQL Server pukes, with the infamous "error near (". Obviously I need the > changes to post back down to the original table that I created the new fields on. > > I want to do this because if I can do it this way, then I can throw everything into a stored > procedure where I pass in the name of the db and table, have the SP create the new fields in the > table, build the SQL statement on the fly, and do the split on any db / table. > > So is it possible to do an update to a select statement like this? I have seen " AS T1" kind of > thing but tried that and couldn't get that to work either. > > Any assistance greatly appreciated. > > > John W. Colby > www.ColbyConsulting.com > > > jwcolby wrote: >> Guys, >> >> I have a recurring situation where I will get a zip9 and need to split it into zip5 / zip4. I add >> the two fields to the table, then use right() and left() to carve out the pieces in a query as follows: >> >> SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 >> FROM dbo.AZSMKRevalidate >> >> That works great. >> >> Now if I save that to a view vSplitzip and use the following: >> >> UPDATE vSplitZip >> SET [Zip5] = [SplitZip5] >> ,[Zip4] = [SplitZip4] > > >> the update happens and all is well. >> >> My problem is that I really want to not have to create the view, but rather to do something like: >> >> UPDATE >> (SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 >> FROM dbo.AZSMKRevalidate) >> >> SET [Zip5] = [SplitZip5] >> ,[Zip4] = [SplitZip4] >> >> IOW to replace the view with the exact same SQL statement as is stored in the view. >> >> When I do that however SQL Server pukes, with the infamous "error near (". Obviously I need the >> changes to post back down to the original table that I created the new fields on. >> >> I want to do this because if I can do it this way, then I can throw everything into a stored >> procedure where I pass in the name of the db and table, have the SP create the new fields in the >> table, build the SQL statement on the fly, and do the split on any db / table. >> >> So is it possible to do an update to a select statement like this? I have seen " AS T1" kind of >> thing but tried that and couldn't get that to work either. >> >> Any assistance greatly appreciated. >> > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Sat Mar 6 21:10:20 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 06 Mar 2010 22:10:20 -0500 Subject: [dba-SQLServer] SQL Saturday Message-ID: <4B93191C.3000806@colbyconsulting.com> I went to the SQL Saturday 33 down in Charlotte today. As a non-dba it was mostly over my head but two sessions were most useful to me. One was on "the state of (solid state) disks" which was about where SSDs are today and what they can and cannot do for the database. The consensus is pretty much that they are not yet ready for prime time. That said the enterprise versions (read BIG BUCKS) are being used today! And yet for read-only applications they shine. Mine is a read-only application so I think I will proceed carefully on that front. The other session that was very interesting to me is SQL Server 2008 compression. This is currently only in Enterprise and (lucky for me) developer's edition (which is enterprise). I knew about the backup compression and started using it a couple of months ago now, but was not previously aware of the data compression side. So when I got home I started testing data compression on my databases. Interesting but probably not overly useful for me. The main table compressed about 50% IF I rearranged my CLUSTERED index to get all of the rows in Zip 5/4 order. However indexes ended up more like 18% or so. I had previously used just my int32 PKID as the key on the CLUSTERED index, but the compression was very slight with that. Reindexing on zip5/4/pkid bumped that up to 50%... for the main table. Sadly the indexes stayed well below 20%. SQL Server can compress at the row or page level and in order to get anything truly useful I had to go to the page. Even then the indexes just didn't compress spectacularly well. The problem is that they stay compressed even in memory. While that sounds good, and would be if you got a great compression ratio, it means overhead at the instant of use every time a value is used. 50% would probably be worthwhile. 18%... I am guessing not. I am not really knowledgeable enough to do good testing, but my gut tells me that 18% on indexes will be about the break even point or even less in terms of performance gain. The idea of course is that compression allows more data to move on/off the disk in a given time unit, and likewise allows more data to stay in memory at any given time. However that is at the expense of CPU overhead to do the read decompression as EACH DATA ITEM is used. Every time it is used. Indexes in particular would take a hit exactly because they are used so intensively for joins and where clauses. I had high hopes but I now doubt the usefulness in my application. If anyone out there is using this data compression and can chime in from your experience please do. One thing that MIGHT save the day is that apparently the granularity of the compression is fairly tight, i.e. you can specify that any given index is or is not compressed. It really sounds like a tuning nightmare to me. OTOH I do use the compression for backups, and am loving it. Very significant file size reduction AND speed improvements. any opinions out there? -- John W. Colby www.ColbyConsulting.com From robert at webedb.com Sun Mar 7 11:27:48 2010 From: robert at webedb.com (Robert Stewart) Date: Sun, 07 Mar 2010 11:27:48 -0600 Subject: [dba-SQLServer] Update without using a view In-Reply-To: References: Message-ID: <201003071727.o27HRoYv016567@databaseadvisors.com> John, I think that it is simpler than that. UPDATE dbo.AZSMKRevalidate SET Zip5 = LEFT(Zip9, 5), Zip4 = RIGHT(Zip9, 4) GO Robert At 12:00 PM 3/6/2010, you wrote: >Date: Fri, 05 Mar 2010 15:39:05 -0500 >From: jwcolby >Subject: Re: [dba-SQLServer] [dba-VB] Update without using a view >To: "Discussion concerning Visual Basic and related programming > issues." , Sqlserver-Dba > >Message-ID: <4B916BE9.6020506 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >And of course I figured it out. > >WITH T1 AS >(SELECT LEFT(Zip9, 5) AS SplitZip5, RIGHT(Zip9, 4) AS SplitZip4, Zip5, Zip4 >FROM dbo.AZSMKRevalidate) > >UPDATE T1 SET [Zip5] = [SplitZip5] > ,[Zip4] = [SplitZip4] >GO > >Sorry for the ring. > >John W. Colby From jwcolby at colbyconsulting.com Thu Mar 11 07:34:37 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 11 Mar 2010 08:34:37 -0500 Subject: [dba-SQLServer] SQL Server 2008 install Message-ID: <4B98F16D.7000308@colbyconsulting.com> Well THAT was a PITA. I installed SQL Server 2008 on my server awhile back. Since then my dev laptop, which was running SQL Server Express 2005, could not connect to the databases on the server. So last night late I decided to install SQL Server 2008 on the dev laptop. First of all, it ain't fast. Second it kept failing with this warning and that warning. In the end I had to completely uninstall all the old SQL Server stuff. It simply did NOT LIKE Express 2005 and wouldn't upgrade or clean install over it. Since a complete uninstall, the 2008 install seems to be proceeding smoothly. -- John W. Colby www.ColbyConsulting.com From accessd at shaw.ca Thu Mar 11 11:41:22 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 11 Mar 2010 09:41:22 -0800 Subject: [dba-SQLServer] SQL Server 2008 install In-Reply-To: <4B98F16D.7000308@colbyconsulting.com> References: <4B98F16D.7000308@colbyconsulting.com> Message-ID: <1F3A94087FFD4A5EA57A4F29EA3DC1B6@creativesystemdesigns.com> I have found that each MS SQL install needs it own server... they just do not play well together. Actually MS SQL needs its own server as it also a pig when it comes system resources and makes no allowances for competition. I recntly had to move Exchange and MS SQL to their own server... As you can imagine such bundles systems as SMS (Small business server) are ssssslllllloooowwwww and prone to weird errors. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, March 11, 2010 5:35 AM To: VBA; Dba-Sqlserver Subject: [dba-SQLServer] SQL Server 2008 install Well THAT was a PITA. I installed SQL Server 2008 on my server awhile back. Since then my dev laptop, which was running SQL Server Express 2005, could not connect to the databases on the server. So last night late I decided to install SQL Server 2008 on the dev laptop. First of all, it ain't fast. Second it kept failing with this warning and that warning. In the end I had to completely uninstall all the old SQL Server stuff. It simply did NOT LIKE Express 2005 and wouldn't upgrade or clean install over it. Since a complete uninstall, the 2008 install seems to be proceeding smoothly. -- 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 Thu Mar 11 14:32:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 11 Mar 2010 15:32:33 -0500 Subject: [dba-SQLServer] Backups and the art of Zen Message-ID: <4B995361.6050400@colbyconsulting.com> I spent many hours searching for a free SQL Server backup tool (Idera) and writing stored procedures to automatically back up all of my databases, mount them, unmount them etc., from C#. Then I updated to SQL Server 2008 and it all broke. The Idera Free backup was a DLL and apparently it is simply incompatible with SQL Server 2008. Sigh. Luckily my other server still has 2005 installed so... I need to get all of my backups restored to 2005 so that they are available in case I need them, then write them back out using 2008 and its wonderful compression. I have written C# code to do that, so once I get the backups restored I should be able to re-backup using the latest and greatest and don't even need the Idera Free backup - which is a good thing since it has since gone away entirely. Lesson learned - free is only free until it's not. So, I had never automated restoring the lot of backups in a directory. Never needed to. However the Idera Free restore does that and I have that working on the 2005 server so... all I need is a method of reading the files in a directory. I go a googlin' and what pops up but Phil Factor. I LOVE Phil Factor to begin with. Just a cool guy. Anyway within a few minutes I discover a largeish piece of code that looks like it will work. Except that it needs the OLEDB stuff turned on in surface area config. Except that I've shut down all of the extraneous SQL Server services (because this server normally just hosts my VMs). I finally get the right service started, the OLEDB stuff enabled, turn off / on all the services one last time and voila, TSQL code that hands me a recordset of file names in a query. And on, and on, and on. With luck, before I go to bed tonight, I will have restored my backups to the alternate server. I'm a wondering now... can I backup a database on server A running SQl Server 2005 from Server B running 2008? I guess I'll find out. How to waste a day. Ahhhoooooommmmm this is what I do for a living... Ahhhoooooommmmm this is what I do for a living... Ahhhoooooommmmm this is what I do for a living... -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Mar 12 16:58:28 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 12 Mar 2010 17:58:28 -0500 Subject: [dba-SQLServer] Using Visual Studio with SQL Server 2008 Message-ID: <4B9AC714.4020604@colbyconsulting.com> Is anyone completely replacing SQL Server Management Studio with Visual Studio 2008? Is that possible? I am in VS2008 a lot these days doing C# stuff and it would be awesome if I could just stop using SSMS. I would love to be able to step through my SP and UDFs with a debugger, watch variables and the like, but I just don't know how. Is anyone doing this? -- John W. Colby www.ColbyConsulting.com From bheid at sc.rr.com Sat Mar 13 08:39:14 2010 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 13 Mar 2010 09:39:14 -0500 Subject: [dba-SQLServer] Using Visual Studio with SQL Server 2008 In-Reply-To: <4B9AC714.4020604@colbyconsulting.com> References: <4B9AC714.4020604@colbyconsulting.com> Message-ID: <001e01cac2ba$f4159080$dc40b180$@rr.com> Hi John, I still mostly use SSMS, but you can step through sprocs from VS2008. IIRC, under server explorer, find the sproc and right-click. Then I think there is a debug menu item. This lets you step through the sproc. I was playing around when I found this, so not sure if I remember correctly. But yes, I think you can do a lot against SQL via VS2008. Bobby -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, March 12, 2010 5:58 PM To: Sqlserver-Dba Subject: [dba-SQLServer] Using Visual Studio with SQL Server 2008 Is anyone completely replacing SQL Server Management Studio with Visual Studio 2008? Is that possible? I am in VS2008 a lot these days doing C# stuff and it would be awesome if I could just stop using SSMS. I would love to be able to step through my SP and UDFs with a debugger, watch variables and the like, but I just don't know how. Is anyone doing this? -- 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 Mar 15 12:46:35 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 15 Mar 2010 13:46:35 -0400 Subject: [dba-SQLServer] Copy database Message-ID: <4B9E727B.3050906@colbyconsulting.com> I need to copy a template database to a new name. Someone mentioned capturing or otherwise viewing the code that the wizard generates for doing the task. Can anyone tell me how to do this in sufficient detail that I could actually get it done? -- John W. Colby www.ColbyConsulting.com From David at sierranevada.com Mon Mar 15 13:05:26 2010 From: David at sierranevada.com (David Lewis) Date: Mon, 15 Mar 2010 11:05:26 -0700 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 6 In-Reply-To: References: Message-ID: <01606FC26AD0E54B8348D886D0C074D33C286F991C@schwarz.sierranevada.corp> Highlight the db in SSMS, right click and "script database as...". View code and edit as needed. d. lewis Message: 1 Date: Mon, 15 Mar 2010 13:46:35 -0400 From: jwcolby Subject: [dba-SQLServer] Copy database To: Sqlserver-Dba Message-ID: <4B9E727B.3050906 at colbyconsulting.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I need to copy a template database to a new name. Someone mentioned capturing or otherwise viewing the code that the wizard generates for doing the task. Can anyone tell me how to do this in sufficient detail that I could actually get it done? -- John W. Colby www.ColbyConsulting.com The contents of this e-mail message and its attachments are covered by the Electronic Communications Privacy Act (18 U.S.C. 2510-2521) and are intended solely for the addressee(s) hereof. If you are not the named recipient, or the employee or agent responsible for delivering the message to the intended recipient, or if this message has been addressed to you in error, you are directed not to read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. If you have received this communication in error, please notify us immediately by return e-mail or by telephone, 530-893-3520, and delete and/or destroy all copies of the message immediately. From jwcolby at colbyconsulting.com Mon Mar 15 14:54:57 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 15 Mar 2010 15:54:57 -0400 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 6 In-Reply-To: <01606FC26AD0E54B8348D886D0C074D33C286F991C@schwarz.sierranevada.corp> References: <01606FC26AD0E54B8348D886D0C074D33C286F991C@schwarz.sierranevada.corp> Message-ID: <4B9E9091.90602@colbyconsulting.com> Copy database is not a choice. Create is but that just creates a database of that name, it does not copy the objects themselves to the new database. John W. Colby www.ColbyConsulting.com David Lewis wrote: > Highlight the db in SSMS, right click and "script database as...". View code and edit as needed. > d. lewis > > Message: 1 > Date: Mon, 15 Mar 2010 13:46:35 -0400 > From: jwcolby > Subject: [dba-SQLServer] Copy database > To: Sqlserver-Dba > Message-ID: <4B9E727B.3050906 at colbyconsulting.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I need to copy a template database to a new name. Someone mentioned capturing or otherwise viewing > the code that the wizard generates for doing the task. Can anyone tell me how to do this in > sufficient detail that I could actually get it done? > > -- > John W. Colby > www.ColbyConsulting.com > > > The contents of this e-mail message and its attachments are covered by the Electronic Communications Privacy Act (18 U.S.C. 2510-2521) and are intended solely for the addressee(s) hereof. If you are not the named recipient, or the employee or agent responsible for delivering the message to the intended recipient, or if this message has been addressed to you in error, you are directed not to read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. If you have received this communication in error, please notify us immediately by return e-mail or by telephone, 530-893-3520, and delete and/or destroy all copies of the message immediately. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fuller.artful at gmail.com Mon Mar 15 15:06:49 2010 From: fuller.artful at gmail.com (Arthur Fuller) Date: Mon, 15 Mar 2010 16:06:49 -0400 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 6 In-Reply-To: <4B9E9091.90602@colbyconsulting.com> References: <01606FC26AD0E54B8348D886D0C074D33C286F991C@schwarz.sierranevada.corp> <4B9E9091.90602@colbyconsulting.com> Message-ID: <29f585dd1003151306p8c8bc6ep99f16403ecfb5806@mail.gmail.com> Right-click the database name and you should see a "Script Objects" item. >From there you can script the whole database including its tables, views, sprocs, UDFs -- and even the insert statements to populate the tables. (I vaguely recall that that feature is unavailable in some versions, but I might be thinking of SQL 2005. Incidentally, depending on requirements, I have developed a simple scheme based on mdeldb. Because SQL creates a new database based entirely on the contents of modeldb, I now have a collection of databases modeldb_xxxx, where xxxx denotes the type of model I want. So I do a couple of quick renames to select a new model, and then a simple New Database command and presto, all nice and pretty. I have used this to include a bunch of tables I will almost always want, such as Contacts, Cities, Province/States and so on. Another version of modeldb is aimed at typical order-entry systems. Another targets time-and-billing apps. I find that this works quite well. hth, Arthur On Mon, Mar 15, 2010 at 3:54 PM, jwcolby wrote: > Copy database is not a choice. Create is but that just creates a database > of that name, it does not > copy the objects themselves to the new database. > > John W. Colby > www.ColbyConsulting.com > > From jwcolby at colbyconsulting.com Mon Mar 15 15:31:34 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 15 Mar 2010 16:31:34 -0400 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 6 In-Reply-To: <29f585dd1003151306p8c8bc6ep99f16403ecfb5806@mail.gmail.com> References: <01606FC26AD0E54B8348D886D0C074D33C286F991C@schwarz.sierranevada.corp> <4B9E9091.90602@colbyconsulting.com> <29f585dd1003151306p8c8bc6ep99f16403ecfb5806@mail.gmail.com> Message-ID: <4B9E9926.1090601@colbyconsulting.com> Thanks Arthur. My problem is that I need to be able to copy a database regardless of the contents. So manually scripting each object doesn't really do what I want. I found the following on the web: //ServerConnection conn = new ServerConnection("rune\\sql2008"); //Server server = new Server(conn); Database newdb = new Database(srv, DestDBName); newdb.Create(); Transfer transfer = new Transfer(srv.Databases[SrcDBName]); transfer.CopyAllObjects = true; transfer.CopyAllUsers = true; transfer.Options.WithDependencies = true; transfer.DestinationDatabase = newdb.Name; transfer.DestinationServer = srv.Name; transfer.DestinationLoginSecure = true; transfer.CopySchema = true; transfer.CopyData = true; transfer.Options.ContinueScriptingOnError = true; transfer.TransferData(); return true; The thing is I am not really sure that the copy database wizard does in fact do this kind of thing. From the wizard form it would appear that it detaches the database, copies the physical file, then reattaches the original and the copy, then does some renames inside of the new database to give it the proper name etc. Whatever it does, it is pretty fast and I would like to just copy the code it uses if I could get at it. John W. Colby www.ColbyConsulting.com Arthur Fuller wrote: > Right-click the database name and you should see a "Script Objects" item. >>From there you can script the whole database including its tables, views, > sprocs, UDFs -- and even the insert statements to populate the tables. (I > vaguely recall that that feature is unavailable in some versions, but I > might be thinking of SQL 2005. > > Incidentally, depending on requirements, I have developed a simple scheme > based on mdeldb. Because SQL creates a new database based entirely on the > contents of modeldb, I now have a collection of databases modeldb_xxxx, > where xxxx denotes the type of model I want. So I do a couple of quick > renames to select a new model, and then a simple New Database command and > presto, all nice and pretty. > > I have used this to include a bunch of tables I will almost always want, > such as Contacts, Cities, Province/States and so on. Another version of > modeldb is aimed at typical order-entry systems. Another targets > time-and-billing apps. > > I find that this works quite well. > > hth, > Arthur > > On Mon, Mar 15, 2010 at 3:54 PM, jwcolby wrote: > >> Copy database is not a choice. Create is but that just creates a database >> of that name, it does not >> copy the objects themselves to the new database. >> >> 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 Mar 15 17:49:18 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 15 Mar 2010 18:49:18 -0400 Subject: [dba-SQLServer] C# / SQL Server: select all zips within 5 miles of a ZIP list Message-ID: <4B9EB96E.9000309@colbyconsulting.com> I wrote an Access application to get a list of all the zips within X miles of another zip, based on Lat/Long. Today my client asked me to perform population counts of all zips within 5 miles of a list of zips. I do not particularly want to do an exhaustive calculation (cartesian product) of each zip in the list against every other zip, there are 33K zips in my specific zip table. The list itself (in this instance) contains 400 zips and another that contains 250 zips. The distance calc has a ton of math and doing that math on 12 million lines is probably not going to be particularly speedy. In thinking about how to narrow down the results, it occurred to me that if i did a preliminary calculation on the Lat so that I only pulled other zips within 5 miles of the zip(s) in the list, this would narrow things down pretty well. So I did, and the result is 7K zips within 5 miles of the latitude of the 400 zips in the list. Does that make sense. OK so I have a list of 400 zips, and another list of 7K zips "in the 5 mile latitude band" as those 400 zips. That is certainly better. I could have done the same thing with the longitude. The problem is that the longitude is not a fixed distance apart, but rather starts at zero at the poles and becomes greatest at the equator. Although the max distance between two adjacent longitudes (for the US) is going to be found at a specific latitude point in the Hawaiian islands. If I just knew what that the distance was at that latitude in Hawaii I could use that factor as well. But I don't know where to find that, though I will Google more. Anyway... I ran out and found C# code to perform that calculation. It would be NICE to do this in TSQL in a query right inside of SQL Server. I found code for both. Ain't the internet GRAND? The C# code: // Calculate Distance in Milesdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625); // Calculate Distance in Kilometersdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625, GeoCodeCalcMeasurement.Kilometers); //GeoCodeCalc C# Class: public static class GeoCodeCalc{ public const double EarthRadiusInMiles = 3956.0; public const double EarthRadiusInKilometers = 6367.0; public static double ToRadian(double val) { return val * (Math.PI / 180); } public static double DiffRadian(double val1, double val2) { return ToRadian(val2) - ToRadian(val1); } /// /// Calculate the distance between two geocodes. Defaults to using Miles. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2) { return CalcDistance(lat1, lng1, lat2, lng2, GeoCodeCalcMeasurement.Miles); } /// /// Calculate the distance between two geocodes. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2, GeoCodeCalcMeasurement m) { double radius = GeoCodeCalc.EarthRadiusInMiles; if (m == GeoCodeCalcMeasurement.Kilometers) { radius = GeoCodeCalc.EarthRadiusInKilometers; } return radius * 2 * Math.Asin( Math.Min(1, Math.Sqrt( ( Math.Pow(Math.Sin((DiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.Cos(ToRadian(lat1)) * Math.Cos(ToRadian(lat2)) * Math.Pow(Math.Sin((DiffRadian(lng1, lng2)) / 2.0), 2.0) ) ) ) ); } } public enum GeoCodeCalcMeasurement : int { Miles = 0, Kilometers = 1 } The TSQL code: Create Function [dbo].[fnGetDistance] ( @Lat1 Float(18), @Long1 Float(18), @Lat2 Float(18), @Long2 Float(18), @ReturnType VarChar(10) ) Returns Float(18) AS Begin Declare @R Float(8); Declare @dLat Float(18); Declare @dLon Float(18); Declare @a Float(18); Declare @c Float(18); Declare @d Float(18); Set @R = Case @ReturnType When 'Miles' Then 3956.55 When 'Kilometers' Then 6367.45 When 'Feet' Then 20890584 When 'Meters' Then 6367450 Else 20890584 -- Default feet (Garmin rel elev) End Set @dLat = Radians(@lat2 - @lat1); Set @dLon = Radians(@long2 - @long1); Set @a = Sin(@dLat / 2) * Sin(@dLat / 2) + Cos(Radians(@lat1)) * Cos(Radians(@lat2)) * Sin(@dLon / 2) * Sin(@dLon / 2); Set @c = 2 * Asin(Min(Sqrt(@a))); Set @d = @R * @c; Return @d; End -- John W. Colby www.ColbyConsulting.com From michael at ddisolutions.com.au Mon Mar 15 17:57:45 2010 From: michael at ddisolutions.com.au (Michael Maddison) Date: Tue, 16 Mar 2010 09:57:45 +1100 Subject: [dba-SQLServer] C# / SQL Server: select all zips within 5 miles ofa ZIP list References: <4B9EB96E.9000309@colbyconsulting.com> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D01582D8F@ddi-01.DDI.local> Hi John, Not sure I can help you, I've vaguely done similar stuff but in ESRI GIS ArcObjects. All the complex stuff is hidden from you though. But, would your results not be more accurate if you used Decimals instead of floats and doubles? Good luck Michael M I wrote an Access application to get a list of all the zips within X miles of another zip, based on Lat/Long. Today my client asked me to perform population counts of all zips within 5 miles of a list of zips. I do not particularly want to do an exhaustive calculation (cartesian product) of each zip in the list against every other zip, there are 33K zips in my specific zip table. The list itself (in this instance) contains 400 zips and another that contains 250 zips. The distance calc has a ton of math and doing that math on 12 million lines is probably not going to be particularly speedy. In thinking about how to narrow down the results, it occurred to me that if i did a preliminary calculation on the Lat so that I only pulled other zips within 5 miles of the zip(s) in the list, this would narrow things down pretty well. So I did, and the result is 7K zips within 5 miles of the latitude of the 400 zips in the list. Does that make sense. OK so I have a list of 400 zips, and another list of 7K zips "in the 5 mile latitude band" as those 400 zips. That is certainly better. I could have done the same thing with the longitude. The problem is that the longitude is not a fixed distance apart, but rather starts at zero at the poles and becomes greatest at the equator. Although the max distance between two adjacent longitudes (for the US) is going to be found at a specific latitude point in the Hawaiian islands. If I just knew what that the distance was at that latitude in Hawaii I could use that factor as well. But I don't know where to find that, though I will Google more. Anyway... I ran out and found C# code to perform that calculation. It would be NICE to do this in TSQL in a query right inside of SQL Server. I found code for both. Ain't the internet GRAND? The C# code: // Calculate Distance in Milesdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625); // Calculate Distance in Kilometersdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625, GeoCodeCalcMeasurement.Kilometers); //GeoCodeCalc C# Class: public static class GeoCodeCalc{ public const double EarthRadiusInMiles = 3956.0; public const double EarthRadiusInKilometers = 6367.0; public static double ToRadian(double val) { return val * (Math.PI / 180); } public static double DiffRadian(double val1, double val2) { return ToRadian(val2) - ToRadian(val1); } /// /// Calculate the distance between two geocodes. Defaults to using Miles. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2) { return CalcDistance(lat1, lng1, lat2, lng2, GeoCodeCalcMeasurement.Miles); } /// /// Calculate the distance between two geocodes. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2, GeoCodeCalcMeasurement m) { double radius = GeoCodeCalc.EarthRadiusInMiles; if (m == GeoCodeCalcMeasurement.Kilometers) { radius = GeoCodeCalc.EarthRadiusInKilometers; } return radius * 2 * Math.Asin( Math.Min(1, Math.Sqrt( ( Math.Pow(Math.Sin((DiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.Cos(ToRadian(lat1)) * Math.Cos(ToRadian(lat2)) * Math.Pow(Math.Sin((DiffRadian(lng1, lng2)) / 2.0), 2.0) ) ) ) ); } } public enum GeoCodeCalcMeasurement : int { Miles = 0, Kilometers = 1 } The TSQL code: Create Function [dbo].[fnGetDistance] ( @Lat1 Float(18), @Long1 Float(18), @Lat2 Float(18), @Long2 Float(18), @ReturnType VarChar(10) ) Returns Float(18) AS Begin Declare @R Float(8); Declare @dLat Float(18); Declare @dLon Float(18); Declare @a Float(18); Declare @c Float(18); Declare @d Float(18); Set @R = Case @ReturnType When 'Miles' Then 3956.55 When 'Kilometers' Then 6367.45 When 'Feet' Then 20890584 When 'Meters' Then 6367450 Else 20890584 -- Default feet (Garmin rel elev) End Set @dLat = Radians(@lat2 - @lat1); Set @dLon = Radians(@long2 - @long1); Set @a = Sin(@dLat / 2) * Sin(@dLat / 2) + Cos(Radians(@lat1)) * Cos(Radians(@lat2)) * Sin(@dLon / 2) * Sin(@dLon / 2); Set @c = 2 * Asin(Min(Sqrt(@a))); Set @d = @R * @c; Return @d; End -- 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2735 - Release Date: 03/15/10 06:33:00 From jwcolby at colbyconsulting.com Mon Mar 15 18:17:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 15 Mar 2010 19:17:38 -0400 Subject: [dba-SQLServer] C# / SQL Server: select all zips within 5 miles ofa ZIP list In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D01582D8F@ddi-01.DDI.local> References: <4B9EB96E.9000309@colbyconsulting.com> <59A61174B1F5B54B97FD4ADDE71E7D01582D8F@ddi-01.DDI.local> Message-ID: <4B9EC012.9000401@colbyconsulting.com> Michael, Thanks for the suggestion. Maybe but there are only 6 digits right of the decimal in the zip data. Plus floats are native to hardware whereas (I think) decimals are string manipulation in a software library. John W. Colby www.ColbyConsulting.com Michael Maddison wrote: > Hi John, > > Not sure I can help you, I've vaguely done similar stuff but in ESRI GIS > ArcObjects. All the complex stuff is hidden from you though. > But, would your results not be more accurate if you used Decimals > instead of floats and doubles? > > Good luck > > Michael M From accessd at shaw.ca Tue Mar 16 23:30:45 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 16 Mar 2010 21:30:45 -0700 Subject: [dba-SQLServer] C# / SQL Server: select all zips within 5 miles of a ZIP list In-Reply-To: <4B9EB96E.9000309@colbyconsulting.com> References: <4B9EB96E.9000309@colbyconsulting.com> Message-ID: <0D1F08A5AB47452294862D5B6B07B32E@creativesystemdesigns.com> Great work John. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, March 15, 2010 3:49 PM To: Sqlserver-Dba; VBA Subject: [dba-SQLServer] C# / SQL Server: select all zips within 5 miles of a ZIP list I wrote an Access application to get a list of all the zips within X miles of another zip, based on Lat/Long. Today my client asked me to perform population counts of all zips within 5 miles of a list of zips. I do not particularly want to do an exhaustive calculation (cartesian product) of each zip in the list against every other zip, there are 33K zips in my specific zip table. The list itself (in this instance) contains 400 zips and another that contains 250 zips. The distance calc has a ton of math and doing that math on 12 million lines is probably not going to be particularly speedy. In thinking about how to narrow down the results, it occurred to me that if i did a preliminary calculation on the Lat so that I only pulled other zips within 5 miles of the zip(s) in the list, this would narrow things down pretty well. So I did, and the result is 7K zips within 5 miles of the latitude of the 400 zips in the list. Does that make sense. OK so I have a list of 400 zips, and another list of 7K zips "in the 5 mile latitude band" as those 400 zips. That is certainly better. I could have done the same thing with the longitude. The problem is that the longitude is not a fixed distance apart, but rather starts at zero at the poles and becomes greatest at the equator. Although the max distance between two adjacent longitudes (for the US) is going to be found at a specific latitude point in the Hawaiian islands. If I just knew what that the distance was at that latitude in Hawaii I could use that factor as well. But I don't know where to find that, though I will Google more. Anyway... I ran out and found C# code to perform that calculation. It would be NICE to do this in TSQL in a query right inside of SQL Server. I found code for both. Ain't the internet GRAND? The C# code: // Calculate Distance in Milesdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625); // Calculate Distance in Kilometersdouble //d = GeoCodeCalc.CalcDistance(47.8131545175277, -122.783203125, 42.0982224111897, -87.890625, GeoCodeCalcMeasurement.Kilometers); //GeoCodeCalc C# Class: public static class GeoCodeCalc{ public const double EarthRadiusInMiles = 3956.0; public const double EarthRadiusInKilometers = 6367.0; public static double ToRadian(double val) { return val * (Math.PI / 180); } public static double DiffRadian(double val1, double val2) { return ToRadian(val2) - ToRadian(val1); } /// /// Calculate the distance between two geocodes. Defaults to using Miles. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2) { return CalcDistance(lat1, lng1, lat2, lng2, GeoCodeCalcMeasurement.Miles); } /// /// Calculate the distance between two geocodes. /// public static double CalcDistance(double lat1, double lng1, double lat2, double lng2, GeoCodeCalcMeasurement m) { double radius = GeoCodeCalc.EarthRadiusInMiles; if (m == GeoCodeCalcMeasurement.Kilometers) { radius = GeoCodeCalc.EarthRadiusInKilometers; } return radius * 2 * Math.Asin( Math.Min(1, Math.Sqrt( ( Math.Pow(Math.Sin((DiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.Cos(ToRadian(lat1)) * Math.Cos(ToRadian(lat2)) * Math.Pow(Math.Sin((DiffRadian(lng1, lng2)) / 2.0), 2.0) ) ) ) ); } } public enum GeoCodeCalcMeasurement : int { Miles = 0, Kilometers = 1 } The TSQL code: Create Function [dbo].[fnGetDistance] ( @Lat1 Float(18), @Long1 Float(18), @Lat2 Float(18), @Long2 Float(18), @ReturnType VarChar(10) ) Returns Float(18) AS Begin Declare @R Float(8); Declare @dLat Float(18); Declare @dLon Float(18); Declare @a Float(18); Declare @c Float(18); Declare @d Float(18); Set @R = Case @ReturnType When 'Miles' Then 3956.55 When 'Kilometers' Then 6367.45 When 'Feet' Then 20890584 When 'Meters' Then 6367450 Else 20890584 -- Default feet (Garmin rel elev) End Set @dLat = Radians(@lat2 - @lat1); Set @dLon = Radians(@long2 - @long1); Set @a = Sin(@dLat / 2) * Sin(@dLat / 2) + Cos(Radians(@lat1)) * Cos(Radians(@lat2)) * Sin(@dLon / 2) * Sin(@dLon / 2); Set @c = 2 * Asin(Min(Sqrt(@a))); Set @d = @R * @c; Return @d; End -- 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 Thu Mar 18 11:41:47 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 18 Mar 2010 12:41:47 -0400 Subject: [dba-SQLServer] My database is slow Message-ID: <4BA257CB.4060605@colbyconsulting.com> I had a SQL Server 2005 (I think) database, running in SQL Express. It was "fine", no obvious slowdown. I wanted to be able to access 2008 databases and was unable to do so using Management studio 2005 which I had installed. I tried to "upgrade" but 2008 just refused to cooperate. I ended up uninstalling all of Express as well as all of 2005 whereupon 2008 decided to cooperate and installed just fine. Now my billing database is abysmally slow. As in 20 seconds to open any table. Sometimes. Sometimes not. Buy just loading the combos that used to open instantly is now taking literally 20 seconds. This is unusable, and I don't know where to start in figuring out why. Any ideas where to start? In DETAIL (I am not a DBA). -- John W. Colby www.ColbyConsulting.com From info at BlogsByTbig.com Thu Mar 18 11:55:06 2010 From: info at BlogsByTbig.com (Myke Myers) Date: Thu, 18 Mar 2010 12:55:06 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: <4BA257CB.4060605@colbyconsulting.com> References: <4BA257CB.4060605@colbyconsulting.com> Message-ID: <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> See if it lost your primary keys and indexes. Myke -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, March 18, 2010 12:42 PM To: Sqlserver-Dba Subject: [dba-SQLServer] My database is slow I had a SQL Server 2005 (I think) database, running in SQL Express. It was "fine", no obvious slowdown. I wanted to be able to access 2008 databases and was unable to do so using Management studio 2005 which I had installed. I tried to "upgrade" but 2008 just refused to cooperate. I ended up uninstalling all of Express as well as all of 2005 whereupon 2008 decided to cooperate and installed just fine. Now my billing database is abysmally slow. As in 20 seconds to open any table. Sometimes. Sometimes not. Buy just loading the combos that used to open instantly is now taking literally 20 seconds. This is unusable, and I don't know where to start in figuring out why. Any ideas where to start? In DETAIL (I am not a DBA). -- 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 Thu Mar 18 12:06:21 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 18 Mar 2010 13:06:21 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> Message-ID: <4BA25D8D.5090200@colbyconsulting.com> Nope. In fact I went in to see what is there for indexes and PKs and it appears that the upsizing wizard I ran ages ago created all of that stuff for me. I never looked at it before but it's there. John W. Colby www.ColbyConsulting.com Myke Myers wrote: > See if it lost your primary keys and indexes. > > Myke > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Thursday, March 18, 2010 12:42 PM > To: Sqlserver-Dba > Subject: [dba-SQLServer] My database is slow > > I had a SQL Server 2005 (I think) database, running in SQL Express. It was > "fine", no obvious slowdown. > > I wanted to be able to access 2008 databases and was unable to do so using > Management studio 2005 which I had installed. I tried to "upgrade" but 2008 > just refused to cooperate. I ended up uninstalling all of Express as well > as all of 2005 whereupon 2008 decided to cooperate and installed just fine. > > Now my billing database is abysmally slow. As in 20 seconds to open any > table. Sometimes. > Sometimes not. Buy just loading the combos that used to open instantly is > now taking literally 20 seconds. > > This is unusable, and I don't know where to start in figuring out why. > > Any ideas where to start? In DETAIL (I am not a DBA). > > -- > 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 marklbreen at gmail.com Sat Mar 20 07:34:17 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 20 Mar 2010 12:34:17 +0000 Subject: [dba-SQLServer] My database is slow In-Reply-To: <4BA25D8D.5090200@colbyconsulting.com> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> Message-ID: Hi John, Is it the db or is it the db server? You could detach your monster db's and then you have just a plain ol' box with a couple of 1-2 mb db's attached, you can then play with a test be with on table and see if that is slow. To full eliminate the monsters, detach, reboot and review and then you know it is either a) related to the monsters or b) box related and your large db's are irrelevant to solving this issue. Sorry this is two days later, Mark On 18 March 2010 17:06, jwcolby wrote: > Nope. In fact I went in to see what is there for indexes and PKs and it > appears that the upsizing > wizard I ran ages ago created all of that stuff for me. I never looked at > it before but it's there. > > John W. Colby > www.ColbyConsulting.com > > > Myke Myers wrote: > > See if it lost your primary keys and indexes. > > > > Myke > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Thursday, March 18, 2010 12:42 PM > > To: Sqlserver-Dba > > Subject: [dba-SQLServer] My database is slow > > > > I had a SQL Server 2005 (I think) database, running in SQL Express. It > was > > "fine", no obvious slowdown. > > > > I wanted to be able to access 2008 databases and was unable to do so > using > > Management studio 2005 which I had installed. I tried to "upgrade" but > 2008 > > just refused to cooperate. I ended up uninstalling all of Express as > well > > as all of 2005 whereupon 2008 decided to cooperate and installed just > fine. > > > > Now my billing database is abysmally slow. As in 20 seconds to open any > > table. Sometimes. > > Sometimes not. Buy just loading the combos that used to open instantly > is > > now taking literally 20 seconds. > > > > This is unusable, and I don't know where to start in figuring out why. > > > > Any ideas where to start? In DETAIL (I am not a DBA). > > > > -- > > 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 > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From bheid at sc.rr.com Sat Mar 20 19:47:43 2010 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 20 Mar 2010 20:47:43 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> Message-ID: <000301cac890$1e422e60$5ac68b20$@rr.com> John, Have you updated statistics lately? Bobby -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Saturday, March 20, 2010 8:34 AM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] My database is slow Hi John, Is it the db or is it the db server? You could detach your monster db's and then you have just a plain ol' box with a couple of 1-2 mb db's attached, you can then play with a test be with on table and see if that is slow. To full eliminate the monsters, detach, reboot and review and then you know it is either a) related to the monsters or b) box related and your large db's are irrelevant to solving this issue. Sorry this is two days later, Mark On 18 March 2010 17:06, jwcolby wrote: > Nope. In fact I went in to see what is there for indexes and PKs and it > appears that the upsizing > wizard I ran ages ago created all of that stuff for me. I never looked at > it before but it's there. > > John W. Colby > www.ColbyConsulting.com > > > Myke Myers wrote: > > See if it lost your primary keys and indexes. > > > > Myke > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Thursday, March 18, 2010 12:42 PM > > To: Sqlserver-Dba > > Subject: [dba-SQLServer] My database is slow > > > > I had a SQL Server 2005 (I think) database, running in SQL Express. It > was > > "fine", no obvious slowdown. > > > > I wanted to be able to access 2008 databases and was unable to do so > using > > Management studio 2005 which I had installed. I tried to "upgrade" but > 2008 > > just refused to cooperate. I ended up uninstalling all of Express as > well > > as all of 2005 whereupon 2008 decided to cooperate and installed just > fine. > > > > Now my billing database is abysmally slow. As in 20 seconds to open any > > table. Sometimes. > > Sometimes not. Buy just loading the combos that used to open instantly > is > > now taking literally 20 seconds. > > > > This is unusable, and I don't know where to start in figuring out why. > > > > Any ideas where to start? In DETAIL (I am not a DBA). > > > > -- > > John W. Colby > > www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Mar 21 20:29:09 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 21 Mar 2010 21:29:09 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> Message-ID: <4BA6C7E5.40105@colbyconsulting.com> This is actually running on my laptop. It has been SQL Server Lite for a couple of years, running just fine. John W. Colby www.ColbyConsulting.com Mark Breen wrote: > Hi John, > > Is it the db or is it the db server? You could detach your monster db's and > then you have just a plain ol' box with a couple of 1-2 mb db's attached, > you can then play with a test be with on table and see if that is slow. > > To full eliminate the monsters, detach, reboot and review and then you know > it is either a) related to the monsters or b) box related and your large > db's are irrelevant to solving this issue. > > Sorry this is two days later, > > Mark > > > On 18 March 2010 17:06, jwcolby wrote: > >> Nope. In fact I went in to see what is there for indexes and PKs and it >> appears that the upsizing >> wizard I ran ages ago created all of that stuff for me. I never looked at >> it before but it's there. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Myke Myers wrote: >>> See if it lost your primary keys and indexes. >>> >>> Myke >>> >>> -----Original Message----- >>> From: dba-sqlserver-bounces at databaseadvisors.com >>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby >>> Sent: Thursday, March 18, 2010 12:42 PM >>> To: Sqlserver-Dba >>> Subject: [dba-SQLServer] My database is slow >>> >>> I had a SQL Server 2005 (I think) database, running in SQL Express. It >> was >>> "fine", no obvious slowdown. >>> >>> I wanted to be able to access 2008 databases and was unable to do so >> using >>> Management studio 2005 which I had installed. I tried to "upgrade" but >> 2008 >>> just refused to cooperate. I ended up uninstalling all of Express as >> well >>> as all of 2005 whereupon 2008 decided to cooperate and installed just >> fine. >>> Now my billing database is abysmally slow. As in 20 seconds to open any >>> table. Sometimes. >>> Sometimes not. Buy just loading the combos that used to open instantly >> is >>> now taking literally 20 seconds. >>> >>> This is unusable, and I don't know where to start in figuring out why. >>> >>> Any ideas where to start? In DETAIL (I am not a DBA). >>> >>> -- >>> 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 >>> >>> >> _______________________________________________ >> 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 jwcolby at colbyconsulting.com Sun Mar 21 20:29:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 21 Mar 2010 21:29:33 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: <000301cac890$1e422e60$5ac68b20$@rr.com> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> <000301cac890$1e422e60$5ac68b20$@rr.com> Message-ID: <4BA6C7FD.6010206@colbyconsulting.com> Uhh.... never. 8( John W. Colby www.ColbyConsulting.com Bobby Heid wrote: > John, > > Have you updated statistics lately? > > Bobby > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Saturday, March 20, 2010 8:34 AM > To: Discussion concerning MS SQL Server > Subject: Re: [dba-SQLServer] My database is slow > > Hi John, > > Is it the db or is it the db server? You could detach your monster db's and > then you have just a plain ol' box with a couple of 1-2 mb db's attached, > you can then play with a test be with on table and see if that is slow. > > To full eliminate the monsters, detach, reboot and review and then you know > it is either a) related to the monsters or b) box related and your large > db's are irrelevant to solving this issue. > > Sorry this is two days later, > > Mark > > > On 18 March 2010 17:06, jwcolby wrote: > >> Nope. In fact I went in to see what is there for indexes and PKs and it >> appears that the upsizing >> wizard I ran ages ago created all of that stuff for me. I never looked at >> it before but it's there. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Myke Myers wrote: >>> See if it lost your primary keys and indexes. >>> >>> Myke >>> >>> -----Original Message----- >>> From: dba-sqlserver-bounces at databaseadvisors.com >>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby >>> Sent: Thursday, March 18, 2010 12:42 PM >>> To: Sqlserver-Dba >>> Subject: [dba-SQLServer] My database is slow >>> >>> I had a SQL Server 2005 (I think) database, running in SQL Express. It >> was >>> "fine", no obvious slowdown. >>> >>> I wanted to be able to access 2008 databases and was unable to do so >> using >>> Management studio 2005 which I had installed. I tried to "upgrade" but >> 2008 >>> just refused to cooperate. I ended up uninstalling all of Express as >> well >>> as all of 2005 whereupon 2008 decided to cooperate and installed just >> fine. >>> Now my billing database is abysmally slow. As in 20 seconds to open any >>> table. Sometimes. >>> Sometimes not. Buy just loading the combos that used to open instantly >> is >>> now taking literally 20 seconds. >>> >>> This is unusable, and I don't know where to start in figuring out why. >>> >>> Any ideas where to start? In DETAIL (I am not a DBA). >>> >>> -- >>> 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 bheid at sc.rr.com Sun Mar 21 21:10:43 2010 From: bheid at sc.rr.com (Bobby Heid) Date: Sun, 21 Mar 2010 22:10:43 -0400 Subject: [dba-SQLServer] My database is slow In-Reply-To: <4BA6C7FD.6010206@colbyconsulting.com> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> <000301cac890$1e422e60$5ac68b20$@rr.com> <4BA6C7FD.6010206@colbyconsulting.com> Message-ID: <003d01cac964$e0b41010$a21c3030$@rr.com> I had been running a query during development against a local db (SQL 2008 dev edition). Then, out of the blue, my few minute query started taking about 20 something minutes. I then looked at the estimated and actual execution plans and both of them showed 1 estimated records when where should have been about 70 something thousand. After talking with our DBA, he suggested updating the statistics. After updating the statistics on the affected tables, the query was down to about 24 seconds. I don't know if it might be the same issue with you, but maybe if you checked your execution plans? Bobby -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, March 21, 2010 9:30 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] My database is slow Uhh.... never. 8( John W. Colby www.ColbyConsulting.com Bobby Heid wrote: > John, > > Have you updated statistics lately? > > Bobby > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Saturday, March 20, 2010 8:34 AM > To: Discussion concerning MS SQL Server > Subject: Re: [dba-SQLServer] My database is slow > > Hi John, > > Is it the db or is it the db server? You could detach your monster db's and > then you have just a plain ol' box with a couple of 1-2 mb db's attached, > you can then play with a test be with on table and see if that is slow. > > To full eliminate the monsters, detach, reboot and review and then you know > it is either a) related to the monsters or b) box related and your large > db's are irrelevant to solving this issue. > > Sorry this is two days later, > > Mark > > > On 18 March 2010 17:06, jwcolby wrote: > >> Nope. In fact I went in to see what is there for indexes and PKs and it >> appears that the upsizing >> wizard I ran ages ago created all of that stuff for me. I never looked at >> it before but it's there. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Myke Myers wrote: >>> See if it lost your primary keys and indexes. >>> >>> Myke >>> >>> -----Original Message----- >>> From: dba-sqlserver-bounces at databaseadvisors.com >>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby >>> Sent: Thursday, March 18, 2010 12:42 PM >>> To: Sqlserver-Dba >>> Subject: [dba-SQLServer] My database is slow >>> >>> I had a SQL Server 2005 (I think) database, running in SQL Express. It >> was >>> "fine", no obvious slowdown. >>> >>> I wanted to be able to access 2008 databases and was unable to do so >> using >>> Management studio 2005 which I had installed. I tried to "upgrade" but >> 2008 >>> just refused to cooperate. I ended up uninstalling all of Express as >> well >>> as all of 2005 whereupon 2008 decided to cooperate and installed just >> fine. >>> Now my billing database is abysmally slow. As in 20 seconds to open any >>> table. Sometimes. >>> Sometimes not. Buy just loading the combos that used to open instantly >> is >>> now taking literally 20 seconds. >>> >>> This is unusable, and I don't know where to start in figuring out why. >>> >>> Any ideas where to start? In DETAIL (I am not a DBA). >>> >>> -- >>> John W. Colby >>> www.ColbyConsulting.com From marklbreen at gmail.com Mon Mar 22 04:25:44 2010 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 22 Mar 2010 09:25:44 +0000 Subject: [dba-SQLServer] My database is slow In-Reply-To: <4BA6C7E5.40105@colbyconsulting.com> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> <4BA6C7E5.40105@colbyconsulting.com> Message-ID: Hi John, So it is SQL Server itself or the billing db? Are other db's also slow? If it is just billing then you need to look at indexes etc, and as Bobby is suggesting, you may want to use the wizard to create a daily maintenance plan, that will re-build the indexes on specified databases. I always include a daily maintenance plan on any transaction based db's I look after. However, if it is machine and OS / installation related, that is all irrelevant and you need to look at firewall, AV or some other machine related issue. I would plum first for a careful complete removal of SQL and another install in that case. I would turn off AV/ Firewal and anything else that might effect it (Spyware software). Let us know which it is, I recently upgraded a few machines to sql 2008 and would be keen to hear how you get on. Also, is it slow in SSMS or just through the GUI that you are using? IOW, could it be ABO or ODBC related? Mark On 22 March 2010 01:29, jwcolby wrote: > This is actually running on my laptop. It has been SQL Server Lite for a > couple of years, running > just fine. > > John W. Colby > www.ColbyConsulting.com > > > Mark Breen wrote: > > Hi John, > > > > Is it the db or is it the db server? You could detach your monster db's > and > > then you have just a plain ol' box with a couple of 1-2 mb db's attached, > > you can then play with a test be with on table and see if that is slow. > > > > To full eliminate the monsters, detach, reboot and review and then you > know > > it is either a) related to the monsters or b) box related and your large > > db's are irrelevant to solving this issue. > > > > Sorry this is two days later, > > > > Mark > > > > > > On 18 March 2010 17:06, jwcolby wrote: > > > >> Nope. In fact I went in to see what is there for indexes and PKs and it > >> appears that the upsizing > >> wizard I ran ages ago created all of that stuff for me. I never looked > at > >> it before but it's there. > >> > >> John W. Colby > >> www.ColbyConsulting.com > >> > >> > >> Myke Myers wrote: > >>> See if it lost your primary keys and indexes. > >>> > >>> Myke > >>> > >>> -----Original Message----- > >>> From: dba-sqlserver-bounces at databaseadvisors.com > >>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > jwcolby > >>> Sent: Thursday, March 18, 2010 12:42 PM > >>> To: Sqlserver-Dba > >>> Subject: [dba-SQLServer] My database is slow > >>> > >>> I had a SQL Server 2005 (I think) database, running in SQL Express. It > >> was > >>> "fine", no obvious slowdown. > >>> > >>> I wanted to be able to access 2008 databases and was unable to do so > >> using > >>> Management studio 2005 which I had installed. I tried to "upgrade" but > >> 2008 > >>> just refused to cooperate. I ended up uninstalling all of Express as > >> well > >>> as all of 2005 whereupon 2008 decided to cooperate and installed just > >> fine. > >>> Now my billing database is abysmally slow. As in 20 seconds to open > any > >>> table. Sometimes. > >>> Sometimes not. Buy just loading the combos that used to open instantly > >> is > >>> now taking literally 20 seconds. > >>> > >>> This is unusable, and I don't know where to start in figuring out why. > >>> > >>> Any ideas where to start? In DETAIL (I am not a DBA). > >>> > >>> -- > >>> 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 > >>> > >>> > >> _______________________________________________ > >> 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 > > > > > _______________________________________________ > 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 Mar 22 12:58:42 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 22 Mar 2010 13:58:42 -0400 Subject: [dba-SQLServer] SPAM-LOW: Re: My database is slow In-Reply-To: References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> <4BA6C7E5.40105@colbyconsulting.com> Message-ID: <4BA7AFD2.3090402@colbyconsulting.com> Mark, I thought it was slow through SSMS as well. However I just went back in to look and it is pretty much instantaneous displaying the top (1000) records for any table. The database files are on my local laptop. The laptop is a DELL (Intel) dual core with 4 gigs of RAM. The hard drive is an upgrade to 7200 rpm. Everything was running fine. I had SQL Server 2005 Express services running on the laptop and installed 2005 SSMS to be able to see it from SSMS if needed. I never had any issues until I switched to 2008. I upgraded my SERVER to 2008 and suddenly was unable to get at the databases on the server. Thinking back on it that was suspicious since I would think that 2005 SSMS should be able to see and talk to 2008 server instances. I wasn't really thinking deeply about that though. I just decided that 2008 was running great on the server, let's install on my laptop as well. When I tried, it complained during install about the Express stuff. I just decided to completely uninstall everything SQL Server and reinstall from scratch with 2008. That in fact worked quite well. So it seems that maaaaybe the issue could be ODBC access to the 2008 stuff from Access 2003. The interface is still pretty darned slow. I think life is prodding me to learn how to bind forms and combos to stored procedures out on SQL Server. I actually moved to SQL Server exactly to allow me to learn this stuff here at my office on a real system, then I never got around to it. John W. Colby www.ColbyConsulting.com Mark Breen wrote: > Hi John, > > So it is SQL Server itself or the billing db? > > Are other db's also slow? If it is just billing then you need to look at > indexes etc, and as Bobby is suggesting, you may want to use the wizard to > create a daily maintenance plan, that will re-build the indexes on specified > databases. I always include a daily maintenance plan on any transaction > based db's I look after. > > However, if it is machine and OS / installation related, that is all > irrelevant and you need to look at firewall, AV or some other machine > related issue. I would plum first for a careful complete removal of SQL and > another install in that case. I would turn off AV/ Firewal and anything > else that might effect it (Spyware software). > > Let us know which it is, I recently upgraded a few machines to sql 2008 and > would be keen to hear how you get on. > > Also, is it slow in SSMS or just through the GUI that you are using? IOW, > could it be ABO or ODBC related? > > Mark From marklbreen at gmail.com Mon Mar 22 14:27:03 2010 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 22 Mar 2010 19:27:03 +0000 Subject: [dba-SQLServer] SPAM-LOW: Re: My database is slow In-Reply-To: <4BA7AFD2.3090402@colbyconsulting.com> References: <4BA257CB.4060605@colbyconsulting.com> <6D5F3C0989594D6F8C70252B38C16E8A@TBIG1> <4BA25D8D.5090200@colbyconsulting.com> <4BA6C7E5.40105@colbyconsulting.com> <4BA7AFD2.3090402@colbyconsulting.com> Message-ID: Hello John, Just FYI, [Following comments are for information and not intended to be for scalable systems or high volumes of users] an ODBC linked table, over the internet, to MySQL or MS SQL works fantastically fast. At times you would not realize that it was a linked table via OBDC, even when that is a shared server in a hosting company with 100 other people on the same box. Using a Jet Query can give fantastically fast results and criteria such as Where OrderID = x works super. Doing a join from Customers to Orders works well enough but can be slower. However for the average user a join of two tables might be plenty fast with data coming back in 1-2 seconds. Doing a join from Customers to orders to Order Details starting to become slow. In that case, you can create a View then you "Select * from CustomersOrdersOrderItems" where Order Id = x. Not surprisingly this is fantastically fast again. So what is my point? Do not assume that linked tables and jet based queries are all bad, they are good enough for normal users to use and you only need server based queries when they become more complex. I hope that is useful for you, you should try it sometime and you will be surprised to see how fast "dirty linked tables" can be. HTH, Thanks Mark On 22 March 2010 17:58, jwcolby wrote: > Mark, > > I thought it was slow through SSMS as well. However I just went back in to > look and it is pretty > much instantaneous displaying the top (1000) records for any table. > > The database files are on my local laptop. The laptop is a DELL (Intel) > dual core with 4 gigs of > RAM. The hard drive is an upgrade to 7200 rpm. > > Everything was running fine. I had SQL Server 2005 Express services > running on the laptop and > installed 2005 SSMS to be able to see it from SSMS if needed. > > I never had any issues until I switched to 2008. I upgraded my SERVER to > 2008 and suddenly was > unable to get at the databases on the server. Thinking back on it that was > suspicious since I would > think that 2005 SSMS should be able to see and talk to 2008 server > instances. > > I wasn't really thinking deeply about that though. I just decided that > 2008 was running great on > the server, let's install on my laptop as well. When I tried, it > complained during install about > the Express stuff. I just decided to completely uninstall everything SQL > Server and reinstall from > scratch with 2008. That in fact worked quite well. > > So it seems that maaaaybe the issue could be ODBC access to the 2008 stuff > from Access 2003. The > interface is still pretty darned slow. > > I think life is prodding me to learn how to bind forms and combos to stored > procedures out on SQL > Server. I actually moved to SQL Server exactly to allow me to learn this > stuff here at my office on > a real system, then I never got around to it. > > John W. Colby > www.ColbyConsulting.com > > > Mark Breen wrote: > > Hi John, > > > > So it is SQL Server itself or the billing db? > > > > Are other db's also slow? If it is just billing then you need to look at > > indexes etc, and as Bobby is suggesting, you may want to use the wizard > to > > create a daily maintenance plan, that will re-build the indexes on > specified > > databases. I always include a daily maintenance plan on any transaction > > based db's I look after. > > > > However, if it is machine and OS / installation related, that is all > > irrelevant and you need to look at firewall, AV or some other machine > > related issue. I would plum first for a careful complete removal of SQL > and > > another install in that case. I would turn off AV/ Firewal and anything > > else that might effect it (Spyware software). > > > > Let us know which it is, I recently upgraded a few machines to sql 2008 > and > > would be keen to hear how you get on. > > > > Also, is it slow in SSMS or just through the GUI that you are using? > IOW, > > could it be ABO or ODBC related? > > > > Mark > > _______________________________________________ > 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 Tue Mar 23 09:19:22 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 23 Mar 2010 10:19:22 -0400 Subject: [dba-SQLServer] Call for development assistance Message-ID: <4BA8CDEA.9000907@colbyconsulting.com> Guys, Please bear with me for just a bit of explanation. Because my daughter has a genetic problem which causes her a variety of medical issues, I have become involved in an organization that is training my wife and I to be advocates for people with disabilities. The organization is called Partners in Policymaking (PIP) and their intent is to train individuals with disabilities, or caretakers for people with disabilities to be effective advocates. First of all anyone (in the US) who has a disability or is a caretaker, I highly recommend the following site as it provides a ton of links to other sites for specific issues. http://www.partnersinpolicymaking.com/ For my state the link is: http://www.ncpartnersinpolicymaking.com/index.html PIP is a national organization but each state has their own organization to provide training in that state. PIP provides a series of about 9 monthly trainings (16 hours, once a month) on a variety of issues. Each participant (me) has to do a project. While PIP has a web site and stuff, what they do not have (or I haven't found) is an effective system for allowing every PIP graduate from every state to find each other and communicate. For my project I have decided to try to leverage my technical abilities (and contacts!) to try and build a system for coordinating the graduates. What I want to do is build a web site. BUT I do not do web sites! But it really needs to be a web site. Sigh. So (THE PURPOSE OF THIS EMAIL) I am putting out a call for anyone who wants to get involved with a good cause and knows anything at all about building a web site (in .Net). I am going to be involved in this. I am going to learn everything I can about every phase of this, but I need help. I expect to have a fairly large database of contact information, including email addresses. I expect eventually to broaden the base to anyone with a stake, people with or caretakers of people with a disability. Eventually I would like to build a system similar to one belonging to: http://consumer-action.org/ This organization collects email addresses for consumers who want to affect legislation. Someone at consumer-action.org then monitors legislation before congress and emails us consumers when legislation is about to be voted on. More importantly it provides a way, through their web site, to SEND EMAIL to MY legislators (based on my zip code). Way cool, way easy to send the email to my legislator. I want to do that for disability rights legislation. I need help. Anyone interested in helping please raise your hand, get with me, and let's make this thing happen. Thanks, -- John W. Colby www.ColbyConsulting.com From ssharkins at gmail.com Tue Mar 23 09:25:19 2010 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 23 Mar 2010 10:25:19 -0400 Subject: [dba-SQLServer] Call for development assistance References: <4BA8CDEA.9000907@colbyconsulting.com> Message-ID: > Anyone interested in helping please raise your hand, get with me, and > let's make this thing happen. ======JC, count me in -- I have no experience in building web sites, but I'm sure there's something I could do to help, and I'm not opposing to learning new skills. Susan H. From jwcolby at colbyconsulting.com Tue Mar 23 09:58:16 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 23 Mar 2010 10:58:16 -0400 Subject: [dba-SQLServer] Call for development assistance In-Reply-To: References: <4BA8CDEA.9000907@colbyconsulting.com> Message-ID: <4BA8D708.2000901@colbyconsulting.com> Thanks Susan! If it works, eventually this thing will be huge I think. In the meantime I am going to need SQL Server stuff, C# stuff and ASP.Net stuff. Lots for everyone to do I am sure. Not to mention brainstorming, high level planning, documentation and so much more. I would like to be able to do startup in time for my last session which will be in the November time frame. John W. Colby www.ColbyConsulting.com Susan Harkins wrote: >> Anyone interested in helping please raise your hand, get with me, and >> let's make this thing happen. > > ======JC, count me in -- I have no experience in building web sites, but I'm > sure there's something I could do to help, and I'm not opposing to learning > new skills. > > Susan H. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From rsigmond at comcast.net Tue Mar 23 14:07:19 2010 From: rsigmond at comcast.net (Randy Sigmond) Date: Tue, 23 Mar 2010 15:07:19 -0400 Subject: [dba-SQLServer] Call for Development Message-ID: <002601cacabc$0f8ad6a0$2ea083e0$@net> John, Count me in! I have experience in C#, ASP.NET & SQL Development. Randy Sigmond Ps - I can be found on LinkedIn.com From jwcolby at colbyconsulting.com Tue Mar 23 14:20:27 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 23 Mar 2010 15:20:27 -0400 Subject: [dba-SQLServer] Call for Development In-Reply-To: <002601cacabc$0f8ad6a0$2ea083e0$@net> References: <002601cacabc$0f8ad6a0$2ea083e0$@net> Message-ID: <4BA9147B.2040903@colbyconsulting.com> Thanks Randy! I will do some organization stuff to allow us all to work together and then call a meeting. John W. Colby www.ColbyConsulting.com Randy Sigmond wrote: > John, > > > > Count me in! > > > > I have experience in C#, ASP.NET & SQL Development. > > > > Randy Sigmond > > > > Ps - I can be found on LinkedIn.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From Susan.Klos at fldoe.org Wed Mar 24 06:35:53 2010 From: Susan.Klos at fldoe.org (Klos, Susan) Date: Wed, 24 Mar 2010 07:35:53 -0400 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 13 In-Reply-To: References: Message-ID: <66D9CA142291D741B515207C09AA3BC3147F00@MAIL2.FLDOE.INT> John, count me in also. I am not familiar with .net but have built websites using a text editor and knowledge of html code. I would be more than willing to help where I can and learn new things. I am an advocate for cross browser coding. It should look good in browsers other than IE. I used to use Cold Fusion for getting data from and to a database on the server. I could learn .net I am sure. If you need further assistance feel free to contact me. ? Susan Klos Senior Database Analyst Florida Department of Education Evaluation and Reporting Office Phone: 850.245.0708 Fax: 850.245.0710 email: susan.klos at fldoe.org -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of dba-sqlserver-request at databaseadvisors.com Sent: Tuesday, March 23, 2010 2:00 PM To: dba-sqlserver at databaseadvisors.com Subject: dba-SQLServer Digest, Vol 85, Issue 13 Send dba-SQLServer mailing list submissions to dba-sqlserver at databaseadvisors.com To subscribe or unsubscribe via the World Wide Web, visit http://databaseadvisors.com/mailman/listinfo/dba-sqlserver or, via email, send a message with subject or body 'help' to dba-sqlserver-request at databaseadvisors.com You can reach the person managing the list at dba-sqlserver-owner at databaseadvisors.com When replying, please edit your Subject line so it is more specific than "Re: Contents of dba-SQLServer digest..." Today's Topics: 1. Re: SPAM-LOW: Re: My database is slow (Mark Breen) 2. Call for development assistance (jwcolby) 3. Re: Call for development assistance (Susan Harkins) 4. Re: Call for development assistance (jwcolby) ---------------------------------------------------------------------- Message: 1 Date: Mon, 22 Mar 2010 19:27:03 +0000 From: Mark Breen Subject: Re: [dba-SQLServer] SPAM-LOW: Re: My database is slow To: Discussion concerning MS SQL Server Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Hello John, Just FYI, [Following comments are for information and not intended to be for scalable systems or high volumes of users] an ODBC linked table, over the internet, to MySQL or MS SQL works fantastically fast. At times you would not realize that it was a linked table via OBDC, even when that is a shared server in a hosting company with 100 other people on the same box. Using a Jet Query can give fantastically fast results and criteria such as Where OrderID = x works super. Doing a join from Customers to Orders works well enough but can be slower. However for the average user a join of two tables might be plenty fast with data coming back in 1-2 seconds. Doing a join from Customers to orders to Order Details starting to become slow. In that case, you can create a View then you "Select * from CustomersOrdersOrderItems" where Order Id = x. Not surprisingly this is fantastically fast again. So what is my point? Do not assume that linked tables and jet based queries are all bad, they are good enough for normal users to use and you only need server based queries when they become more complex. I hope that is useful for you, you should try it sometime and you will be surprised to see how fast "dirty linked tables" can be. HTH, Thanks Mark On 22 March 2010 17:58, jwcolby wrote: > Mark, > > I thought it was slow through SSMS as well. However I just went back in to > look and it is pretty > much instantaneous displaying the top (1000) records for any table. > > The database files are on my local laptop. The laptop is a DELL (Intel) > dual core with 4 gigs of > RAM. The hard drive is an upgrade to 7200 rpm. > > Everything was running fine. I had SQL Server 2005 Express services > running on the laptop and > installed 2005 SSMS to be able to see it from SSMS if needed. > > I never had any issues until I switched to 2008. I upgraded my SERVER to > 2008 and suddenly was > unable to get at the databases on the server. Thinking back on it that was > suspicious since I would > think that 2005 SSMS should be able to see and talk to 2008 server > instances. > > I wasn't really thinking deeply about that though. I just decided that > 2008 was running great on > the server, let's install on my laptop as well. When I tried, it > complained during install about > the Express stuff. I just decided to completely uninstall everything SQL > Server and reinstall from > scratch with 2008. That in fact worked quite well. > > So it seems that maaaaybe the issue could be ODBC access to the 2008 stuff > from Access 2003. The > interface is still pretty darned slow. > > I think life is prodding me to learn how to bind forms and combos to stored > procedures out on SQL > Server. I actually moved to SQL Server exactly to allow me to learn this > stuff here at my office on > a real system, then I never got around to it. > > John W. Colby > www.ColbyConsulting.com > > > Mark Breen wrote: > > Hi John, > > > > So it is SQL Server itself or the billing db? > > > > Are other db's also slow? If it is just billing then you need to look at > > indexes etc, and as Bobby is suggesting, you may want to use the wizard > to > > create a daily maintenance plan, that will re-build the indexes on > specified > > databases. I always include a daily maintenance plan on any transaction > > based db's I look after. > > > > However, if it is machine and OS / installation related, that is all > > irrelevant and you need to look at firewall, AV or some other machine > > related issue. I would plum first for a careful complete removal of SQL > and > > another install in that case. I would turn off AV/ Firewal and anything > > else that might effect it (Spyware software). > > > > Let us know which it is, I recently upgraded a few machines to sql 2008 > and > > would be keen to hear how you get on. > > > > Also, is it slow in SSMS or just through the GUI that you are using? > IOW, > > could it be ABO or ODBC related? > > > > Mark > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > ------------------------------ Message: 2 Date: Tue, 23 Mar 2010 10:19:22 -0400 From: jwcolby Subject: [dba-SQLServer] Call for development assistance To: VBA , Sqlserver-Dba Message-ID: <4BA8CDEA.9000907 at colbyconsulting.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Guys, Please bear with me for just a bit of explanation. Because my daughter has a genetic problem which causes her a variety of medical issues, I have become involved in an organization that is training my wife and I to be advocates for people with disabilities. The organization is called Partners in Policymaking (PIP) and their intent is to train individuals with disabilities, or caretakers for people with disabilities to be effective advocates. First of all anyone (in the US) who has a disability or is a caretaker, I highly recommend the following site as it provides a ton of links to other sites for specific issues. http://www.partnersinpolicymaking.com/ For my state the link is: http://www.ncpartnersinpolicymaking.com/index.html PIP is a national organization but each state has their own organization to provide training in that state. PIP provides a series of about 9 monthly trainings (16 hours, once a month) on a variety of issues. Each participant (me) has to do a project. While PIP has a web site and stuff, what they do not have (or I haven't found) is an effective system for allowing every PIP graduate from every state to find each other and communicate. For my project I have decided to try to leverage my technical abilities (and contacts!) to try and build a system for coordinating the graduates. What I want to do is build a web site. BUT I do not do web sites! But it really needs to be a web site. Sigh. So (THE PURPOSE OF THIS EMAIL) I am putting out a call for anyone who wants to get involved with a good cause and knows anything at all about building a web site (in .Net). I am going to be involved in this. I am going to learn everything I can about every phase of this, but I need help. I expect to have a fairly large database of contact information, including email addresses. I expect eventually to broaden the base to anyone with a stake, people with or caretakers of people with a disability. Eventually I would like to build a system similar to one belonging to: http://consumer-action.org/ This organization collects email addresses for consumers who want to affect legislation. Someone at consumer-action.org then monitors legislation before congress and emails us consumers when legislation is about to be voted on. More importantly it provides a way, through their web site, to SEND EMAIL to MY legislators (based on my zip code). Way cool, way easy to send the email to my legislator. I want to do that for disability rights legislation. I need help. Anyone interested in helping please raise your hand, get with me, and let's make this thing happen. Thanks, -- John W. Colby www.ColbyConsulting.com ------------------------------ Message: 3 Date: Tue, 23 Mar 2010 10:25:19 -0400 From: "Susan Harkins" Subject: Re: [dba-SQLServer] Call for development assistance To: "Discussion concerning MS SQL Server" Message-ID: Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original > Anyone interested in helping please raise your hand, get with me, and > let's make this thing happen. ======JC, count me in -- I have no experience in building web sites, but I'm sure there's something I could do to help, and I'm not opposing to learning new skills. Susan H. ------------------------------ Message: 4 Date: Tue, 23 Mar 2010 10:58:16 -0400 From: jwcolby Subject: Re: [dba-SQLServer] Call for development assistance To: Discussion concerning MS SQL Server , VBA Message-ID: <4BA8D708.2000901 at colbyconsulting.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Thanks Susan! If it works, eventually this thing will be huge I think. In the meantime I am going to need SQL Server stuff, C# stuff and ASP.Net stuff. Lots for everyone to do I am sure. Not to mention brainstorming, high level planning, documentation and so much more. I would like to be able to do startup in time for my last session which will be in the November time frame. John W. Colby www.ColbyConsulting.com Susan Harkins wrote: >> Anyone interested in helping please raise your hand, get with me, and >> let's make this thing happen. > > ======JC, count me in -- I have no experience in building web sites, but I'm > sure there's something I could do to help, and I'm not opposing to learning > new skills. > > Susan H. > > _______________________________________________ > 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 End of dba-SQLServer Digest, Vol 85, Issue 13 ********************************************* From jwcolby at colbyconsulting.com Wed Mar 24 07:16:49 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 24 Mar 2010 08:16:49 -0400 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 85, Issue 13 In-Reply-To: <66D9CA142291D741B515207C09AA3BC3147F00@MAIL2.FLDOE.INT> References: <66D9CA142291D741B515207C09AA3BC3147F00@MAIL2.FLDOE.INT> Message-ID: <4BAA02B1.9060909@colbyconsulting.com> Susan, I need everyone I can get. In the end this will be a large project and I am certain that it will take a large team to complete. I will need to get a web server up and available to the team. I would like to do this in .Net simply because that is something that many of the people on this list want to learn how to use. I am open to other tools but before I select another tool I want to know that .Net is not going to work. I assume that means ASP.Net. I will also need to get a SQL Server available. Or maybe MySQL, I am open to that. I happen to be somewhat familiar with SQL Server and not at all familiar with MYSQL so of course SQL Server would be my first choice. Plus I have SQL Server at my fingertips. While we are doing development I am thinking of setting up one or more virtual machines on my servers to host this stuff. I have a VMWare server and virtual machines already created; I use VMWare for other things. It would be fairly easy for me to get a couple up and running and ready to go. I would like to build a pair of VMs that think they are a self contained network, exposed to the internet so that people could come in and work. Try to minimize the security risk to the rest of my network. I would also like to use source control from the getgo. And then there is documentation. So as you can see, there are many areas of expertise, lots of stuff to do. I don't think it will be hard to find something for everyone to do. Thanks for volunteering. John W. Colby www.ColbyConsulting.com Klos, Susan wrote: > John, count me in also. I am not familiar with .net but have built websites using a text editor and knowledge of html code. I would be more than willing to help where I can and learn new things. I am an advocate for cross browser coding. It should look good in browsers other than IE. I used to use Cold Fusion for getting data from and to a database on the server. I could learn .net I am sure. > > If you need further assistance feel free to contact me. > > Susan Klos > Senior Database Analyst > Florida Department of Education > Evaluation and Reporting Office > Phone: 850.245.0708 > Fax: 850.245.0710 > email: susan.klos at fldoe.org > > > Guys, > > Please bear with me for just a bit of explanation. > > Because my daughter has a genetic problem which causes her a variety of medical issues, I have > become involved in an organization that is training my wife and I to be advocates for people with > disabilities. The organization is called Partners in Policymaking (PIP) and their intent is to > train individuals with disabilities, or caretakers for people with disabilities to be effective > advocates. > > First of all anyone (in the US) who has a disability or is a caretaker, I highly recommend the > following site as it provides a ton of links to other sites for specific issues. > > http://www.partnersinpolicymaking.com/ > > For my state the link is: > > http://www.ncpartnersinpolicymaking.com/index.html > > PIP is a national organization but each state has their own organization to provide training in that > state. PIP provides a series of about 9 monthly trainings (16 hours, once a month) on a variety of > issues. Each participant (me) has to do a project. > > While PIP has a web site and stuff, what they do not have (or I haven't found) is an effective > system for allowing every PIP graduate from every state to find each other and communicate. For my > project I have decided to try to leverage my technical abilities (and contacts!) to try and build a > system for coordinating the graduates. > > What I want to do is build a web site. BUT I do not do web sites! But it really needs to be a web > site. Sigh. > > So (THE PURPOSE OF THIS EMAIL) I am putting out a call for anyone who wants to get involved with a > good cause and knows anything at all about building a web site (in .Net). I am going to be involved > in this. I am going to learn everything I can about every phase of this, but I need help. > > I expect to have a fairly large database of contact information, including email addresses. I > expect eventually to broaden the base to anyone with a stake, people with or caretakers of people > with a disability. > > Eventually I would like to build a system similar to one belonging to: > > http://consumer-action.org/ > > This organization collects email addresses for consumers who want to affect legislation. Someone at > consumer-action.org then monitors legislation before congress and emails us consumers when > legislation is about to be voted on. More importantly it provides a way, through their web site, to > SEND EMAIL to MY legislators (based on my zip code). > > Way cool, way easy to send the email to my legislator. > > I want to do that for disability rights legislation. I need help. > > Anyone interested in helping please raise your hand, get with me, and let's make this thing happen. > > Thanks, > From robert at webedb.com Wed Mar 24 14:00:43 2010 From: robert at webedb.com (Robert Stewart) Date: Wed, 24 Mar 2010 14:00:43 -0500 Subject: [dba-SQLServer] Call for development assistance In-Reply-To: References: Message-ID: <201003241901.o2OJ0xBF000753@databaseadvisors.com> I would recommend using LinkedIn for people to register at and for you to create a group there for the organization that everyone can join. Things can be sent out from the group and all members of the group will get it. I have some "template" web sites that I have built that are totally data based. That includes the logo displayed, the text on the home page, etc. But, I think what you need to more of a social networking type of site and that has been built in Facebook, LinkedIn, and I am sure there are others. At 01:00 PM 3/23/2010, you wrote: >Date: Tue, 23 Mar 2010 10:19:22 -0400 >From: jwcolby >Subject: [dba-SQLServer] Call for development assistance >To: VBA , Sqlserver-Dba > >Message-ID: <4BA8CDEA.9000907 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Guys, > >Please bear with me for just a bit of explanation. > >Because my daughter has a genetic problem which causes her a variety >of medical issues, I have >become involved in an organization that is training my wife and I to >be advocates for people with >disabilities. The organization is called Partners in Policymaking >(PIP) and their intent is to >train individuals with disabilities, or caretakers for people with >disabilities to be effective >advocates. > >First of all anyone (in the US) who has a disability or is a >caretaker, I highly recommend the >following site as it provides a ton of links to other sites for >specific issues. > >http://www.partnersinpolicymaking.com/ > >For my state the link is: > >http://www.ncpartnersinpolicymaking.com/index.html > >PIP is a national organization but each state has their own >organization to provide training in that >state. PIP provides a series of about 9 monthly trainings (16 >hours, once a month) on a variety of >issues. Each participant (me) has to do a project. > >While PIP has a web site and stuff, what they do not have (or I >haven't found) is an effective >system for allowing every PIP graduate from every state to find each >other and communicate. For my >project I have decided to try to leverage my technical abilities >(and contacts!) to try and build a >system for coordinating the graduates. > >What I want to do is build a web site. BUT I do not do web >sites! But it really needs to be a web >site. Sigh. > >So (THE PURPOSE OF THIS EMAIL) I am putting out a call for anyone >who wants to get involved with a >good cause and knows anything at all about building a web site (in >.Net). I am going to be involved >in this. I am going to learn everything I can about every phase of >this, but I need help. > >I expect to have a fairly large database of contact information, >including email addresses. I >expect eventually to broaden the base to anyone with a stake, people >with or caretakers of people >with a disability. > >Eventually I would like to build a system similar to one belonging to: > >http://consumer-action.org/ > >This organization collects email addresses for consumers who want to >affect legislation. Someone at >consumer-action.org then monitors legislation before congress and >emails us consumers when >legislation is about to be voted on. More importantly it provides a >way, through their web site, to >SEND EMAIL to MY legislators (based on my zip code). > >Way cool, way easy to send the email to my legislator. > >I want to do that for disability rights legislation. I need help. > >Anyone interested in helping please raise your hand, get with me, >and let's make this thing happen. > >Thanks, > >-- >John W. Colby >www.ColbyConsulting.com > From jeff.developer at gmail.com Wed Mar 24 15:53:25 2010 From: jeff.developer at gmail.com (Jeff Barrows) Date: Wed, 24 Mar 2010 15:53:25 -0500 Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help Message-ID: <2dad32081003241353x605dfa9fs3558d54395696b6@mail.gmail.com> Has anyone done a crystal report for shipping labels where you know the total number of cartons, but do not have a record for each carton? For example, I have 1 record telling me there will be 9 cartons. I need to be able to loop through the records and print a label for each carton. -- Jeff Barrows MCP, MCAD, MCSD Outbak Technologies, LLC Racine, WI From mikedorism at verizon.net Wed Mar 24 16:09:19 2010 From: mikedorism at verizon.net (Doris Manning) Date: Wed, 24 Mar 2010 17:09:19 -0400 Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help In-Reply-To: <2dad32081003241353x605dfa9fs3558d54395696b6@mail.gmail.com> References: <2dad32081003241353x605dfa9fs3558d54395696b6@mail.gmail.com> Message-ID: <9ADFBDB9579F44A2AC2F3E5908C5D551@hargrove.internal> Couldn't you just load the report and then pass in the Carton number as a parameter each time you print it? Doris Manning Senior Developer/Database Administrator Hargrove Inc. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Sent: Wednesday, March 24, 2010 4:53 PM To: accessd; SQLServer; Tech List Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help Has anyone done a crystal report for shipping labels where you know the total number of cartons, but do not have a record for each carton? For example, I have 1 record telling me there will be 9 cartons. I need to be able to loop through the records and print a label for each carton. -- Jeff Barrows MCP, MCAD, MCSD Outbak Technologies, LLC Racine, WI _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Mar 24 16:45:58 2010 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 25 Mar 2010 07:45:58 +1000 Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help In-Reply-To: <9ADFBDB9579F44A2AC2F3E5908C5D551@hargrove.internal> References: <2dad32081003241353x605dfa9fs3558d54395696b6@mail.gmail.com>, <9ADFBDB9579F44A2AC2F3E5908C5D551@hargrove.internal> Message-ID: <4BAA8816.5784.4A79BAA@stuart.lexacorp.com.pg> Classic situation for a "numbers table" or "dimension table". Create a table called tblNumbers containing a single PK field. Populate it with numbers from 1 to whatever you may need. Then include that table in your query SELECT QyrLabels.Name, qryLabels,Adress,, tblNumbers.Number, qryLabels.Cartons FROM qryLables, tblNumbers WHERE tblNumbers.Number<=[Cartons]; Order by Name,Number will return something like Name Address Number Cartons Joe 1 Main St 1 3 Joe 1 Main St 2 3 Joe 1 Main St 3 3 Fred 2 New St 1 2 Fred 2 New St 2 2 -- Stuart > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff > Barrows > Sent: Wednesday, March 24, 2010 4:53 PM > To: accessd; SQLServer; Tech List > Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports > help > > Has anyone done a crystal report for shipping labels where you know the > total number of cartons, but do not have a record for each carton? > > For example, I have 1 record telling me there will be 9 cartons. I need to > be able to loop through the records and print a label for each carton. > > -- > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > _______________________________________________ From jeff.developer at gmail.com Wed Mar 24 22:03:11 2010 From: jeff.developer at gmail.com (Jeff B) Date: Wed, 24 Mar 2010 22:03:11 -0500 Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help In-Reply-To: <4BAA8816.5784.4A79BAA@stuart.lexacorp.com.pg> References: <9ADFBDB9579F44A2AC2F3E5908C5D551@hargrove.internal> <4BAA8816.5784.4A79BAA@stuart.lexacorp.com.pg> Message-ID: <4baad14a.5744f10a.5ede.30b8@mx.google.com> Sorry, should have been a little clearer. I cannot create additional tables, this is a 'closed' system. I need this to be as hands-off as possible as I will not be there after this week. So far everything works fine except for printing the correct number of labels. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, March 24, 2010 4:46 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help Classic situation for a "numbers table" or "dimension table". Create a table called tblNumbers containing a single PK field. Populate it with numbers from 1 to whatever you may need. Then include that table in your query SELECT QyrLabels.Name, qryLabels,Adress,, tblNumbers.Number, qryLabels.Cartons FROM qryLables, tblNumbers WHERE tblNumbers.Number<=[Cartons]; Order by Name,Number will return something like Name Address Number Cartons Joe 1 Main St 1 3 Joe 1 Main St 2 3 Joe 1 Main St 3 3 Fred 2 New St 1 2 Fred 2 New St 2 2 -- Stuart > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff > Barrows > Sent: Wednesday, March 24, 2010 4:53 PM > To: accessd; SQLServer; Tech List > Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports > help > > Has anyone done a crystal report for shipping labels where you know the > total number of cartons, but do not have a record for each carton? > > For example, I have 1 record telling me there will be 9 cartons. I need to > be able to loop through the records and print a label for each carton. > > -- > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > _______________________________________________ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.791 / Virus Database: 271.1.1/2767 - Release Date: 03/24/10 02:33:00 From michael at ddisolutions.com.au Wed Mar 24 22:46:55 2010 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 25 Mar 2010 14:46:55 +1100 Subject: [dba-SQLServer] (cross posted) Looking for some CrystalReports help References: <9ADFBDB9579F44A2AC2F3E5908C5D551@hargrove.internal><4BAA8816.5784.4A79BAA@stuart.lexacorp.com.pg> <4baad14a.5744f10a.5ede.30b8@mx.google.com> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D01582E38@ddi-01.DDI.local> Jeff, Then how about manipulating the dataTable directly. Add new rows before passing the table to CR/CO. Cheers Michael M Sorry, should have been a little clearer. I cannot create additional tables, this is a 'closed' system. I need this to be as hands-off as possible as I will not be there after this week. So far everything works fine except for printing the correct number of labels. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, March 24, 2010 4:46 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help Classic situation for a "numbers table" or "dimension table". Create a table called tblNumbers containing a single PK field. Populate it with numbers from 1 to whatever you may need. Then include that table in your query SELECT QyrLabels.Name, qryLabels,Adress,, tblNumbers.Number, qryLabels.Cartons FROM qryLables, tblNumbers WHERE tblNumbers.Number<=[Cartons]; Order by Name,Number will return something like Name Address Number Cartons Joe 1 Main St 1 3 Joe 1 Main St 2 3 Joe 1 Main St 3 3 Fred 2 New St 1 2 Fred 2 New St 2 2 -- Stuart > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff > Barrows > Sent: Wednesday, March 24, 2010 4:53 PM > To: accessd; SQLServer; Tech List > Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports > help > > Has anyone done a crystal report for shipping labels where you know the > total number of cartons, but do not have a record for each carton? > > For example, I have 1 record telling me there will be 9 cartons. I need to > be able to loop through the records and print a label for each carton. > > -- > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > _______________________________________________ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.791 / Virus Database: 271.1.1/2767 - Release Date: 03/24/10 02:33:00 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.791 / Virus Database: 271.1.1/2749 - Release Date: 03/25/10 06:33:00 From David at sierranevada.com Thu Mar 25 13:14:51 2010 From: David at sierranevada.com (David Lewis) Date: Thu, 25 Mar 2010 11:14:51 -0700 Subject: [dba-SQLServer] Re Numbersand crystal reports In-Reply-To: References: Message-ID: <01606FC26AD0E54B8348D886D0C074D33C289C387D@schwarz.sierranevada.corp> Create the table on the fly as a CTE, or if you are working with an older version of sql server, as derived table. Message: 5 Date: Wed, 24 Mar 2010 22:03:11 -0500 From: "Jeff B" Subject: Re: [dba-SQLServer] (cross posted) Looking for some Crystal Reports help To: "'Discussion concerning MS SQL Server'" Message-ID: <4baad14a.5744f10a.5ede.30b8 at mx.google.com> Content-Type: text/plain; charset="iso-8859-1" Sorry, should have been a little clearer. I cannot create additional tables, this is a 'closed' system. I need this to be as hands-off as possible as I will not be there after this week. So far everything works fine except for printing the correct number of labels. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com The contents of this e-mail message and its attachments are covered by the Electronic Communications Privacy Act (18 U.S.C. 2510-2521) and are intended solely for the addressee(s) hereof. If you are not the named recipient, or the employee or agent responsible for delivering the message to the intended recipient, or if this message has been addressed to you in error, you are directed not to read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. If you have received this communication in error, please notify us immediately by return e-mail or by telephone, 530-893-3520, and delete and/or destroy all copies of the message immediately. From rsigmond at comcast.net Thu Mar 25 22:14:29 2010 From: rsigmond at comcast.net (Randy Sigmond) Date: Thu, 25 Mar 2010 23:14:29 -0400 Subject: [dba-SQLServer] Call for Development Message-ID: <016501cacc92$73ad28e0$5b077aa0$@net> John, I am all for writing/developing custom sites, but would you consider using an off-the-shelf (open-source) package like Joomla or umbraco? It may be possible to get something up quickly using either of the mentioned items above and then modify for specifics. Just a thought. Randy Sigmond Restech Online www.restechonline.com Ph: 248.568.0053 From jwcolby at colbyconsulting.com Thu Mar 25 22:56:46 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 25 Mar 2010 23:56:46 -0400 Subject: [dba-SQLServer] Call for Development In-Reply-To: <016501cacc92$73ad28e0$5b077aa0$@net> References: <016501cacc92$73ad28e0$5b077aa0$@net> Message-ID: <4BAC307E.1070608@colbyconsulting.com> Randy, > I am all for writing/developing custom sites, but would you consider using an off-the-shelf (open-source) package like Joomla or umbraco? Well, let me lay out a couple of considerations: 1) This is eventually going to be heavy custom programming. 2) One of my objectives is to provide myself (and you guys) an opportunity to learn ASP.Net 3) I have until around the November time frame to get the basics up. My functionality objectives are: 1) Accumulate a list of PIP graduate contact info and get it into a database. 2) Allow PIP graduates the ability to edit their own data so that as they move around they can keep their own data up to date. PIP graduates need to be able to email and call each other and not drop off the planet because they move. 3) Allow someone (management) the ability to blast emails out to focused email lists. For example all of the PIP graduates in a given state might need to send emails to the legislators for their states based on the zip they reside in. 4) Allow someone to blast out a similar set of emails to the entire list of PIP graduates about legislation before congress. 5) Allow opt-out 6) Eventually accumulate a similar email / contact list for a wider audience of basically anyone with a stake in the disability issue - persons with or caretakers of persons with a disability. IOW if legislation is before congress and I have a quarter million people who have signed up to receive notices and send emails, the system would sent emails to all quarter million people. The email would have a link back to the web page server to a page where they could compose and send an email to their specific legislator. 7) Eventually allow some group of users to monitor legislation and organize the email blasts as legislation comes up for a vote. I want to emulate the functionality of http://consumer-action.org/ except designed for a disability group rather than a consumer group. So, I would certainly consider a canned package IF it was: 1) Windows based, because I am Windows based and I don't have access to people with the expertise to write this on a linux platform. 2) .Net based, because I am .Net based and I don't have access to people with the expertise to write this in a non .net platform. 3) Able to easily integrate the kinds of functionality I am discussing above. This is not going to be a "public facing pretty web site" but rather a workhorse web site which is less about people visiting and more about executing jobs. Or at least that is my take on things at this juncture. I understand "select the best tool for the job" but in the end this is my project (in that it is up to me to make it succeed) and I need to select tools that I can use to get the job done, and which I can find people familiar with those tools. So yes, I am not discounting any off-the-shelf solution if it meets the workhorse needs. I personally run DNN on my company web site (though it desperately needs maintenance) and I absolutely LOVE it for that kind of job. OTOH trying to hook into it is not for the faint of heart. If you are intimately familiar with one or more of these packages and think it fits the bill, please come back with a discussion. John W. Colby www.ColbyConsulting.com Randy Sigmond wrote: > John, > > > > I am all for writing/developing custom sites, but would you consider using an off-the-shelf (open-source) package like > Joomla or umbraco? > > > > It may be possible to get something up quickly using either of the mentioned items above and then modify for specifics. > > > > Just a thought. > > > > Randy Sigmond > > Restech Online > > www.restechonline.com > > Ph: 248.568.0053 > > > > _______________________________________________ > 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 Fri Mar 26 08:29:19 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 26 Mar 2010 09:29:19 -0400 Subject: [dba-SQLServer] One or more objects access this field Message-ID: <4BACB6AF.7090508@colbyconsulting.com> I tried to do a drop column from a sql statement and it failed with that error message. AFAICT I had no cursors etc open that displayed that field. I eventually went into design view of the table and manually deleted the column and that worked. Any ideas why something like this occurs? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Fri Mar 26 18:13:25 2010 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 27 Mar 2010 09:13:25 +1000 Subject: [dba-SQLServer] One or more objects access this field In-Reply-To: <4BACB6AF.7090508@colbyconsulting.com> References: <4BACB6AF.7090508@colbyconsulting.com> Message-ID: <4BAD3F95.3640.F44691E@stuart.lexacorp.com.pg> Where was the statement? Stored procedure or in your C# application? -- Stuart On 26 Mar 2010 at 9:29, jwcolby wrote: > I tried to do a drop column from a sql statement and it failed with that error message. AFAICT I > had no cursors etc open that displayed that field. I eventually went into design view of the table > and manually deleted the column and that worked. > > Any ideas why something like this occurs? > > -- > 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 marklbreen at gmail.com Sat Mar 27 06:11:36 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 27 Mar 2010 11:11:36 +0000 Subject: [dba-SQLServer] Call for Development In-Reply-To: <4BAC307E.1070608@colbyconsulting.com> References: <016501cacc92$73ad28e0$5b077aa0$@net> <4BAC307E.1070608@colbyconsulting.com> Message-ID: Hello John, I urge you strongly to spend a little time to review DotNetNuke. You will be extremely surprised how easy it can be to work with it. Of course it is all asp.net and you can choose vb or C#, which ever you prefer. All the work I do in it is C#. I have recently been working on a application with a large db and I have build about 30 forms all with less than 20 lines of code. I have to state at the outset that I am also depending on Telerik radGrid. There are modules available to do the subscription based email stuff, and also all sorts of other things, such as face book and twitter integration etc, they all cost money, but the money tends to be wrote: > Randy, > > > I am all for writing/developing custom sites, but would you consider > using an off-the-shelf > (open-source) package like Joomla or umbraco? > > Well, let me lay out a couple of considerations: > > 1) This is eventually going to be heavy custom programming. > 2) One of my objectives is to provide myself (and you guys) an opportunity > to learn ASP.Net > 3) I have until around the November time frame to get the basics up. > > My functionality objectives are: > > 1) Accumulate a list of PIP graduate contact info and get it into a > database. > 2) Allow PIP graduates the ability to edit their own data so that as they > move around they can keep > their own data up to date. PIP graduates need to be able to email and call > each other and not drop > off the planet because they move. > 3) Allow someone (management) the ability to blast emails out to focused > email lists. For example > all of the PIP graduates in a given state might need to send emails to the > legislators for their > states based on the zip they reside in. > 4) Allow someone to blast out a similar set of emails to the entire list of > PIP graduates about > legislation before congress. > 5) Allow opt-out > > 6) Eventually accumulate a similar email / contact list for a wider > audience of basically anyone > with a stake in the disability issue - persons with or caretakers of > persons with a disability. IOW > if legislation is before congress and I have a quarter million people who > have signed up to receive > notices and send emails, the system would sent emails to all quarter > million people. The email > would have a link back to the web page server to a page where they could > compose and send an email > to their specific legislator. > > 7) Eventually allow some group of users to monitor legislation and organize > the email blasts as > legislation comes up for a vote. > > I want to emulate the functionality of http://consumer-action.org/ except > designed for a disability > group rather than a consumer group. > > So, I would certainly consider a canned package IF it was: > > 1) Windows based, because I am Windows based and I don't have access to > people with the expertise to > write this on a linux platform. > 2) .Net based, because I am .Net based and I don't have access to people > with the expertise to write > this in a non .net platform. > 3) Able to easily integrate the kinds of functionality I am discussing > above. > > This is not going to be a "public facing pretty web site" but rather a > workhorse web site which is > less about people visiting and more about executing jobs. Or at least that > is my take on things at > this juncture. > > I understand "select the best tool for the job" but in the end this is my > project (in that it is up > to me to make it succeed) and I need to select tools that I can use to get > the job done, and which I > can find people familiar with those tools. > > So yes, I am not discounting any off-the-shelf solution if it meets the > workhorse needs. I > personally run DNN on my company web site (though it desperately needs > maintenance) and I absolutely > LOVE it for that kind of job. OTOH trying to hook into it is not for the > faint of heart. > > If you are intimately familiar with one or more of these packages and think > it fits the bill, please > come back with a discussion. > > John W. Colby > www.ColbyConsulting.com > > > Randy Sigmond wrote: > > John, > > > > > > > > I am all for writing/developing custom sites, but would you consider > using an off-the-shelf (open-source) package like > > Joomla or umbraco? > > > > > > > > It may be possible to get something up quickly using either of the > mentioned items above and then modify for specifics. > > > > > > > > Just a thought. > > > > > > > > Randy Sigmond > > > > Restech Online > > > > www.restechonline.com > > > > Ph: 248.568.0053 > > > > > > > > _______________________________________________ > > 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 jwcolby at colbyconsulting.com Sat Mar 27 06:30:27 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 27 Mar 2010 07:30:27 -0400 Subject: [dba-SQLServer] Call for Development In-Reply-To: References: <016501cacc92$73ad28e0$5b077aa0$@net> <4BAC307E.1070608@colbyconsulting.com> Message-ID: <4BADEC53.1010803@colbyconsulting.com> Thanks for that Mark. I will look at that. I already have a DNN system and I may be able to use that as the preliminary site to do the development. I know that you can build subdomains with DNN. I spnt many hours looking at all of this stuff for DNN but that was many years ago. I still get emails from Snowcovered telling me about new modules and stuff. John W. Colby www.ColbyConsulting.com Mark Breen wrote: > Hello John, > > I urge you strongly to spend a little time to review DotNetNuke. > > You will be extremely surprised how easy it can be to work with it. Of > course it is all asp.net and you can choose vb or C#, which ever you prefer. > All the work I do in it is C#. > > I have recently been working on a application with a large db and I have > build about 30 forms all with less than 20 lines of code. I have to state > at the outset that I am also depending on Telerik radGrid. > > There are modules available to do the subscription based email stuff, and > also all sorts of other things, such as face book and > twitter integration etc, they all cost money, but the money tends to be > > DNN will > > 1)let you work in the MS field > 2) manage all the heavy lifting for a web app > 3) all you to add on custom modules for pocket money > 4) Allow you to build your own modules should you need them > 5) allow you to use a shared hosting account for approx $200 - $300 per > annum with a good hosting company (www.powerdnn.com) that specialise in DNN > hosting. > 6) the hosting company will set up DNN for you > > If you like I can send you two files and you can see that with just these > two files I have a working form that allows the user to perform CRUD > functionality. > > You can also spend 30 minutes browsing www.snowcovered.com to see the kinds > of skins and modules that are available for free or for small money. > > Is that any help? > > thanks > > Mark > > > > On 26 March 2010 03:56, jwcolby wrote: > >> Randy, >> >> > I am all for writing/developing custom sites, but would you consider >> using an off-the-shelf >> (open-source) package like Joomla or umbraco? >> >> Well, let me lay out a couple of considerations: >> >> 1) This is eventually going to be heavy custom programming. >> 2) One of my objectives is to provide myself (and you guys) an opportunity >> to learn ASP.Net >> 3) I have until around the November time frame to get the basics up. >> >> My functionality objectives are: >> >> 1) Accumulate a list of PIP graduate contact info and get it into a >> database. >> 2) Allow PIP graduates the ability to edit their own data so that as they >> move around they can keep >> their own data up to date. PIP graduates need to be able to email and call >> each other and not drop >> off the planet because they move. >> 3) Allow someone (management) the ability to blast emails out to focused >> email lists. For example >> all of the PIP graduates in a given state might need to send emails to the >> legislators for their >> states based on the zip they reside in. >> 4) Allow someone to blast out a similar set of emails to the entire list of >> PIP graduates about >> legislation before congress. >> 5) Allow opt-out >> >> 6) Eventually accumulate a similar email / contact list for a wider >> audience of basically anyone >> with a stake in the disability issue - persons with or caretakers of >> persons with a disability. IOW >> if legislation is before congress and I have a quarter million people who >> have signed up to receive >> notices and send emails, the system would sent emails to all quarter >> million people. The email >> would have a link back to the web page server to a page where they could >> compose and send an email >> to their specific legislator. >> >> 7) Eventually allow some group of users to monitor legislation and organize >> the email blasts as >> legislation comes up for a vote. >> >> I want to emulate the functionality of http://consumer-action.org/ except >> designed for a disability >> group rather than a consumer group. >> >> So, I would certainly consider a canned package IF it was: >> >> 1) Windows based, because I am Windows based and I don't have access to >> people with the expertise to >> write this on a linux platform. >> 2) .Net based, because I am .Net based and I don't have access to people >> with the expertise to write >> this in a non .net platform. >> 3) Able to easily integrate the kinds of functionality I am discussing >> above. >> >> This is not going to be a "public facing pretty web site" but rather a >> workhorse web site which is >> less about people visiting and more about executing jobs. Or at least that >> is my take on things at >> this juncture. >> >> I understand "select the best tool for the job" but in the end this is my >> project (in that it is up >> to me to make it succeed) and I need to select tools that I can use to get >> the job done, and which I >> can find people familiar with those tools. >> >> So yes, I am not discounting any off-the-shelf solution if it meets the >> workhorse needs. I >> personally run DNN on my company web site (though it desperately needs >> maintenance) and I absolutely >> LOVE it for that kind of job. OTOH trying to hook into it is not for the >> faint of heart. >> >> If you are intimately familiar with one or more of these packages and think >> it fits the bill, please >> come back with a discussion. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Randy Sigmond wrote: >>> John, >>> >>> >>> >>> I am all for writing/developing custom sites, but would you consider >> using an off-the-shelf (open-source) package like >>> Joomla or umbraco? >>> >>> >>> >>> It may be possible to get something up quickly using either of the >> mentioned items above and then modify for specifics. >>> >>> >>> Just a thought. >>> >>> >>> >>> Randy Sigmond >>> >>> Restech Online >>> >>> www.restechonline.com >>> >>> Ph: 248.568.0053 >>> >>> >>> >>> _______________________________________________ >>> 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 >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From marklbreen at gmail.com Sat Mar 27 13:35:53 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 27 Mar 2010 18:35:53 +0000 Subject: [dba-SQLServer] Call for Development In-Reply-To: <4BADEC53.1010803@colbyconsulting.com> References: <016501cacc92$73ad28e0$5b077aa0$@net> <4BAC307E.1070608@colbyconsulting.com> <4BADEC53.1010803@colbyconsulting.com> Message-ID: Hello John, On PowerDNN you can get a free 14 day trial, On DotNetNuke.com you can get a 2 day system to play with. Cheers, Mark On 27 March 2010 11:30, jwcolby wrote: > Thanks for that Mark. > > I will look at that. I already have a DNN system and I may be able to use > that as the preliminary > site to do the development. I know that you can build subdomains with DNN. > > I spnt many hours looking at all of this stuff for DNN but that was many > years ago. I still get > emails from Snowcovered telling me about new modules and stuff. > > John W. Colby > www.ColbyConsulting.com > > > Mark Breen wrote: > > Hello John, > > > > I urge you strongly to spend a little time to review DotNetNuke. > > > > You will be extremely surprised how easy it can be to work with it. Of > > course it is all asp.net and you can choose vb or C#, which ever you > prefer. > > All the work I do in it is C#. > > > > I have recently been working on a application with a large db and I have > > build about 30 forms all with less than 20 lines of code. I have to > state > > at the outset that I am also depending on Telerik radGrid. > > > > There are modules available to do the subscription based email stuff, and > > also all sorts of other things, such as face book and > > twitter integration etc, they all cost money, but the money tends to be > > > > > DNN will > > > > 1)let you work in the MS field > > 2) manage all the heavy lifting for a web app > > 3) all you to add on custom modules for pocket money > > 4) Allow you to build your own modules should you need them > > 5) allow you to use a shared hosting account for approx $200 - $300 per > > annum with a good hosting company (www.powerdnn.com) that specialise in > DNN > > hosting. > > 6) the hosting company will set up DNN for you > > > > If you like I can send you two files and you can see that with just these > > two files I have a working form that allows the user to perform CRUD > > functionality. > > > > You can also spend 30 minutes browsing www.snowcovered.com to see the > kinds > > of skins and modules that are available for free or for small money. > > > > Is that any help? > > > > thanks > > > > Mark > > > > > > > > On 26 March 2010 03:56, jwcolby wrote: > > > >> Randy, > >> > >> > I am all for writing/developing custom sites, but would you consider > >> using an off-the-shelf > >> (open-source) package like Joomla or umbraco? > >> > >> Well, let me lay out a couple of considerations: > >> > >> 1) This is eventually going to be heavy custom programming. > >> 2) One of my objectives is to provide myself (and you guys) an > opportunity > >> to learn ASP.Net > >> 3) I have until around the November time frame to get the basics up. > >> > >> My functionality objectives are: > >> > >> 1) Accumulate a list of PIP graduate contact info and get it into a > >> database. > >> 2) Allow PIP graduates the ability to edit their own data so that as > they > >> move around they can keep > >> their own data up to date. PIP graduates need to be able to email and > call > >> each other and not drop > >> off the planet because they move. > >> 3) Allow someone (management) the ability to blast emails out to focused > >> email lists. For example > >> all of the PIP graduates in a given state might need to send emails to > the > >> legislators for their > >> states based on the zip they reside in. > >> 4) Allow someone to blast out a similar set of emails to the entire list > of > >> PIP graduates about > >> legislation before congress. > >> 5) Allow opt-out > >> > >> 6) Eventually accumulate a similar email / contact list for a wider > >> audience of basically anyone > >> with a stake in the disability issue - persons with or caretakers of > >> persons with a disability. IOW > >> if legislation is before congress and I have a quarter million people > who > >> have signed up to receive > >> notices and send emails, the system would sent emails to all quarter > >> million people. The email > >> would have a link back to the web page server to a page where they could > >> compose and send an email > >> to their specific legislator. > >> > >> 7) Eventually allow some group of users to monitor legislation and > organize > >> the email blasts as > >> legislation comes up for a vote. > >> > >> I want to emulate the functionality of http://consumer-action.org/except > >> designed for a disability > >> group rather than a consumer group. > >> > >> So, I would certainly consider a canned package IF it was: > >> > >> 1) Windows based, because I am Windows based and I don't have access to > >> people with the expertise to > >> write this on a linux platform. > >> 2) .Net based, because I am .Net based and I don't have access to people > >> with the expertise to write > >> this in a non .net platform. > >> 3) Able to easily integrate the kinds of functionality I am discussing > >> above. > >> > >> This is not going to be a "public facing pretty web site" but rather a > >> workhorse web site which is > >> less about people visiting and more about executing jobs. Or at least > that > >> is my take on things at > >> this juncture. > >> > >> I understand "select the best tool for the job" but in the end this is > my > >> project (in that it is up > >> to me to make it succeed) and I need to select tools that I can use to > get > >> the job done, and which I > >> can find people familiar with those tools. > >> > >> So yes, I am not discounting any off-the-shelf solution if it meets the > >> workhorse needs. I > >> personally run DNN on my company web site (though it desperately needs > >> maintenance) and I absolutely > >> LOVE it for that kind of job. OTOH trying to hook into it is not for > the > >> faint of heart. > >> > >> If you are intimately familiar with one or more of these packages and > think > >> it fits the bill, please > >> come back with a discussion. > >> > >> John W. Colby > >> www.ColbyConsulting.com > >> > >> > >> Randy Sigmond wrote: > >>> John, > >>> > >>> > >>> > >>> I am all for writing/developing custom sites, but would you consider > >> using an off-the-shelf (open-source) package like > >>> Joomla or umbraco? > >>> > >>> > >>> > >>> It may be possible to get something up quickly using either of the > >> mentioned items above and then modify for specifics. > >>> > >>> > >>> Just a thought. > >>> > >>> > >>> > >>> Randy Sigmond > >>> > >>> Restech Online > >>> > >>> www.restechonline.com > >>> > >>> Ph: 248.568.0053 > >>> > >>> > >>> > >>> _______________________________________________ > >>> 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 > >> > >> > > _______________________________________________ > > 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 jwcolby at colbyconsulting.com Mon Mar 29 10:08:43 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 29 Mar 2010 11:08:43 -0400 Subject: [dba-SQLServer] index fragmentation and shrink Message-ID: <4BB0C27B.4010306@colbyconsulting.com> I have a table which is read-only. This table is about 40 GB but is in a database which is about 180 gb due to initial processing. I have a clustered index on the table on the PKID (int auto increment). I have been trying to figure out how to shrink the database without destroying the index (fragmentation). Given that I NEVER write to this table the normal "leave the empty space alone 'cause you will need it later anyway" just doesn't apply to me, and I need to recover the space. When I study how to do this, what I am reading is to create a new file group, set it as primary, and then basically recreate the table out there. So I created a new filegroup and set it as primary. Created an empty table out there (checked with sp_help). Created the clustered index on the new table Started the copy from the old table to the new. Since the original table was already sorted on the PKID (clustered index on the PKID) my take is that it will read the records from the original in sorted order, write them out to the new table in sorted order, building the clustered index on it as it does so. Will the new file in the new filegroup be as small as possible now? Will it still have significant "empty space" due to "processing" of the index? IOW am I going to succeed in getting at LEAST a file with only a small "empty space" overhead? -- John W. Colby www.ColbyConsulting.com