From dbdoug at gmail.com Mon Jun 6 09:41:02 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 6 Jun 2011 07:41:02 -0700 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: Is the SQL Server Service running in Windows? Open the SQL Server Configuration Manager and check the 'SQL Server Services' screen. Doug On Sun, May 15, 2011 at 8:10 AM, Arthur Fuller wrote: > Lately I've been rebuilding my main box. It's running Windows 7 Ultimate > 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go > perfectly, but when I try to run Management Studio I am unable to connect. I > get a message saying "a network or instance-specific error occurred while > establishing a connection to SQL Server. The server was not found or was not > accessible. Verify that the instance name is correct and that SQL Server is > configured to allow remove connections. (provider:Named Pipes Provider, > error: 40 - Could not open a connection to SQL Server, error: 2). > > This I can however open > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From df.waters at comcast.net Mon Jun 6 10:07:19 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 6 Jun 2011 10:07:19 -0500 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: <003001cc245b$6e77f180$4b67d480$@comcast.net> Hi Arthur, Management Studio is considered to be a Remote application, and remote applications can only connect using TCP/IP, not Named Pipes. TCP/IP is disabled by default for new installations of SQL Server. I sent a thorough description of how to make the change a few weeks ago - it's probably in the archives. Or a search will find the instructions as well. Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, May 15, 2011 10:11 AM To: Dejan Sunderic; Joe Michel Subject: [dba-SQLServer] Problems finding SQL Server Lately I've been rebuilding my main box. It's running Windows 7 Ultimate 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go perfectly, but when I try to run Management Studio I am unable to connect. I get a message saying "a network or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remove connections. (provider:Named Pipes Provider, error: 40 - Could not open a connection to SQL Server, error: 2). This I can however open _______________________________________________ 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 Jun 6 10:14:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 06 Jun 2011 11:14:28 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: <4DECEED4.1090909@colbyconsulting.com> Strange, I just received this email this am. You may need to go into surface configuration and tell it to allow tcp-ip (in addition to or instead of named pipes) as well as to allow remote connection. Google those two things. I think by default, allow remote connection is disabled. John W. Colby www.ColbyConsulting.com On 5/15/2011 11:10 AM, Arthur Fuller wrote: > Lately I've been rebuilding my main box. It's running Windows 7 Ultimate > 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go > perfectly, but when I try to run Management Studio I am unable to connect. I > get a message saying "a network or instance-specific error occurred while > establishing a connection to SQL Server. The server was not found or was not > accessible. Verify that the instance name is correct and that SQL Server is > configured to allow remove connections. (provider:Named Pipes Provider, > error: 40 - Could not open a connection to SQL Server, error: 2). > > This I can however open > _______________________________________________ > 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 Jun 6 10:17:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 06 Jun 2011 11:17:01 -0400 Subject: [dba-SQLServer] Views don't sort In-Reply-To: References: <4DD69E94.5000100@colbyconsulting.com> <4DD6D367.19607.1B6A2E6F@stuart.lexacorp.com.pg> <4DD73F76.29589.1D104F40@stuart.lexacorp.com.pg> <4DDA39F5.5070408@colbyconsulting.com> Message-ID: <4DECEF6D.4060801@colbyconsulting.com> I stayed away from ADPs because the rumor mill said they were being deprecated. Now I hear they are not. The Select top(Huge number) trick actually returned a sorted dataset so I kind of don't have the problem any more. John W. Colby www.ColbyConsulting.com On 5/24/2011 10:51 AM, Francisco Tapia wrote: > John, > Having worked between Access and Sql Server for a long time, I can tell > you that what you are trying to do is many times do-able when your Access > front end is an "Access Data Project" vs a normal Access Database. and the > "bound" methods that you normally use are still available. Though, you will > need to jump a whole new set of hoops just to make your bound forms work as > you wanted. Let's not mistake this as a "bound vs unbound" unholy war, but > I'm just saying. There may be a need for you to extend your framework to > handle this situations so that you can leverage your "bound" project. > > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > On Mon, May 23, 2011 at 3:41 AM, jwcolbywrote: > >> Mark, >> >> AFAICT pass through queries are not editable. I am trying to build three >> specific types of queries. >> >> 1) Editable (bound) form queries >> 2) Uneditable combo queries >> 3) Uneditable report queries. >> >> I am using Access 2K3 for dev and Access 2K7 (runtime) someday soon to be >> 2K10 (runtime) for general usage. >> >> It seems that the top(very large number) works for the moment for returning >> sorted recordsets. OTOH doing the pass-through trick for doing filtered >> uneditable queries would work great. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 5/23/2011 4:21 AM, Mark Breen wrote: >> >>> Hello All, >>> >>> I too have seen SQL Server / Access not return the sorted records. I am >>> intrigued by Francisco's suggestion to try the 99.99...... options, but I >>> am >>> in the habit now of never ordering within a view and always ordering when >>> i >>> select data from a view. >>> >>> In the cases where I can use an sproc, then I do not use a view at all, >>> just >>> include the select that would go in the view in the sproc instead. Then I >>> can safely sort in the sproc and no worries about the client end. >>> >>> John, may I tell you about a trick that I sometimes do, and please exclude >>> me if you are already doing this. I create a Past Through query in >>> Access, >>> which as you know, ignores jet and sends the query straight to the source >>> db >>> (SQL Server in this case). I then programatically change the 'SQL' of the >>> qdef based on what I want to do. Sometimes, I just call the pass-through >>> query qpstTemplate. The template bit being the connection string. >>> >>> Sometimes I have two, qpstTemplate_ReturnsRecords and >>> qpstTemplate_NoRecords. The 'returns no records' flag is set in the >>> second >>> one and I can use that for action sprocs. >>> >>> I then set the sql to be *usp_GetCustomers*, then later set it again to * >>> usp_GetOrdersByOrderDate* >>> >>> As a result, I often do not need to sort within Access. As you >>> instinctively know, asking Jet to do this work is not the right course. >>> Do >>> you want to let SQL server do the heavy lifting for you. >>> >>> Any help? >>> >>> thanks >>> >>> Mark >>> >>> >>> >>> On 21 May 2011 10:33, Asger Blond wrote: >>> >>> Thanks for the explanation, Stuart. Still I've never seen the result you >>>> indicate. The TOP 100 PERCENT is a special case where the query engine >>>> will >>>> ignore the ordering specified since you are actually requesting all rows. >>>> But if you force the engine to make a selection using TOP 99.999999999 >>>> PERCENT then it makes no sense to me why the engine should not return the >>>> rows in the order it's being forced to use for the selection. And >>>> certainly >>>> if you use TOP 5 it would be quite inefficient for the engine not to >>>> return >>>> the ordered rows. So: when the engine is forced to use a condition (TOP 5 >>>> or >>>> TOP 99.999999999) I've never seen a situation where the rows are not >>>> returned in the order specified by the query - whether this is embedded >>>> in a >>>> view or just run as a plain query. >>>> Asger >>>> >>>> -----Oprindelig meddelelse----- >>>> Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto: >>>> dba-sqlserver-bounces at databaseadvisors.com] P? vegne af Stuart McLachlan >>>> Sendt: 21. maj 2011 06:29 >>>> Til: Discussion concerning MS SQL Server >>>> Emne: Re: [dba-SQLServer] Views don't sort >>>> >>>> It means that if you specify "SELECT TOP 5 FROM ALPHABET ORDER BY >>>> LETTER", >>>> you >>>> will always get A,B,C,D and E, but they may not necessarily be in that >>>> order. They may be >>>> returned as "E,D,C,B,A", "D,B,A,E,C" etc. >>>> >>>> Although it has worked up til now, it is just like any other hack that >>>> uses >>>> "undocumented >>>> features". - after the next patch, hotfix or service pack, you may find >>>> that it no longer works >>>> that way - the same records could be returned in a completely different >>>> sort order, possibly by >>>> PK or by the order in which they are physically stored on disk. >>>> >>>> -- >>>> Stuart >>>> >>>> On 21 May 2011 at 0:09, Asger Blond wrote: >>>> >>>> Well, and this quote from BOL just doesn't make any sense to me. The >>>>> TOP and ORDER BY clause is used to "determine the rows returned", but >>>>> it "does not guarantee ordered results" - WTF does this mean? I use >>>>> the construct specified by Francisco, and have never seen problems. >>>>> Asger >>>>> >>>>> -----Oprindelig meddelelse----- >>>>> Fra: dba-sqlserver-bounces at databaseadvisors.com >>>>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af >>>>> Stuart McLachlan Sendt: 20. maj 2011 22:48 Til: Discussion concerning >>>>> MS SQL Server Emne: Re: [dba-SQLServer] Views don't sort >>>>> >>>>> Be careful with that. It is not guaranteed to work! >>>>> >>>>> See http://msdn.microsoft.com/en-us/library/ms188385.aspx >>>>> >>>>> The ORDER BY clause is not valid in views, inline functions, derived >>>>> tables, and subqueries, unless TOP is also specified. ... When ORDER >>>>> BY is used in the definition of a view, inline function, derived >>>>> table, or subquery, the clause is used only to determine the rows >>>>> returned by the TOP clause. The ORDER BY clause does not guarantee >>>>> ordered results when these constructs are queried, unless ORDER BY is >>>>> also specified in the query itself >>>>> >>>>> The only way to be sure is to use "Select * from vwMyView Order by >>>>> colMyCol" >>>>> >>>>> -- >>>>> Stuart >>>>> >>>>> On 20 May 2011 at 13:31, jwcolby wrote: >>>>> >>>>> Francisco, >>>>>> >>>>>> I apparently ignored your top 99.999% part. >>>>>> >>>>>> When I went back in to my view and selected top 1 million (very big) >>>>>> it did in fact return a sorted data set. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> John W. Colby >>>>>> www.ColbyConsulting.com >>>>>> >>>>>> On 5/20/2011 1:07 PM, Francisco Tapia wrote: >>>>>> >>>>>>> So something like: >>>>>>> >>>>>>> Create View vwSomeView AS >>>>>>> Select TOP 99.9999 percent Field1, Field2, Field3 >>>>>>> >>>>>>>> From tblSomeTable >>>>>>>> >>>>>>> Order by Field3 >>>>>>> >>>>>>> does not sort field3? what are your results when you just select >>>>>>> * from vwSomeView ? are the results sorted in your results >>>>>>> display in management studio? >>>>>>> >>>>>>> >>>>>>> -Francisco >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Fri, May 20, 2011 at 10:02 AM, >>>>>>> jwcolbywrote: >>>>>>> >>>>>>> One of the things I am trying to do is use SQL Server to speed up >>>>>>>> my applications. The theory is that I can hand off the heavy >>>>>>>> lifting to SQL Server and just get back result sets. Of course >>>>>>>> this works in terms of joins and filters in a view, but even >>>>>>>> though I specify a sort in a view, when the result set hits the >>>>>>>> other end (Access in my case) it is unsorted. >>>>>>>> >>>>>>>> Views have the ability to do sorts, so why is the data returned >>>>>>>> by a view into a third party app, or even into another view in >>>>>>>> SQL Server unsorted? >>>>>>>> Is there a way to tell sql server to return sorted data? >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 fuller.artful at gmail.com Wed Jun 8 07:28:38 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 8 Jun 2011 08:28:38 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: <4DECEED4.1090909@colbyconsulting.com> References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: Curious how this thread only surfaced yesterday, since I sent the original some time ago. Anyway, it's all solved. I un-installed SQL Server, and since there were entrails, physically deleted the directories, then re-installed it and everything went well. But thanks for your collective concern. A. On Mon, Jun 6, 2011 at 11:14 AM, jwcolby wrote: > Strange, I just received this email this am. > > You may need to go into surface configuration and tell it to allow tcp-ip > (in addition to or instead of named pipes) as well as to allow remote > connection. Google those two things. I think by default, allow remote > connection is disabled. > > From fhtapia at gmail.com Wed Jun 8 08:31:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 8 Jun 2011 06:31:51 -0700 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: I only got to the list approval screen the other day, sorry for the delay. most emails come through with out an issue, I think this one complained about length? -Francisco On Wed, Jun 8, 2011 at 5:28 AM, Arthur Fuller wrote: > Curious how this thread only surfaced yesterday, since I sent the original > some time ago. Anyway, it's all solved. I un-installed SQL Server, and > since > there were entrails, physically deleted the directories, then re-installed > it and everything went well. But thanks for your collective concern. > > A. > > On Mon, Jun 6, 2011 at 11:14 AM, jwcolby >wrote: > > > Strange, I just received this email this am. > > > > You may need to go into surface configuration and tell it to allow tcp-ip > > (in addition to or instead of named pipes) as well as to allow remote > > connection. Google those two things. I think by default, allow remote > > connection is disabled. > > > > > _______________________________________________ > 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 Wed Jun 8 09:06:41 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 8 Jun 2011 10:06:41 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: Quite possibly. I do have a lamentable tendency to needless obfuscation and complexities where mere superficiality and lucidity would suffice. :) On Wed, Jun 8, 2011 at 9:31 AM, Francisco Tapia wrote: > I only got to the list approval screen the other day, sorry for the delay. > most emails come through with out an issue, I think this one complained > about length? > > > From jwcolby at colbyconsulting.com Wed Jun 8 09:36:16 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 08 Jun 2011 10:36:16 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: <4DEF88E0.9050400@colbyconsulting.com> Lucidity would definitely be good! ;) John W. Colby www.ColbyConsulting.com On 6/8/2011 10:06 AM, Arthur Fuller wrote: > Quite possibly. I do have a lamentable tendency to needless obfuscation and > complexities where mere superficiality and lucidity would suffice. :) > > On Wed, Jun 8, 2011 at 9:31 AM, Francisco Tapia wrote: > >> I only got to the list approval screen the other day, sorry for the delay. >> most emails come through with out an issue, I think this one complained >> about length? >> >> >> > _______________________________________________ > 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 Jun 13 11:37:56 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 13 Jun 2011 12:37:56 -0400 Subject: [dba-SQLServer] Is there any way Message-ID: <4DF63CE4.1040305@colbyconsulting.com> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have databases in R2 which I am unable to make play nice with 2008. Is there any way to get an entire database migrated backwards from 2008R2 to 2008? -- John W. Colby www.ColbyConsulting.com From fhtapia at gmail.com Mon Jun 13 11:54:54 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Jun 2011 09:54:54 -0700 Subject: [dba-SQLServer] Is there any way In-Reply-To: <4DF63CE4.1040305@colbyconsulting.com> References: <4DF63CE4.1040305@colbyconsulting.com> Message-ID: database containers are generally non-backwards compatible (generally) I haven't tested between 2008 and 2008(R2) but if you need to move your database back you can use ssis to extract the data out of the 2008(R2) and import it to a 2008 database. -Francisco On Mon, Jun 13, 2011 at 9:37 AM, jwcolby wrote: > I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have > databases in R2 which I am unable to make play nice with 2008. Is there any > way to get an entire database migrated backwards from 2008R2 to 2008? > > -- > 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 Jun 13 12:22:57 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 13 Jun 2011 13:22:57 -0400 Subject: [dba-SQLServer] Is there any way In-Reply-To: References: <4DF63CE4.1040305@colbyconsulting.com> Message-ID: <4DF64771.2070009@colbyconsulting.com> You can indeed do that but it only moves the data, not the indexes, SPs and so forth. Or at least that is my limited understanding. John W. Colby www.ColbyConsulting.com On 6/13/2011 12:54 PM, Francisco Tapia wrote: > database containers are generally non-backwards compatible (generally) I > haven't tested between 2008 and 2008(R2) but if you need to move your > database back you can use ssis to extract the data out of the 2008(R2) and > import it to a 2008 database. > > > -Francisco > > > > > On Mon, Jun 13, 2011 at 9:37 AM, jwcolbywrote: > >> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have >> databases in R2 which I am unable to make play nice with 2008. Is there any >> way to get an entire database migrated backwards from 2008R2 to 2008? >> >> -- >> John W. Colby >> www.ColbyConsulting.com >> _______________________________________________ >> dba-SQLServer mailing list >> dba-SQLServer at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fhtapia at gmail.com Mon Jun 13 12:25:17 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Jun 2011 10:25:17 -0700 Subject: [dba-SQLServer] Is there any way In-Reply-To: <4DF64771.2070009@colbyconsulting.com> References: <4DF63CE4.1040305@colbyconsulting.com> <4DF64771.2070009@colbyconsulting.com> Message-ID: <7717264916096004840@unknownmsgid> You can run a trial version from redgate's SQL compare to grab all that info in a really simple manner, you get 14 days trial w/o limits. Better than spending the time to roll you own. Sent from my mobile On Jun 13, 2011, at 10:23 AM, jwcolby wrote: > You can indeed do that but it only moves the data, not the indexes, SPs and so forth. Or at least that is my limited understanding. > > John W. Colby > www.ColbyConsulting.com > > On 6/13/2011 12:54 PM, Francisco Tapia wrote: >> database containers are generally non-backwards compatible (generally) I >> haven't tested between 2008 and 2008(R2) but if you need to move your >> database back you can use ssis to extract the data out of the 2008(R2) and >> import it to a 2008 database. >> >> >> -Francisco >> >> >> >> >> On Mon, Jun 13, 2011 at 9:37 AM, jwcolbywrote: >> >>> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have >>> databases in R2 which I am unable to make play nice with 2008. Is there any >>> way to get an entire database migrated backwards from 2008R2 to 2008? >>> >>> -- >>> 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 marklbreen at gmail.com Tue Jun 14 08:47:16 2011 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 14 Jun 2011 14:47:16 +0100 Subject: [dba-SQLServer] Is there any way In-Reply-To: <7717264916096004840@unknownmsgid> References: <4DF63CE4.1040305@colbyconsulting.com> <4DF64771.2070009@colbyconsulting.com> <7717264916096004840@unknownmsgid> Message-ID: Hello John, I second Francisco's recommendation of Redgate. Using SQL Compare, and SQL Datacompare, you can (carefully) prepare scripts that will re-create the db and the data - not sure how it will work with gazillions of records, but I would not expect it to work well, but for thousands it should be ok, you can probably manage the big tables yourself. BTW, did you know that you can link servers in SSMS, and then you can do the following insert into [servername].[dbname].[dbo].[tablename] select .... from localtablename I cannot work without Redgate SQL Prompt BTW, I love it. Mark On 13 June 2011 18:25, Francisco Tapia wrote: > You can run a trial version from redgate's SQL compare to grab all > that info in a really simple manner, you get 14 days trial w/o limits. > > Better than spending the time to roll you own. > > Sent from my mobile > > On Jun 13, 2011, at 10:23 AM, jwcolby wrote: > > > You can indeed do that but it only moves the data, not the indexes, SPs > and so forth. Or at least that is my limited understanding. > > > > John W. Colby > > www.ColbyConsulting.com > > > > On 6/13/2011 12:54 PM, Francisco Tapia wrote: > >> database containers are generally non-backwards compatible (generally) I > >> haven't tested between 2008 and 2008(R2) but if you need to move your > >> database back you can use ssis to extract the data out of the 2008(R2) > and > >> import it to a 2008 database. > >> > >> > >> -Francisco > >> > >> > >> > >> > >> On Mon, Jun 13, 2011 at 9:37 AM, jwcolby >wrote: > >> > >>> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I > have > >>> databases in R2 which I am unable to make play nice with 2008. Is > there any > >>> way to get an entire database migrated backwards from 2008R2 to 2008? > >>> > >>> -- > >>> 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 Tue Jun 14 15:06:10 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 14 Jun 2011 16:06:10 -0400 Subject: [dba-SQLServer] ACard's ANS-9010 Serial ATA RAM disk - The Tech Report - Page 1 Message-ID: <4DF7BF32.1090405@colbyconsulting.com> It has finally arrived! -- John W. Colby www.ColbyConsulting.com http://techreport.com/articles.x/16255 From michael at ddisolutions.com.au Fri Jun 17 00:59:48 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 17 Jun 2011 15:59:48 +1000 Subject: [dba-SQLServer] Service Broker? Message-ID: <99266C61B516644D9727F983FAFAB4650864DD@remote.ddisolutions.com.au> Anyone been here? My scenario... 3rd party software sends and receives SMS msgs. 3rd party db with a Message table. I use the app API to send a text message. This ends up in a Message table. I want to monitor without polling the StatusID field for obvious reasons. I've looked at MSMQ, Service Broker and SQLDependency. AFAIKT only SQLDependency offers an event raised when the data is updated. Just to complicate things the field I'm interested in is updated, each row numerous times per second! 99.99% of the time the statement is Update StateID = 2 .... Where StateID = 2 .... I'm guessing rather than poll and makes updates they just update in a loop... Any suggestions welcome. Cheers Michael M From jwcolby at colbyconsulting.com Fri Jun 17 21:50:50 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 17 Jun 2011 22:50:50 -0400 Subject: [dba-SQLServer] Execute permission denied Message-ID: <4DFC128A.4010202@colbyconsulting.com> I am trying to figure out how to use stored procedures to return recordsets to Access. I created a stored procedure that accepts a parameter, the stored procedure pulls a recordset and if used like so: exec usp_MySP 1 returns a recordset to the query window in SQL Server. So, now how to get it to work in Access. I thought I was going to create a pass through query dynamically, save it and then "open" the query to get the recordset. The query is a passthrough query usp_InmatesForVolunteers 1 The ODBC connect string is: ODBC;DRIVER=SQL Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout; All of this (except for the database part) comes directly out of a DSN file which works to link tables and views into Access. Tested and working for that purpose. So the passthrough query fails. Error: [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was denied on the object 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) Interestingly if I remove the database part of the connection string it returns exactly the same error message, even mentioning that database. Thus the user itself being mapped to that database seems to be working as well. As I said, this all works for linking SQL Server tables and views, just not executing the sp. Any ideas? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Fri Jun 17 22:00:13 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 18 Jun 2011 13:00:13 +1000 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC128A.4010202@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> Message-ID: <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> Have you specifically set Execute permissions on the SP for MyUser? -- Stuart On 17 Jun 2011 at 22:50, jwcolby wrote: > I am trying to figure out how to use stored procedures to return > recordsets to Access. I created a stored procedure that accepts a > parameter, the stored procedure pulls a recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to > create a pass through query dynamically, save it and then "open" the > query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh > eckout; > > All of this (except for the database part) comes directly out of a DSN > file which works to link tables and views into Access. Tested and > working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission > was denied on the object 'usp_InmatesForVolunteers', database > 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string > it returns exactly the same error message, even mentioning that > database. Thus the user itself being mapped to that database seems to > be working as well. > > As I said, this all works for linking SQL Server tables and views, > just not executing the sp. > > Any ideas? > > -- > 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 fhtapia at gmail.com Sat Jun 18 12:31:02 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Sat, 18 Jun 2011 10:31:02 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> References: <4DFC128A.4010202@colbyconsulting.com> <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> Message-ID: <-6687977149752086378@unknownmsgid> I'd check that too, it seems that maybe your user has data reader access which gives full select rights to tables and views but not exec rights to sprocs. Inmate checkout eh? Maybe lock that connection down beyond data reader access too. I'm just saying. Sent from my mobile On Jun 17, 2011, at 8:01 PM, Stuart McLachlan wrote: > Have you specifically set Execute permissions on the SP for MyUser? > > -- > Stuart > > On 17 Jun 2011 at 22:50, jwcolby wrote: > >> I am trying to figure out how to use stored procedures to return >> recordsets to Access. I created a stored procedure that accepts a >> parameter, the stored procedure pulls a recordset and if used like so: >> >> exec usp_MySP 1 >> >> returns a recordset to the query window in SQL Server. >> >> So, now how to get it to work in Access. I thought I was going to >> create a pass through query dynamically, save it and then "open" the >> query to get the recordset. >> >> The query is a passthrough query >> >> usp_InmatesForVolunteers 1 >> >> The ODBC connect string is: >> >> ODBC;DRIVER=SQL >> Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh >> eckout; >> >> All of this (except for the database part) comes directly out of a DSN >> file which works to link tables and views into Access. Tested and >> working for that purpose. >> >> So the passthrough query fails. Error: >> >> [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission >> was denied on the object 'usp_InmatesForVolunteers', database >> 'InmateCheckout', schema 'dbo'. (#229) >> >> Interestingly if I remove the database part of the connection string >> it returns exactly the same error message, even mentioning that >> database. Thus the user itself being mapped to that database seems to >> be working as well. >> >> As I said, this all works for linking SQL Server tables and views, >> just not executing the sp. >> >> Any ideas? >> >> -- >> 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 jwcolby at colbyconsulting.com Sat Jun 18 16:06:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 17:06:13 -0400 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <-6687977149752086378@unknownmsgid> References: <4DFC128A.4010202@colbyconsulting.com> <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> <-6687977149752086378@unknownmsgid> Message-ID: <4DFD1345.5050200@colbyconsulting.com> That was it. I never used rights to objects such as views and SPs. The database if used by community volunteers (me) to fill out the paperwork to check minimum security prisoners out of prison to take to AA meetings, church and other such innocuous places. I am looking to expand the database beyond the camp in my area to allow CVs all over the state to use the database. It is an Access FE coming into a SQl Server database on my servers (a VM used for only that) over the internet. It is working quite well so far, but it is only myself and one other CV at this point. Now I am trying to figure out how to handle locations (places a prisoner is allowed to go) and AA meetings around the entire state and yet somehow group them by the camp they are close to. A CV has a card to check out prisoners for a specific camp, and can enter their own churches, AA meetings, restaurants etc where they will be taking the prisoners. Obviously I could just put a camp id in the location table but then a location close to two different camps would be in there twice (and have to be entered twice). Or i could have a camp location m-m for entering the campid and location id to "pair" the location to a camp. That would be more efficient but perhaps hard for the average user to fathom how to enter. Anyway, I am expecting the data to grow enormously as users come on around the state and I need to use SPs to pull only data for camps the CV visits, particularly things like combos of locations, meetings, inmates etc. Until yesterday I had never used a select SP from Access John W. Colby www.ColbyConsulting.com On 6/18/2011 1:31 PM, Francisco Tapia wrote: > I'd check that too, it seems that maybe your user has data reader > access which gives full select rights to tables and views but not exec > rights to sprocs. > > Inmate checkout eh? Maybe lock that connection down beyond data > reader access too. I'm just saying. > > Sent from my mobile > > On Jun 17, 2011, at 8:01 PM, Stuart McLachlan wrote: > >> Have you specifically set Execute permissions on the SP for MyUser? >> >> -- >> Stuart >> >> On 17 Jun 2011 at 22:50, jwcolby wrote: >> >>> I am trying to figure out how to use stored procedures to return >>> recordsets to Access. I created a stored procedure that accepts a >>> parameter, the stored procedure pulls a recordset and if used like so: >>> >>> exec usp_MySP 1 >>> >>> returns a recordset to the query window in SQL Server. >>> >>> So, now how to get it to work in Access. I thought I was going to >>> create a pass through query dynamically, save it and then "open" the >>> query to get the recordset. >>> >>> The query is a passthrough query >>> >>> usp_InmatesForVolunteers 1 >>> >>> The ODBC connect string is: >>> >>> ODBC;DRIVER=SQL >>> Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh >>> eckout; >>> >>> All of this (except for the database part) comes directly out of a DSN >>> file which works to link tables and views into Access. Tested and >>> working for that purpose. >>> >>> So the passthrough query fails. Error: >>> >>> [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission >>> was denied on the object 'usp_InmatesForVolunteers', database >>> 'InmateCheckout', schema 'dbo'. (#229) >>> >>> Interestingly if I remove the database part of the connection string >>> it returns exactly the same error message, even mentioning that >>> database. Thus the user itself being mapped to that database seems to >>> be working as well. >>> >>> As I said, this all works for linking SQL Server tables and views, >>> just not executing the sp. >>> >>> Any ideas? >>> >>> -- >>> 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 accessd at shaw.ca Sat Jun 18 18:38:44 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 18 Jun 2011 16:38:44 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC128A.4010202@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> Message-ID: <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> Hi John: It can not be too different from the standard method: /*Stored Procedure CREATE PROC dbo.RECompanyConfigurationGET @intCompanyCode int AS SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, CompanyConfig.InitialLetterLocation, CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation FROM CasinoCompany INNER JOIN CompanyConfig ON CasinoCompany.CompanyCode = CompanyConfig.CompanyCode WHERE CompanyConfig.CompanyCode = @intCompanyCode ORDER BY CasinoCompany.CompanyName; GO ------------------------------------------------ 'Calling code from Access Dim rs1 As ADODB.Recordset Dim objCmd As ADODB.Command Set rs1 = New ADODB.Recordset Set objCmd = New ADODB.Command With objCmd .ActiveConnection = gstrConnection 'Connection string .CommandText = "RECompanyConfigurationGET" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, adParamInput, , typCmpConf.CompanyCode) End With With rs1 .CursorLocation = adUseClient .Open objCmd, , adOpenStatic, adLockReadOnly If .BOF = False Or .EOF = False Then .MoveLast ... End if End With Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, June 17, 2011 7:51 PM To: Access Developers discussion and problem solving; Sqlserver-Dba Subject: [dba-SQLServer] Execute permission denied I am trying to figure out how to use stored procedures to return recordsets to Access. I created a stored procedure that accepts a parameter, the stored procedure pulls a recordset and if used like so: exec usp_MySP 1 returns a recordset to the query window in SQL Server. So, now how to get it to work in Access. I thought I was going to create a pass through query dynamically, save it and then "open" the query to get the recordset. The query is a passthrough query usp_InmatesForVolunteers 1 The ODBC connect string is: ODBC;DRIVER=SQL Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout ; All of this (except for the database part) comes directly out of a DSN file which works to link tables and views into Access. Tested and working for that purpose. So the passthrough query fails. Error: [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was denied on the object 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) Interestingly if I remove the database part of the connection string it returns exactly the same error message, even mentioning that database. Thus the user itself being mapped to that database seems to be working as well. As I said, this all works for linking SQL Server tables and views, just not executing the sp. Any ideas? -- 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 Sat Jun 18 18:50:51 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 19:50:51 -0400 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> References: <4DFC128A.4010202@colbyconsulting.com> <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> Message-ID: <4DFD39DB.2060702@colbyconsulting.com> Jim, In fact I had done all of that, though I made the SP directly in SQL Server. It turned out to be a permissions issue. There were no users specifically allowed to execute the sp. Once I did that it looks just like a query in Access. I will need to do things like rebuild the pass through queries when a new user logs in since each user has one or more specific camp (s)he visits. I do so using code similar to yours below. John W. Colby www.ColbyConsulting.com On 6/18/2011 7:38 PM, Jim Lawrence wrote: > Hi John: > > It can not be too different from the standard method: > > /*Stored Procedure > CREATE PROC dbo.RECompanyConfigurationGET > @intCompanyCode int > AS > SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, > CompanyConfig.InitialLetterLocation, > CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation > FROM CasinoCompany INNER JOIN CompanyConfig ON > CasinoCompany.CompanyCode = CompanyConfig.CompanyCode > WHERE CompanyConfig.CompanyCode = @intCompanyCode > ORDER BY CasinoCompany.CompanyName; > GO > > ------------------------------------------------ > > 'Calling code from Access > Dim rs1 As ADODB.Recordset > Dim objCmd As ADODB.Command > > Set rs1 = New ADODB.Recordset > Set objCmd = New ADODB.Command > > With objCmd > .ActiveConnection = gstrConnection 'Connection string > .CommandText = "RECompanyConfigurationGET" > .CommandType = adCmdStoredProc > .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, > adParamInput, , typCmpConf.CompanyCode) > End With > > With rs1 > .CursorLocation = adUseClient > .Open objCmd, , adOpenStatic, adLockReadOnly > If .BOF = False Or .EOF = False Then > .MoveLast > ... > End if > End With > > Jim > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, June 17, 2011 7:51 PM > To: Access Developers discussion and problem solving; Sqlserver-Dba > Subject: [dba-SQLServer] Execute permission denied > > I am trying to figure out how to use stored procedures to return recordsets > to Access. I created a > stored procedure that accepts a parameter, the stored procedure pulls a > recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to create a > pass through query > dynamically, save it and then "open" the query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout > ; > > All of this (except for the database part) comes directly out of a DSN file > which works to link > tables and views into Access. Tested and working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was > denied on the object > 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string it > returns exactly the same > error message, even mentioning that database. Thus the user itself being > mapped to that database > seems to be working as well. > > As I said, this all works for linking SQL Server tables and views, just not > executing the sp. > > Any ideas? > From jwcolby at colbyconsulting.com Sat Jun 18 19:24:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 20:24:21 -0400 Subject: [dba-SQLServer] Date format Message-ID: <4DFD41B5.8010703@colbyconsulting.com> I have a table where a field is a date type. For some reason the date is stored (or at least displayed) in YYYY-MM-DD format. In my Access FE I am trying to use the date picker from http://allenbrowne.com/ser-51.html All the other dates in the system work well with this control (form) but not this one specific date. The format string placed in the access control does not modify it to be the more (American) normal mm/dd/yyyy. Does anyone have any ideas why sql server would store / display it in this format? If I reformat it on the way out to my form, can I store it back in in the more "normal" format and have it store? -- John W. Colby www.ColbyConsulting.com From accessd at shaw.ca Sat Jun 18 19:32:20 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 18 Jun 2011 17:32:20 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFD39DB.2060702@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> <4DFD39DB.2060702@colbyconsulting.com> Message-ID: <4DDFFD088172462DA20015DE579ADAE1@creativesystemdesigns.com> John: Oh yes that pesky permission thing again. ;-) Everything is turned off on the new SQL Server 2008. ...and that is why every SP was prefixed with "dbo.", after importing from SQL 2000, when I was doing originally testing. I am glad you got it solved. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, June 18, 2011 4:51 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Execute permission denied Jim, In fact I had done all of that, though I made the SP directly in SQL Server. It turned out to be a permissions issue. There were no users specifically allowed to execute the sp. Once I did that it looks just like a query in Access. I will need to do things like rebuild the pass through queries when a new user logs in since each user has one or more specific camp (s)he visits. I do so using code similar to yours below. John W. Colby www.ColbyConsulting.com On 6/18/2011 7:38 PM, Jim Lawrence wrote: > Hi John: > > It can not be too different from the standard method: > > /*Stored Procedure > CREATE PROC dbo.RECompanyConfigurationGET > @intCompanyCode int > AS > SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, > CompanyConfig.InitialLetterLocation, > CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation > FROM CasinoCompany INNER JOIN CompanyConfig ON > CasinoCompany.CompanyCode = CompanyConfig.CompanyCode > WHERE CompanyConfig.CompanyCode = @intCompanyCode > ORDER BY CasinoCompany.CompanyName; > GO > > ------------------------------------------------ > > 'Calling code from Access > Dim rs1 As ADODB.Recordset > Dim objCmd As ADODB.Command > > Set rs1 = New ADODB.Recordset > Set objCmd = New ADODB.Command > > With objCmd > .ActiveConnection = gstrConnection 'Connection string > .CommandText = "RECompanyConfigurationGET" > .CommandType = adCmdStoredProc > .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, > adParamInput, , typCmpConf.CompanyCode) > End With > > With rs1 > .CursorLocation = adUseClient > .Open objCmd, , adOpenStatic, adLockReadOnly > If .BOF = False Or .EOF = False Then > .MoveLast > ... > End if > End With > > Jim > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, June 17, 2011 7:51 PM > To: Access Developers discussion and problem solving; Sqlserver-Dba > Subject: [dba-SQLServer] Execute permission denied > > I am trying to figure out how to use stored procedures to return recordsets > to Access. I created a > stored procedure that accepts a parameter, the stored procedure pulls a > recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to create a > pass through query > dynamically, save it and then "open" the query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout > ; > > All of this (except for the database part) comes directly out of a DSN file > which works to link > tables and views into Access. Tested and working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was > denied on the object > 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string it > returns exactly the same > error message, even mentioning that database. Thus the user itself being > mapped to that database > seems to be working as well. > > As I said, this all works for linking SQL Server tables and views, just not > executing the sp. > > Any ideas? > _______________________________________________ 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 Jun 18 20:18:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 21:18:26 -0400 Subject: [dba-SQLServer] How important is specifying exact fields Message-ID: <4DFD4E62.9020206@colbyconsulting.com> I am developing a strategy for selecting locations and AA meetings around a prison camp. My strategy is to have a table of cities "associated" with a camp through a m-m table. I also have camps "associated" with a volunteer through a m-m table. Once I do this I want to select meetings / locations specific to the logged in volunteer. This involves a rather long set of joined tables as you can imagine. Volunteer to VolunteerCamp to Camp to CampCity to City to Location for the first view, and from there to LocationMeeting. I basically created the view, then I created a SP with a SELECT * FROM MongoView WHERE MongoView.IDVol = @VolID. @VolID is passed in to the SP and is used to filter and return only the Locations (for the first SP) or the meetings (for the second SP) The results of the SP is then used in combos to select locations and meetings. My question then is, how important is it to minimize the fields pulled along the way. I really have to have the VolID from the first (leftmost) table and many of the fields from the last (right most table). The point of this whole thing is to narrow down from hundreds or thousands of locations and meetings only those relevant to the specific volunteer. It just occurred to me I could have done this differently and "associat" cities to each volunteer rather than to the camp. This would allow each volunteer to decide what cities (s)he cares about locations / meetings in. In any event, the view / SP pulls a very small hand full of locations so do I really care if it pulls a few fields I don't need in the end? It seems like I might be using the same query for several different SPs which require different sets of fields. IOW should I custom build a view and SP for for each place I need it, such as these combos? Or build a hand full of more general views used in more places. Also, if I do add more than the necessary fields in the View, can I narrow it down in the SP? IOW select the specific fields in the SP instead of Select * where every field is necessary. This is the first time I have started using views / SPs in SQL Server to drive Access and so I don't really trust my instincts. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jun 18 21:28:07 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 19 Jun 2011 12:28:07 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD41B5.8010703@colbyconsulting.com> References: <4DFD41B5.8010703@colbyconsulting.com> Message-ID: <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> That rings a bell, I discussed something similar recently on another forum, but I can't locate the details now. It was something about ODBC returning a string in that format rather than a DateTime under some circumstances. I will keep looking, but in the meantime, can use use CVDate() to force it to a real date. -- Stuart On 18 Jun 2011 at 20:24, jwcolby wrote: > I have a table where a field is a date type. For some reason the date > is stored (or at least displayed) in YYYY-MM-DD format. > > In my Access FE I am trying to use the date picker from > > http://allenbrowne.com/ser-51.html > > All the other dates in the system work well with this control (form) > but not this one specific date. > > The format string placed in the access control does not modify it to > be the more (American) normal mm/dd/yyyy. > > Does anyone have any ideas why sql server would store / display it in > this format? If I reformat it on the way out to my form, can I store > it back in in the more "normal" format and have it store? -- 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 stuart at lexacorp.com.pg Sat Jun 18 21:37:37 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 19 Jun 2011 12:37:37 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> References: <4DFD41B5.8010703@colbyconsulting.com>, <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> Message-ID: <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> Found it: http://msdn.microsoft.com/en-us/library/ms180878.aspx#ODBCDatetimeFormat Backward Compatibility for Down-level Clients Some down-level clients do not support the time, date, datetime2 and datetimeoffset data types added in SQL Server 2008. The following table shows the type mapping between an up-level instance of SQL Server 2008 and down-level clients. Looks like you are using one of SQL Server 2008's new date/time data types for that field and accessing it via ODBC. MS in their wisdom have decided to convert it and return a YY-MM-DD string instead of a numeric value of some type. Best bet is to change the field type in SQL Server to one of the older datetime or smalldatetime types. -- Stuart On 19 Jun 2011 at 12:28, Stuart McLachlan wrote: > That rings a bell, I discussed something similar recently on another > forum, but I can't locate the details now. It was something about > ODBC returning a string in that format rather than a DateTime under > some circumstances. > > I will keep looking, but in the meantime, can use use CVDate() to > force it to a real date. > > -- > Stuart > > On 18 Jun 2011 at 20:24, jwcolby wrote: > > > I have a table where a field is a date type. For some reason the > > date is stored (or at least displayed) in YYYY-MM-DD format. > > > > In my Access FE I am trying to use the date picker from > > > > http://allenbrowne.com/ser-51.html > > > > All the other dates in the system work well with this control (form) > > but not this one specific date. > > > > The format string placed in the access control does not modify it to > > be the more (American) normal mm/dd/yyyy. > > > > Does anyone have any ideas why sql server would store / display it > > in this format? If I reformat it on the way out to my form, can I > > store it back in in the more "normal" format and have it store? > > -- 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 jwcolby at colbyconsulting.com Sun Jun 19 07:03:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 19 Jun 2011 08:03:19 -0400 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> References: <4DFD41B5.8010703@colbyconsulting.com>, <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> Message-ID: <4DFDE587.4000204@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 6/18/2011 10:37 PM, Stuart McLachlan wrote: > Found it: > http://msdn.microsoft.com/en-us/library/ms180878.aspx#ODBCDatetimeFormat > > > Backward Compatibility for Down-level Clients > > Some down-level clients do not support the time, date, datetime2 and datetimeoffset data > types added in SQL Server 2008. The following table shows the type mapping between an > up-level instance of SQL Server 2008 and down-level clients. > > > Looks like you are using one of SQL Server 2008's new date/time data types for that field and > accessing it via ODBC. MS in their wisdom have decided to convert it and return a > YY-MM-DD string instead of a numeric value of some type. > > Best bet is to change the field type in SQL Server to one of the older datetime or > smalldatetime types. > From jwcolby at colbyconsulting.com Mon Jun 20 07:59:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 20 Jun 2011 08:59:46 -0400 Subject: [dba-SQLServer] [AccessD] How important is specifying exact fields In-Reply-To: References: <4DFD4E62.9020206@colbyconsulting.com> Message-ID: <4DFF4442.8040109@colbyconsulting.com> Asgar, The views I identified do in fact select specific fields from each table. My question really has to do with the SQl Server optimizer stuff. Let's assume I select 15 fields in a view. I then use that view in a stored procedure where I narrow down the select statement to a set of 5 fields that I need for a specific combo. Does SQL Server only actually pull the 5 queries into the view that it uses as the base for the selection in the SP? Or does it pull all 15 fields and then pass all 15 to the SP to select which fields it wants to use? IOW can I use a base view with 15 fields for 5 different SPs which need different subsets of fields. John W. Colby www.ColbyConsulting.com On 6/19/2011 6:23 PM, Asger Blond wrote: > First, just a warning against the use of SELECT * in SQL Server views and table valued functions. > In Access the fields for a SELECT * is resolved at run time for a stored query, which means that the query will always return the fields existing in the table at the moment the query is executed. > In SQL Server things are different: A SELECT * is resolved at run time only for stored procedures, for views and table valued functions the fields are resolved at design time. This means that a view or a function might give unexpected results or fail if you have dropped or added fields in the tables referenced in the view or table valued function. > To see the different behaviours try out this in SQL Server: > --- > CREATE TABLE T(C1 int) > INSERT INTO T VALUES(1) > GO > > CREATE VIEW vwT AS > SELECT * FROM T > GO > > SELECT * FROM vwT > GO > > CREATE PROCEDURE uspT AS > SELECT * FROM T > GO > > EXEC uspT > GO > > CREATE FUNCTION udfT1() RETURNS table AS > RETURN (SELECT * FROM T) > GO > SELECT * FROM udfT1() > GO > > CREATE FUNCTION udfT2() RETURNS @t table (C1 int) AS > BEGIN > INSERT INTO @t SELECT * FROM T > RETURN > END > GO > > SELECT * FROM udfT2() > GO > > ALTER TABLE T ADD C2 varchar(11) > GO > > UPDATE T SET C2='x' > GO > > SELECT * FROM T > GO > > SELECT * FROM vwT--> only the first field returned > GO > > EXEC uspT--> both fields returned > GO > > SELECT * FROM udfT1()--> only the first field returned > GO > > SELECT * FROM udfT2()--> fails > GO > > --- > > So comparing Access and SQL Server: a stored query in Access should be equated to a stored procedure in SQL Server, not to a view or a table valued function. > > Second, and for the main part of your question, it certainly will reduce overhead and bandwidth if the sp only returns the wanted fields. You can narrow down the wanted fields in the sp by using a parameter in the sp and then branch the select statement according to the supplied parameter. I.e. (air code): > > CREATE PROCEDURE sp @place int AS > IF @place = 1 > SELECT ...,...,... FROM ... > IF @place = 2 > SELECT ..., ... FROM ... > GO > > Asger > > > -----Oprindelig meddelelse----- > Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] P? vegne af jwcolby > Sendt: 19. juni 2011 03:18 > Til: Sqlserver-Dba; Access Developers discussion and problem solving > Emne: [AccessD] How important is specifying exact fields > > I am developing a strategy for selecting locations and AA meetings around a prison camp. My > strategy is to have a table of cities "associated" with a camp through a m-m table. I also have > camps "associated" with a volunteer through a m-m table. > > Once I do this I want to select meetings / locations specific to the logged in volunteer. This > involves a rather long set of joined tables as you can imagine. Volunteer to VolunteerCamp to Camp > to CampCity to City to Location for the first view, and from there to LocationMeeting. > > I basically created the view, then I created a SP with a SELECT * FROM MongoView WHERE > MongoView.IDVol = @VolID. @VolID is passed in to the SP and is used to filter and return only the > Locations (for the first SP) or the meetings (for the second SP) The results of the SP is then used > in combos to select locations and meetings. > > My question then is, how important is it to minimize the fields pulled along the way. I really have > to have the VolID from the first (leftmost) table and many of the fields from the last (right most > table). > > The point of this whole thing is to narrow down from hundreds or thousands of locations and meetings > only those relevant to the specific volunteer. > > It just occurred to me I could have done this differently and "associat" cities to each volunteer > rather than to the camp. This would allow each volunteer to decide what cities (s)he cares about > locations / meetings in. > > In any event, the view / SP pulls a very small hand full of locations so do I really care if it > pulls a few fields I don't need in the end? It seems like I might be using the same query for > several different SPs which require different sets of fields. > > IOW should I custom build a view and SP for for each place I need it, such as these combos? Or > build a hand full of more general views used in more places. > > Also, if I do add more than the necessary fields in the View, can I narrow it down in the SP? IOW > select the specific fields in the SP instead of Select * where every field is necessary. > > This is the first time I have started using views / SPs in SQL Server to drive Access and so I don't > really trust my instincts. > From rls at WeBeDb.com Mon Jun 20 08:24:40 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 20 Jun 2011 08:24:40 -0500 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: References: Message-ID: <185C37D1-34CA-41B0-957B-63635C84F17F@holly.arvixe.com> exec usp_InmatesForVolunteers 1 At 10:00 PM 6/17/2011, you wrote: >Date: Fri, 17 Jun 2011 22:50:50 -0400 >From: jwcolby >To: Access Developers discussion and problem solving > , Sqlserver-Dba > >Subject: [dba-SQLServer] Execute permission denied >Message-ID: <4DFC128A.4010202 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >I am trying to figure out how to use stored procedures to return >recordsets to Access. I created a >stored procedure that accepts a parameter, the stored procedure >pulls a recordset and if used like so: > >exec usp_MySP 1 > >returns a recordset to the query window in SQL Server. > >So, now how to get it to work in Access. I thought I was going to >create a pass through query >dynamically, save it and then "open" the query to get the recordset. > >The query is a passthrough query > >usp_InmatesForVolunteers 1 > >The ODBC connect string is: > >ODBC;DRIVER=SQL >Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout; > >All of this (except for the database part) comes directly out of a >DSN file which works to link >tables and views into Access. Tested and working for that purpose. > >So the passthrough query fails. Error: > >[Microsoft][ODBC Sql Server Driver][SQL Server]The execute >permission was denied on the object >'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > >Interestingly if I remove the database part of the connection string >it returns exactly the same >error message, even mentioning that database. Thus the user itself >being mapped to that database >seems to be working as well. > >As I said, this all works for linking SQL Server tables and views, >just not executing the sp. > >Any ideas? > >-- >John W. Colby >www.ColbyConsulting.com Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jun 20 08:28:18 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 20 Jun 2011 08:28:18 -0500 Subject: [dba-SQLServer] Date format In-Reply-To: References: Message-ID: Do not use Date type, use datetime type. Access does not handle the date type correctly. At 07:32 PM 6/18/2011, you wrote: >Date: Sat, 18 Jun 2011 20:24:21 -0400 >From: jwcolby >To: Sqlserver-Dba >Subject: [dba-SQLServer] Date format >Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >I have a table where a field is a date type. For some reason the >date is stored (or at least >displayed) in YYYY-MM-DD format. > >In my Access FE I am trying to use the date picker from > >http://allenbrowne.com/ser-51.html > >All the other dates in the system work well with this control (form) >but not this one specific date. > >The format string placed in the access control does not modify it to >be the more (American) normal >mm/dd/yyyy. > >Does anyone have any ideas why sql server would store / display it >in this format? If I reformat it >on the way out to my form, can I store it back in in the more >"normal" format and have it store? >-- >John W. Colby >www.ColbyConsulting.com Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Mon Jun 20 08:46:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 20 Jun 2011 09:46:20 -0400 Subject: [dba-SQLServer] Date format In-Reply-To: References: Message-ID: <4DFF4F2C.9000307@colbyconsulting.com> > Do not use Date type, use datetime type. Access does not handle the date type correctly. Ooohhhh. OK! Thanks. John W. Colby www.ColbyConsulting.com On 6/20/2011 9:28 AM, Robert Stewart wrote: > Do not use Date type, use datetime type. Access does not handle the date type correctly. > > > At 07:32 PM 6/18/2011, you wrote: >> Date: Sat, 18 Jun 2011 20:24:21 -0400 >> From: jwcolby >> To: Sqlserver-Dba >> Subject: [dba-SQLServer] Date format >> Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> I have a table where a field is a date type. For some reason the date is stored (or at least >> displayed) in YYYY-MM-DD format. >> >> In my Access FE I am trying to use the date picker from >> >> http://allenbrowne.com/ser-51.html >> >> All the other dates in the system work well with this control (form) but not this one specific date. >> >> The format string placed in the access control does not modify it to be the more (American) normal >> mm/dd/yyyy. >> >> Does anyone have any ideas why sql server would store / display it in this format? If I reformat it >> on the way out to my form, can I store it back in in the more "normal" format and have it store? >> -- >> John W. Colby >> www.ColbyConsulting.com > > Robert L. Stewart > www.WeBeDb.com > www.DBGUIDesign.com > www.RLStewartPhotography.com _______________________________________________ > 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 Mon Jun 20 16:22:32 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 21 Jun 2011 07:22:32 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: References: , , Message-ID: <4DFFBA18.30448.E51636E@stuart.lexacorp.com.pg> It's not Access that's the problem, it's the SQL Server ODBC driver. It doesn't know about the new Date/Time data types and MS decided in their wisdom to pass those datatypes as Strings rather than as numerics. You will get the same result with any programming environment which uses the same ODBC driver. -- Stuart On 20 Jun 2011 at 8:28, Robert Stewart wrote: > Do not use Date type, use datetime type. Access does not handle the > date type correctly. > > > At 07:32 PM 6/18/2011, you wrote: > >Date: Sat, 18 Jun 2011 20:24:21 -0400 > >From: jwcolby > >To: Sqlserver-Dba > >Subject: [dba-SQLServer] Date format > >Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> > >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > >I have a table where a field is a date type. For some reason the > >date is stored (or at least displayed) in YYYY-MM-DD format. > > > >In my Access FE I am trying to use the date picker from > > > >http://allenbrowne.com/ser-51.html > > > >All the other dates in the system work well with this control (form) > >but not this one specific date. > > > >The format string placed in the access control does not modify it to > >be the more (American) normal mm/dd/yyyy. > > > >Does anyone have any ideas why sql server would store / display it in > >this format? If I reformat it on the way out to my form, can I store > >it back in in the more "normal" format and have it store? -- John W. > >Colby www.ColbyConsulting.com > > Robert L. Stewart > www.WeBeDb.com > www.DBGUIDesign.com > www.RLStewartPhotography.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From newsgrps at dalyn.co.nz Tue Jun 21 15:33:56 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 08:33:56 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level Message-ID: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Team, I have an SQL 2005 database that has been attached to SQL2008. Everything runs fine. An IT audit company has made the following recommendation: "A review of the databases has highlighted that the database "StockData4" is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility level should be 100). It is recommended that an upgrade of the database StockData4 with the correct compatibility level be undertaken." From what I have read this just involves changing the databases compatibility level setting. Apart from being able to use features introduced in SQL2008, is there any other advantage to the change? Are there any disadvantages? Is there anything else that might be affected by the change that I should know now and fix? From newsgrps at dalyn.co.nz Tue Jun 21 15:43:13 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 08:43:13 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level (with name included) Message-ID: <20110621204525.HKHH4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Team, I have an SQL 2005 database that has been attached to SQL2008. Everything runs fine. An IT audit company has made the following recommendation: "A review of the databases has highlighted that the database "StockData4" is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility level should be 100). It is recommended that an upgrade of the database StockData4 with the correct compatibility level be undertaken." From what I have read this just involves changing the databases compatibility level setting. Apart from being able to use features introduced in SQL2008, is there any other advantage to the change? Are there any disadvantages? Is there anything else that might be affected by the change that I should know now and fix? Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From fhtapia at gmail.com Tue Jun 21 16:31:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 21 Jun 2011 14:31:51 -0700 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: yes, just changing the compatibility level will change what is needed for the database and allows you access to all the newer sql server 2008 features. the advantage is that you are more compatible with the current engine. As Microsoft moves forward you will have features supported in previous version of sql server deprecated or behave oddly, to help avoid odd behavior you'd normally update to the current compatibility level. Other than syntax and the newer sql 2008 features I don't know what else would be the pressing issue unless the company runs scripts specifically targeted at a specific database version. -Francisco http://bit.ly/sqlthis | Tsql and More... http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > Team, > > I have an SQL 2005 database that has been attached to SQL2008. Everything > runs fine. > > An IT audit company has made the following recommendation: > > "A review of the databases has highlighted that the database "StockData4" > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility > level should be 100). It is recommended that an upgrade of the database > StockData4 with the correct compatibility level be undertaken." > > From what I have read this just involves changing the databases > compatibility level setting. Apart from being able to use features > introduced in SQL2008, is there any other advantage to the change? Are > there any disadvantages? Is there anything else that might be affected by > the change that I should know now and fix? > > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From newsgrps at dalyn.co.nz Tue Jun 21 17:42:16 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 10:42:16 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: <20110621224430.QMAD4106.mta03.xtra.co.nz@David-PC.dalyn.co.nz> Thanks. At 22/06/2011, Francisco Tapia wrote: >yes, just changing the compatibility level will change what is needed for >the database and allows you access to all the newer sql server 2008 >features. the advantage is that you are more compatible with the current >engine. As Microsoft moves forward you will have features supported in >previous version of sql server deprecated or behave oddly, to help avoid odd >behavior you'd normally update to the current compatibility level. Other >than syntax and the newer sql 2008 features I don't know what else would be >the pressing issue unless the company runs scripts specifically targeted at >a specific database version. > > >-Francisco >http://bit.ly/sqlthis | Tsql and More... >http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > >On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > Team, > > > > I have an SQL 2005 database that has been attached to SQL2008. Everything > > runs fine. > > > > An IT audit company has made the following recommendation: > > > > "A review of the databases has highlighted that the database "StockData4" > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility > > level should be 100). It is recommended that an upgrade of the database > > StockData4 with the correct compatibility level be undertaken." > > > > From what I have read this just involves changing the databases > > compatibility level setting. Apart from being able to use features > > introduced in SQL2008, is there any other advantage to the change? Are > > there any disadvantages? Is there anything else that might be affected by > > the change that I should know now and fix? > > > > > > ______________________________**_________________ > > dba-SQLServer mailing list > > dba-SQLServer@**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 Wed Jun 22 02:58:11 2011 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 22 Jun 2011 08:58:11 +0100 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: Hello David and Francisco, About 6 months ago, I was asked to connect to a SQL Server database on a live working box. I was able to detach and attach the db on another server, but I wanted to connect while it was on the existing server. I did not know the password for the SQL instance. At the time, I spent 20 - 30 minutes reading about cracking the password on SQL server and there were a lot of interesting articles on that topic - in fact it was not important to crack the database, but the reason I spent the 20 - 30 mins was because the reading was interesting. It seemed to me that it is easy enough to crack a password in SQL 2005 - but it also seems that MS changed that for SQL 2008. Perhaps this is one reason that the IT audit company raised it. In David's case, there the server is already 2008, and only the single db compatability level is 2005, I would love to hear why the audit company wants it upgraded? I bet they have no idea why, and when they are informed that the server is already at 2008 - and so the enhanced security is already in place - they probably have no real idea why they are hassling you. There must be a special word for this situation - people that portray importantance with no substance, or at least with less substance than they present. What I hate is that they introduce enough FUD to cause us to change our compatabiltiy levels from SQL 90 to SQL 100. Mark On 21 June 2011 22:31, Francisco Tapia wrote: > yes, just changing the compatibility level will change what is needed for > the database and allows you access to all the newer sql server 2008 > features. the advantage is that you are more compatible with the current > engine. As Microsoft moves forward you will have features supported in > previous version of sql server deprecated or behave oddly, to help avoid > odd > behavior you'd normally update to the current compatibility level. Other > than syntax and the newer sql 2008 features I don't know what else would be > the pressing issue unless the company runs scripts specifically targeted at > a specific database version. > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > Team, > > > > I have an SQL 2005 database that has been attached to SQL2008. > Everything > > runs fine. > > > > An IT audit company has made the following recommendation: > > > > "A review of the databases has highlighted that the database "StockData4" > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 > compatibility > > level should be 100). It is recommended that an upgrade of the database > > StockData4 with the correct compatibility level be undertaken." > > > > From what I have read this just involves changing the databases > > compatibility level setting. Apart from being able to use features > > introduced in SQL2008, is there any other advantage to the change? Are > > there any disadvantages? Is there anything else that might be affected > by > > the change that I should know now and fix? > > > > > > ______________________________**_________________ > > dba-SQLServer mailing list > > dba-SQLServer@**databaseadvisors.com > > > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver< > 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 newsgrps at dalyn.co.nz Wed Jun 22 03:20:05 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 20:20:05 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: <20110622082217.JQAY26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> I have suggested that the company quiz the Audit firm for their reasons. Will let you know if we get a reply. David At 22/06/2011, Mark Breen wrote: >Hello David and Francisco, > >About 6 months ago, I was asked to connect to a SQL Server database on a >live working box. > >I was able to detach and attach the db on another server, but I wanted to >connect while it was on the existing server. > >I did not know the password for the SQL instance. > >At the time, I spent 20 - 30 minutes reading about cracking the password on >SQL server and there were a lot of interesting articles on that topic - in >fact it was not important to crack the database, but the reason I spent the >20 - 30 mins was because the reading was interesting. > >It seemed to me that it is easy enough to crack a password in SQL 2005 - but >it also seems that MS changed that for SQL 2008. Perhaps this is one reason >that the IT audit company raised it. > >In David's case, there the server is already 2008, and only the single db >compatability level is 2005, I would love to hear why the audit company >wants it upgraded? I bet they have no idea why, and when they are informed >that the server is already at 2008 - and so the enhanced security is already >in place - they probably have no real idea why they are hassling you. > >There must be a special word for this situation - people that portray >importantance with no substance, or at least with less substance than they >present. What I hate is that they introduce enough FUD to cause us to >change our compatabiltiy levels from SQL 90 to SQL 100. > >Mark > > > > > > > > >On 21 June 2011 22:31, Francisco Tapia wrote: > > > yes, just changing the compatibility level will change what is needed for > > the database and allows you access to all the newer sql server 2008 > > features. the advantage is that you are more compatible with the current > > engine. As Microsoft moves forward you will have features supported in > > previous version of sql server deprecated or behave oddly, to help avoid > > odd > > behavior you'd normally update to the current compatibility level. Other > > than syntax and the newer sql 2008 features I don't know what else would be > > the pressing issue unless the company runs scripts specifically targeted at > > a specific database version. > > > > > > -Francisco > > http://bit.ly/sqlthis | Tsql and More... > > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > > > > > > On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > > > Team, > > > > > > I have an SQL 2005 database that has been attached to SQL2008. > > Everything > > > runs fine. > > > > > > An IT audit company has made the following recommendation: > > > > > > "A review of the databases has highlighted that the database "StockData4" > > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 > > compatibility > > > level should be 100). It is recommended that an upgrade of the database > > > StockData4 with the correct compatibility level be undertaken." > > > > > > From what I have read this just involves changing the databases > > > compatibility level setting. Apart from being able to use features > > > introduced in SQL2008, is there any other advantage to the change? Are > > > there any disadvantages? Is there anything else that might be affected > > by > > > the change that I should know now and fix? > > > > > > > > > ______________________________**_________________ > > > dba-SQLServer mailing list > > > dba-SQLServer@**databaseadvisors.com > > > > > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver< > > 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 dmart06 at gmail.com Fri Jun 24 10:39:49 2011 From: dmart06 at gmail.com (Donna Martin) Date: Fri, 24 Jun 2011 11:39:49 -0400 Subject: [dba-SQLServer] SQL Server 2008 Installation Message-ID: Good morning, I am about to install SQL Server 2008 onto my new laptop that has Windows 7 Pro and is 64 bit. When I looked at the version of Visual Studio, I have 2005 installed. Also, my .net framework is v4.0. Please advise if I should uninstall both of these BEFORE beginning the installation of SQL Server 2008. Any and all pointers, tips, warnings, 'don't even think of doing...' items will be gratefully accepted! One quick note: I will be accessing this using ColdFusion, just in case that matters! Thanks in advance! Donna From dmart06 at emory.edu Fri Jun 24 11:43:07 2011 From: dmart06 at emory.edu (Martin, Donna M) Date: Fri, 24 Jun 2011 16:43:07 +0000 Subject: [dba-SQLServer] FW: SQL Server 2008 Installation In-Reply-To: References: Message-ID: Oops...Left out the fact that this is just the Developer's version...my bad. D ________________________________________ From: dba-sqlserver-bounces at databaseadvisors.com [dba-sqlserver-bounces at databaseadvisors.com] on behalf of Donna Martin [dmart06 at gmail.com] Sent: Friday, June 24, 2011 11:39 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Server 2008 Installation Good morning, I am about to install SQL Server 2008 onto my new laptop that has Windows 7 Pro and is 64 bit. When I looked at the version of Visual Studio, I have 2005 installed. Also, my .net framework is v4.0. Please advise if I should uninstall both of these BEFORE beginning the installation of SQL Server 2008. Any and all pointers, tips, warnings, 'don't even think of doing...' items will be gratefully accepted! One quick note: I will be accessing this using ColdFusion, just in case that matters! Thanks in advance! Donna _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). From fuller.artful at gmail.com Sat Jun 25 10:01:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 25 Jun 2011 11:01:16 -0400 Subject: [dba-SQLServer] No Office 12 Access Database Engine OLE DB Provider Message-ID: I've begun working my way into Learning SQL Server 2008 Reporting Services Step by Step, and I'm stumbling already. The first exercise is to use the Import/Export wizard to import the Northwind.mdb database from Access. A screenshot shows selecting the source database; the option selected is Microsoft Office 12.0 Access Database Engine OLE DB Provider -- which doesn't appear on my list of data sources. I found a link to it, however, so if you encounter this problem you can download both the 32- and 64-bit executables from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255 HTH someone. Arthur From gustav at cactus.dk Sat Jun 25 10:26:28 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 25 Jun 2011 17:26:28 +0200 Subject: [dba-SQLServer] No Office 12 Access Database Engine OLE DB Provider Message-ID: Hi Arthur You could study the report samples here: http://northwind.codeplex.com/documentation including the ported database. /gustav >>> fuller.artful at gmail.com 25-06-2011 17:01 >>> I've begun working my way into Learning SQL Server 2008 Reporting Services Step by Step, and I'm stumbling already. The first exercise is to use the Import/Export wizard to import the Northwind.mdb database from Access. A screenshot shows selecting the source database; the option selected is Microsoft Office 12.0 Access Database Engine OLE DB Provider -- which doesn't appear on my list of data sources. I found a link to it, however, so if you encounter this problem you can download both the 32- and 64-bit executables from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255 HTH someone. Arthur From rls at WeBeDb.com Mon Jun 27 08:08:21 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 27 Jun 2011 08:08:21 -0500 Subject: [dba-SQLServer] SQL Server 2008 Installation In-Reply-To: References: Message-ID: Donna, Unless you just have to have 2008, I would suggest 2008R2 instead. You will need the framework, so you do not need to change that. But, if you are using VS 2005, then you are not using framework 4.0. Sorry, but I do not remember the version for it, but I think it is 2. I would recommend using the Development version of SQL Server if you have it available and if this is for development purposes. Robert At 10:39 AM 6/24/2011, you wrote: >Date: Fri, 24 Jun 2011 11:39:49 -0400 >From: Donna Martin >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] SQL Server 2008 Installation >Message-ID: >Content-Type: text/plain; charset=ISO-8859-1 > >Good morning, > >I am about to install SQL Server 2008 onto my new laptop that has Windows 7 >Pro and is 64 bit. When I looked at the version of Visual Studio, I have >2005 installed. Also, my .net framework is v4.0. > >Please advise if I should uninstall both of these BEFORE beginning the >installation of SQL Server 2008. > >Any and all pointers, tips, warnings, 'don't even think of doing...' items >will be gratefully accepted! > >One quick note: I will be accessing this using ColdFusion, just in case >that matters! > >Thanks in advance! > >Donna Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From dbdoug at gmail.com Mon Jun 6 09:41:02 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 6 Jun 2011 07:41:02 -0700 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: Is the SQL Server Service running in Windows? Open the SQL Server Configuration Manager and check the 'SQL Server Services' screen. Doug On Sun, May 15, 2011 at 8:10 AM, Arthur Fuller wrote: > Lately I've been rebuilding my main box. It's running Windows 7 Ultimate > 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go > perfectly, but when I try to run Management Studio I am unable to connect. I > get a message saying "a network or instance-specific error occurred while > establishing a connection to SQL Server. The server was not found or was not > accessible. Verify that the instance name is correct and that SQL Server is > configured to allow remove connections. (provider:Named Pipes Provider, > error: 40 - Could not open a connection to SQL Server, error: 2). > > This I can however open > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From df.waters at comcast.net Mon Jun 6 10:07:19 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 6 Jun 2011 10:07:19 -0500 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: <003001cc245b$6e77f180$4b67d480$@comcast.net> Hi Arthur, Management Studio is considered to be a Remote application, and remote applications can only connect using TCP/IP, not Named Pipes. TCP/IP is disabled by default for new installations of SQL Server. I sent a thorough description of how to make the change a few weeks ago - it's probably in the archives. Or a search will find the instructions as well. Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, May 15, 2011 10:11 AM To: Dejan Sunderic; Joe Michel Subject: [dba-SQLServer] Problems finding SQL Server Lately I've been rebuilding my main box. It's running Windows 7 Ultimate 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go perfectly, but when I try to run Management Studio I am unable to connect. I get a message saying "a network or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remove connections. (provider:Named Pipes Provider, error: 40 - Could not open a connection to SQL Server, error: 2). This I can however open _______________________________________________ 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 Jun 6 10:14:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 06 Jun 2011 11:14:28 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: Message-ID: <4DECEED4.1090909@colbyconsulting.com> Strange, I just received this email this am. You may need to go into surface configuration and tell it to allow tcp-ip (in addition to or instead of named pipes) as well as to allow remote connection. Google those two things. I think by default, allow remote connection is disabled. John W. Colby www.ColbyConsulting.com On 5/15/2011 11:10 AM, Arthur Fuller wrote: > Lately I've been rebuilding my main box. It's running Windows 7 Ultimate > 64-bit, and SQL 2008 Enterprise 64-bit.The SQL installation seemed to go > perfectly, but when I try to run Management Studio I am unable to connect. I > get a message saying "a network or instance-specific error occurred while > establishing a connection to SQL Server. The server was not found or was not > accessible. Verify that the instance name is correct and that SQL Server is > configured to allow remove connections. (provider:Named Pipes Provider, > error: 40 - Could not open a connection to SQL Server, error: 2). > > This I can however open > _______________________________________________ > 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 Jun 6 10:17:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 06 Jun 2011 11:17:01 -0400 Subject: [dba-SQLServer] Views don't sort In-Reply-To: References: <4DD69E94.5000100@colbyconsulting.com> <4DD6D367.19607.1B6A2E6F@stuart.lexacorp.com.pg> <4DD73F76.29589.1D104F40@stuart.lexacorp.com.pg> <4DDA39F5.5070408@colbyconsulting.com> Message-ID: <4DECEF6D.4060801@colbyconsulting.com> I stayed away from ADPs because the rumor mill said they were being deprecated. Now I hear they are not. The Select top(Huge number) trick actually returned a sorted dataset so I kind of don't have the problem any more. John W. Colby www.ColbyConsulting.com On 5/24/2011 10:51 AM, Francisco Tapia wrote: > John, > Having worked between Access and Sql Server for a long time, I can tell > you that what you are trying to do is many times do-able when your Access > front end is an "Access Data Project" vs a normal Access Database. and the > "bound" methods that you normally use are still available. Though, you will > need to jump a whole new set of hoops just to make your bound forms work as > you wanted. Let's not mistake this as a "bound vs unbound" unholy war, but > I'm just saying. There may be a need for you to extend your framework to > handle this situations so that you can leverage your "bound" project. > > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > On Mon, May 23, 2011 at 3:41 AM, jwcolbywrote: > >> Mark, >> >> AFAICT pass through queries are not editable. I am trying to build three >> specific types of queries. >> >> 1) Editable (bound) form queries >> 2) Uneditable combo queries >> 3) Uneditable report queries. >> >> I am using Access 2K3 for dev and Access 2K7 (runtime) someday soon to be >> 2K10 (runtime) for general usage. >> >> It seems that the top(very large number) works for the moment for returning >> sorted recordsets. OTOH doing the pass-through trick for doing filtered >> uneditable queries would work great. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 5/23/2011 4:21 AM, Mark Breen wrote: >> >>> Hello All, >>> >>> I too have seen SQL Server / Access not return the sorted records. I am >>> intrigued by Francisco's suggestion to try the 99.99...... options, but I >>> am >>> in the habit now of never ordering within a view and always ordering when >>> i >>> select data from a view. >>> >>> In the cases where I can use an sproc, then I do not use a view at all, >>> just >>> include the select that would go in the view in the sproc instead. Then I >>> can safely sort in the sproc and no worries about the client end. >>> >>> John, may I tell you about a trick that I sometimes do, and please exclude >>> me if you are already doing this. I create a Past Through query in >>> Access, >>> which as you know, ignores jet and sends the query straight to the source >>> db >>> (SQL Server in this case). I then programatically change the 'SQL' of the >>> qdef based on what I want to do. Sometimes, I just call the pass-through >>> query qpstTemplate. The template bit being the connection string. >>> >>> Sometimes I have two, qpstTemplate_ReturnsRecords and >>> qpstTemplate_NoRecords. The 'returns no records' flag is set in the >>> second >>> one and I can use that for action sprocs. >>> >>> I then set the sql to be *usp_GetCustomers*, then later set it again to * >>> usp_GetOrdersByOrderDate* >>> >>> As a result, I often do not need to sort within Access. As you >>> instinctively know, asking Jet to do this work is not the right course. >>> Do >>> you want to let SQL server do the heavy lifting for you. >>> >>> Any help? >>> >>> thanks >>> >>> Mark >>> >>> >>> >>> On 21 May 2011 10:33, Asger Blond wrote: >>> >>> Thanks for the explanation, Stuart. Still I've never seen the result you >>>> indicate. The TOP 100 PERCENT is a special case where the query engine >>>> will >>>> ignore the ordering specified since you are actually requesting all rows. >>>> But if you force the engine to make a selection using TOP 99.999999999 >>>> PERCENT then it makes no sense to me why the engine should not return the >>>> rows in the order it's being forced to use for the selection. And >>>> certainly >>>> if you use TOP 5 it would be quite inefficient for the engine not to >>>> return >>>> the ordered rows. So: when the engine is forced to use a condition (TOP 5 >>>> or >>>> TOP 99.999999999) I've never seen a situation where the rows are not >>>> returned in the order specified by the query - whether this is embedded >>>> in a >>>> view or just run as a plain query. >>>> Asger >>>> >>>> -----Oprindelig meddelelse----- >>>> Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto: >>>> dba-sqlserver-bounces at databaseadvisors.com] P? vegne af Stuart McLachlan >>>> Sendt: 21. maj 2011 06:29 >>>> Til: Discussion concerning MS SQL Server >>>> Emne: Re: [dba-SQLServer] Views don't sort >>>> >>>> It means that if you specify "SELECT TOP 5 FROM ALPHABET ORDER BY >>>> LETTER", >>>> you >>>> will always get A,B,C,D and E, but they may not necessarily be in that >>>> order. They may be >>>> returned as "E,D,C,B,A", "D,B,A,E,C" etc. >>>> >>>> Although it has worked up til now, it is just like any other hack that >>>> uses >>>> "undocumented >>>> features". - after the next patch, hotfix or service pack, you may find >>>> that it no longer works >>>> that way - the same records could be returned in a completely different >>>> sort order, possibly by >>>> PK or by the order in which they are physically stored on disk. >>>> >>>> -- >>>> Stuart >>>> >>>> On 21 May 2011 at 0:09, Asger Blond wrote: >>>> >>>> Well, and this quote from BOL just doesn't make any sense to me. The >>>>> TOP and ORDER BY clause is used to "determine the rows returned", but >>>>> it "does not guarantee ordered results" - WTF does this mean? I use >>>>> the construct specified by Francisco, and have never seen problems. >>>>> Asger >>>>> >>>>> -----Oprindelig meddelelse----- >>>>> Fra: dba-sqlserver-bounces at databaseadvisors.com >>>>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af >>>>> Stuart McLachlan Sendt: 20. maj 2011 22:48 Til: Discussion concerning >>>>> MS SQL Server Emne: Re: [dba-SQLServer] Views don't sort >>>>> >>>>> Be careful with that. It is not guaranteed to work! >>>>> >>>>> See http://msdn.microsoft.com/en-us/library/ms188385.aspx >>>>> >>>>> The ORDER BY clause is not valid in views, inline functions, derived >>>>> tables, and subqueries, unless TOP is also specified. ... When ORDER >>>>> BY is used in the definition of a view, inline function, derived >>>>> table, or subquery, the clause is used only to determine the rows >>>>> returned by the TOP clause. The ORDER BY clause does not guarantee >>>>> ordered results when these constructs are queried, unless ORDER BY is >>>>> also specified in the query itself >>>>> >>>>> The only way to be sure is to use "Select * from vwMyView Order by >>>>> colMyCol" >>>>> >>>>> -- >>>>> Stuart >>>>> >>>>> On 20 May 2011 at 13:31, jwcolby wrote: >>>>> >>>>> Francisco, >>>>>> >>>>>> I apparently ignored your top 99.999% part. >>>>>> >>>>>> When I went back in to my view and selected top 1 million (very big) >>>>>> it did in fact return a sorted data set. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> John W. Colby >>>>>> www.ColbyConsulting.com >>>>>> >>>>>> On 5/20/2011 1:07 PM, Francisco Tapia wrote: >>>>>> >>>>>>> So something like: >>>>>>> >>>>>>> Create View vwSomeView AS >>>>>>> Select TOP 99.9999 percent Field1, Field2, Field3 >>>>>>> >>>>>>>> From tblSomeTable >>>>>>>> >>>>>>> Order by Field3 >>>>>>> >>>>>>> does not sort field3? what are your results when you just select >>>>>>> * from vwSomeView ? are the results sorted in your results >>>>>>> display in management studio? >>>>>>> >>>>>>> >>>>>>> -Francisco >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Fri, May 20, 2011 at 10:02 AM, >>>>>>> jwcolbywrote: >>>>>>> >>>>>>> One of the things I am trying to do is use SQL Server to speed up >>>>>>>> my applications. The theory is that I can hand off the heavy >>>>>>>> lifting to SQL Server and just get back result sets. Of course >>>>>>>> this works in terms of joins and filters in a view, but even >>>>>>>> though I specify a sort in a view, when the result set hits the >>>>>>>> other end (Access in my case) it is unsorted. >>>>>>>> >>>>>>>> Views have the ability to do sorts, so why is the data returned >>>>>>>> by a view into a third party app, or even into another view in >>>>>>>> SQL Server unsorted? >>>>>>>> Is there a way to tell sql server to return sorted data? >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 fuller.artful at gmail.com Wed Jun 8 07:28:38 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 8 Jun 2011 08:28:38 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: <4DECEED4.1090909@colbyconsulting.com> References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: Curious how this thread only surfaced yesterday, since I sent the original some time ago. Anyway, it's all solved. I un-installed SQL Server, and since there were entrails, physically deleted the directories, then re-installed it and everything went well. But thanks for your collective concern. A. On Mon, Jun 6, 2011 at 11:14 AM, jwcolby wrote: > Strange, I just received this email this am. > > You may need to go into surface configuration and tell it to allow tcp-ip > (in addition to or instead of named pipes) as well as to allow remote > connection. Google those two things. I think by default, allow remote > connection is disabled. > > From fhtapia at gmail.com Wed Jun 8 08:31:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 8 Jun 2011 06:31:51 -0700 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: I only got to the list approval screen the other day, sorry for the delay. most emails come through with out an issue, I think this one complained about length? -Francisco On Wed, Jun 8, 2011 at 5:28 AM, Arthur Fuller wrote: > Curious how this thread only surfaced yesterday, since I sent the original > some time ago. Anyway, it's all solved. I un-installed SQL Server, and > since > there were entrails, physically deleted the directories, then re-installed > it and everything went well. But thanks for your collective concern. > > A. > > On Mon, Jun 6, 2011 at 11:14 AM, jwcolby >wrote: > > > Strange, I just received this email this am. > > > > You may need to go into surface configuration and tell it to allow tcp-ip > > (in addition to or instead of named pipes) as well as to allow remote > > connection. Google those two things. I think by default, allow remote > > connection is disabled. > > > > > _______________________________________________ > 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 Wed Jun 8 09:06:41 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 8 Jun 2011 10:06:41 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: Quite possibly. I do have a lamentable tendency to needless obfuscation and complexities where mere superficiality and lucidity would suffice. :) On Wed, Jun 8, 2011 at 9:31 AM, Francisco Tapia wrote: > I only got to the list approval screen the other day, sorry for the delay. > most emails come through with out an issue, I think this one complained > about length? > > > From jwcolby at colbyconsulting.com Wed Jun 8 09:36:16 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 08 Jun 2011 10:36:16 -0400 Subject: [dba-SQLServer] Problems finding SQL Server In-Reply-To: References: <4DECEED4.1090909@colbyconsulting.com> Message-ID: <4DEF88E0.9050400@colbyconsulting.com> Lucidity would definitely be good! ;) John W. Colby www.ColbyConsulting.com On 6/8/2011 10:06 AM, Arthur Fuller wrote: > Quite possibly. I do have a lamentable tendency to needless obfuscation and > complexities where mere superficiality and lucidity would suffice. :) > > On Wed, Jun 8, 2011 at 9:31 AM, Francisco Tapia wrote: > >> I only got to the list approval screen the other day, sorry for the delay. >> most emails come through with out an issue, I think this one complained >> about length? >> >> >> > _______________________________________________ > 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 Jun 13 11:37:56 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 13 Jun 2011 12:37:56 -0400 Subject: [dba-SQLServer] Is there any way Message-ID: <4DF63CE4.1040305@colbyconsulting.com> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have databases in R2 which I am unable to make play nice with 2008. Is there any way to get an entire database migrated backwards from 2008R2 to 2008? -- John W. Colby www.ColbyConsulting.com From fhtapia at gmail.com Mon Jun 13 11:54:54 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Jun 2011 09:54:54 -0700 Subject: [dba-SQLServer] Is there any way In-Reply-To: <4DF63CE4.1040305@colbyconsulting.com> References: <4DF63CE4.1040305@colbyconsulting.com> Message-ID: database containers are generally non-backwards compatible (generally) I haven't tested between 2008 and 2008(R2) but if you need to move your database back you can use ssis to extract the data out of the 2008(R2) and import it to a 2008 database. -Francisco On Mon, Jun 13, 2011 at 9:37 AM, jwcolby wrote: > I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have > databases in R2 which I am unable to make play nice with 2008. Is there any > way to get an entire database migrated backwards from 2008R2 to 2008? > > -- > 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 Jun 13 12:22:57 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 13 Jun 2011 13:22:57 -0400 Subject: [dba-SQLServer] Is there any way In-Reply-To: References: <4DF63CE4.1040305@colbyconsulting.com> Message-ID: <4DF64771.2070009@colbyconsulting.com> You can indeed do that but it only moves the data, not the indexes, SPs and so forth. Or at least that is my limited understanding. John W. Colby www.ColbyConsulting.com On 6/13/2011 12:54 PM, Francisco Tapia wrote: > database containers are generally non-backwards compatible (generally) I > haven't tested between 2008 and 2008(R2) but if you need to move your > database back you can use ssis to extract the data out of the 2008(R2) and > import it to a 2008 database. > > > -Francisco > > > > > On Mon, Jun 13, 2011 at 9:37 AM, jwcolbywrote: > >> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have >> databases in R2 which I am unable to make play nice with 2008. Is there any >> way to get an entire database migrated backwards from 2008R2 to 2008? >> >> -- >> John W. Colby >> www.ColbyConsulting.com >> _______________________________________________ >> dba-SQLServer mailing list >> dba-SQLServer at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fhtapia at gmail.com Mon Jun 13 12:25:17 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Jun 2011 10:25:17 -0700 Subject: [dba-SQLServer] Is there any way In-Reply-To: <4DF64771.2070009@colbyconsulting.com> References: <4DF63CE4.1040305@colbyconsulting.com> <4DF64771.2070009@colbyconsulting.com> Message-ID: <7717264916096004840@unknownmsgid> You can run a trial version from redgate's SQL compare to grab all that info in a really simple manner, you get 14 days trial w/o limits. Better than spending the time to roll you own. Sent from my mobile On Jun 13, 2011, at 10:23 AM, jwcolby wrote: > You can indeed do that but it only moves the data, not the indexes, SPs and so forth. Or at least that is my limited understanding. > > John W. Colby > www.ColbyConsulting.com > > On 6/13/2011 12:54 PM, Francisco Tapia wrote: >> database containers are generally non-backwards compatible (generally) I >> haven't tested between 2008 and 2008(R2) but if you need to move your >> database back you can use ssis to extract the data out of the 2008(R2) and >> import it to a 2008 database. >> >> >> -Francisco >> >> >> >> >> On Mon, Jun 13, 2011 at 9:37 AM, jwcolbywrote: >> >>> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I have >>> databases in R2 which I am unable to make play nice with 2008. Is there any >>> way to get an entire database migrated backwards from 2008R2 to 2008? >>> >>> -- >>> 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 marklbreen at gmail.com Tue Jun 14 08:47:16 2011 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 14 Jun 2011 14:47:16 +0100 Subject: [dba-SQLServer] Is there any way In-Reply-To: <7717264916096004840@unknownmsgid> References: <4DF63CE4.1040305@colbyconsulting.com> <4DF64771.2070009@colbyconsulting.com> <7717264916096004840@unknownmsgid> Message-ID: Hello John, I second Francisco's recommendation of Redgate. Using SQL Compare, and SQL Datacompare, you can (carefully) prepare scripts that will re-create the db and the data - not sure how it will work with gazillions of records, but I would not expect it to work well, but for thousands it should be ok, you can probably manage the big tables yourself. BTW, did you know that you can link servers in SSMS, and then you can do the following insert into [servername].[dbname].[dbo].[tablename] select .... from localtablename I cannot work without Redgate SQL Prompt BTW, I love it. Mark On 13 June 2011 18:25, Francisco Tapia wrote: > You can run a trial version from redgate's SQL compare to grab all > that info in a really simple manner, you get 14 days trial w/o limits. > > Better than spending the time to roll you own. > > Sent from my mobile > > On Jun 13, 2011, at 10:23 AM, jwcolby wrote: > > > You can indeed do that but it only moves the data, not the indexes, SPs > and so forth. Or at least that is my limited understanding. > > > > John W. Colby > > www.ColbyConsulting.com > > > > On 6/13/2011 12:54 PM, Francisco Tapia wrote: > >> database containers are generally non-backwards compatible (generally) I > >> haven't tested between 2008 and 2008(R2) but if you need to move your > >> database back you can use ssis to extract the data out of the 2008(R2) > and > >> import it to a 2008 database. > >> > >> > >> -Francisco > >> > >> > >> > >> > >> On Mon, Jun 13, 2011 at 9:37 AM, jwcolby >wrote: > >> > >>> I own SQl Server 2008 developer (non-R2) and sql server 2008 R2. I > have > >>> databases in R2 which I am unable to make play nice with 2008. Is > there any > >>> way to get an entire database migrated backwards from 2008R2 to 2008? > >>> > >>> -- > >>> 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 Tue Jun 14 15:06:10 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 14 Jun 2011 16:06:10 -0400 Subject: [dba-SQLServer] ACard's ANS-9010 Serial ATA RAM disk - The Tech Report - Page 1 Message-ID: <4DF7BF32.1090405@colbyconsulting.com> It has finally arrived! -- John W. Colby www.ColbyConsulting.com http://techreport.com/articles.x/16255 From michael at ddisolutions.com.au Fri Jun 17 00:59:48 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 17 Jun 2011 15:59:48 +1000 Subject: [dba-SQLServer] Service Broker? Message-ID: <99266C61B516644D9727F983FAFAB4650864DD@remote.ddisolutions.com.au> Anyone been here? My scenario... 3rd party software sends and receives SMS msgs. 3rd party db with a Message table. I use the app API to send a text message. This ends up in a Message table. I want to monitor without polling the StatusID field for obvious reasons. I've looked at MSMQ, Service Broker and SQLDependency. AFAIKT only SQLDependency offers an event raised when the data is updated. Just to complicate things the field I'm interested in is updated, each row numerous times per second! 99.99% of the time the statement is Update StateID = 2 .... Where StateID = 2 .... I'm guessing rather than poll and makes updates they just update in a loop... Any suggestions welcome. Cheers Michael M From jwcolby at colbyconsulting.com Fri Jun 17 21:50:50 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 17 Jun 2011 22:50:50 -0400 Subject: [dba-SQLServer] Execute permission denied Message-ID: <4DFC128A.4010202@colbyconsulting.com> I am trying to figure out how to use stored procedures to return recordsets to Access. I created a stored procedure that accepts a parameter, the stored procedure pulls a recordset and if used like so: exec usp_MySP 1 returns a recordset to the query window in SQL Server. So, now how to get it to work in Access. I thought I was going to create a pass through query dynamically, save it and then "open" the query to get the recordset. The query is a passthrough query usp_InmatesForVolunteers 1 The ODBC connect string is: ODBC;DRIVER=SQL Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout; All of this (except for the database part) comes directly out of a DSN file which works to link tables and views into Access. Tested and working for that purpose. So the passthrough query fails. Error: [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was denied on the object 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) Interestingly if I remove the database part of the connection string it returns exactly the same error message, even mentioning that database. Thus the user itself being mapped to that database seems to be working as well. As I said, this all works for linking SQL Server tables and views, just not executing the sp. Any ideas? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Fri Jun 17 22:00:13 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 18 Jun 2011 13:00:13 +1000 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC128A.4010202@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> Message-ID: <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> Have you specifically set Execute permissions on the SP for MyUser? -- Stuart On 17 Jun 2011 at 22:50, jwcolby wrote: > I am trying to figure out how to use stored procedures to return > recordsets to Access. I created a stored procedure that accepts a > parameter, the stored procedure pulls a recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to > create a pass through query dynamically, save it and then "open" the > query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh > eckout; > > All of this (except for the database part) comes directly out of a DSN > file which works to link tables and views into Access. Tested and > working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission > was denied on the object 'usp_InmatesForVolunteers', database > 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string > it returns exactly the same error message, even mentioning that > database. Thus the user itself being mapped to that database seems to > be working as well. > > As I said, this all works for linking SQL Server tables and views, > just not executing the sp. > > Any ideas? > > -- > 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 fhtapia at gmail.com Sat Jun 18 12:31:02 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Sat, 18 Jun 2011 10:31:02 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> References: <4DFC128A.4010202@colbyconsulting.com> <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> Message-ID: <-6687977149752086378@unknownmsgid> I'd check that too, it seems that maybe your user has data reader access which gives full select rights to tables and views but not exec rights to sprocs. Inmate checkout eh? Maybe lock that connection down beyond data reader access too. I'm just saying. Sent from my mobile On Jun 17, 2011, at 8:01 PM, Stuart McLachlan wrote: > Have you specifically set Execute permissions on the SP for MyUser? > > -- > Stuart > > On 17 Jun 2011 at 22:50, jwcolby wrote: > >> I am trying to figure out how to use stored procedures to return >> recordsets to Access. I created a stored procedure that accepts a >> parameter, the stored procedure pulls a recordset and if used like so: >> >> exec usp_MySP 1 >> >> returns a recordset to the query window in SQL Server. >> >> So, now how to get it to work in Access. I thought I was going to >> create a pass through query dynamically, save it and then "open" the >> query to get the recordset. >> >> The query is a passthrough query >> >> usp_InmatesForVolunteers 1 >> >> The ODBC connect string is: >> >> ODBC;DRIVER=SQL >> Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh >> eckout; >> >> All of this (except for the database part) comes directly out of a DSN >> file which works to link tables and views into Access. Tested and >> working for that purpose. >> >> So the passthrough query fails. Error: >> >> [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission >> was denied on the object 'usp_InmatesForVolunteers', database >> 'InmateCheckout', schema 'dbo'. (#229) >> >> Interestingly if I remove the database part of the connection string >> it returns exactly the same error message, even mentioning that >> database. Thus the user itself being mapped to that database seems to >> be working as well. >> >> As I said, this all works for linking SQL Server tables and views, >> just not executing the sp. >> >> Any ideas? >> >> -- >> 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 jwcolby at colbyconsulting.com Sat Jun 18 16:06:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 17:06:13 -0400 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <-6687977149752086378@unknownmsgid> References: <4DFC128A.4010202@colbyconsulting.com> <4DFC14BD.16164.135CCF@stuart.lexacorp.com.pg> <-6687977149752086378@unknownmsgid> Message-ID: <4DFD1345.5050200@colbyconsulting.com> That was it. I never used rights to objects such as views and SPs. The database if used by community volunteers (me) to fill out the paperwork to check minimum security prisoners out of prison to take to AA meetings, church and other such innocuous places. I am looking to expand the database beyond the camp in my area to allow CVs all over the state to use the database. It is an Access FE coming into a SQl Server database on my servers (a VM used for only that) over the internet. It is working quite well so far, but it is only myself and one other CV at this point. Now I am trying to figure out how to handle locations (places a prisoner is allowed to go) and AA meetings around the entire state and yet somehow group them by the camp they are close to. A CV has a card to check out prisoners for a specific camp, and can enter their own churches, AA meetings, restaurants etc where they will be taking the prisoners. Obviously I could just put a camp id in the location table but then a location close to two different camps would be in there twice (and have to be entered twice). Or i could have a camp location m-m for entering the campid and location id to "pair" the location to a camp. That would be more efficient but perhaps hard for the average user to fathom how to enter. Anyway, I am expecting the data to grow enormously as users come on around the state and I need to use SPs to pull only data for camps the CV visits, particularly things like combos of locations, meetings, inmates etc. Until yesterday I had never used a select SP from Access John W. Colby www.ColbyConsulting.com On 6/18/2011 1:31 PM, Francisco Tapia wrote: > I'd check that too, it seems that maybe your user has data reader > access which gives full select rights to tables and views but not exec > rights to sprocs. > > Inmate checkout eh? Maybe lock that connection down beyond data > reader access too. I'm just saying. > > Sent from my mobile > > On Jun 17, 2011, at 8:01 PM, Stuart McLachlan wrote: > >> Have you specifically set Execute permissions on the SP for MyUser? >> >> -- >> Stuart >> >> On 17 Jun 2011 at 22:50, jwcolby wrote: >> >>> I am trying to figure out how to use stored procedures to return >>> recordsets to Access. I created a stored procedure that accepts a >>> parameter, the stored procedure pulls a recordset and if used like so: >>> >>> exec usp_MySP 1 >>> >>> returns a recordset to the query window in SQL Server. >>> >>> So, now how to get it to work in Access. I thought I was going to >>> create a pass through query dynamically, save it and then "open" the >>> query to get the recordset. >>> >>> The query is a passthrough query >>> >>> usp_InmatesForVolunteers 1 >>> >>> The ODBC connect string is: >>> >>> ODBC;DRIVER=SQL >>> Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCh >>> eckout; >>> >>> All of this (except for the database part) comes directly out of a DSN >>> file which works to link tables and views into Access. Tested and >>> working for that purpose. >>> >>> So the passthrough query fails. Error: >>> >>> [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission >>> was denied on the object 'usp_InmatesForVolunteers', database >>> 'InmateCheckout', schema 'dbo'. (#229) >>> >>> Interestingly if I remove the database part of the connection string >>> it returns exactly the same error message, even mentioning that >>> database. Thus the user itself being mapped to that database seems to >>> be working as well. >>> >>> As I said, this all works for linking SQL Server tables and views, >>> just not executing the sp. >>> >>> Any ideas? >>> >>> -- >>> 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 accessd at shaw.ca Sat Jun 18 18:38:44 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 18 Jun 2011 16:38:44 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFC128A.4010202@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> Message-ID: <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> Hi John: It can not be too different from the standard method: /*Stored Procedure CREATE PROC dbo.RECompanyConfigurationGET @intCompanyCode int AS SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, CompanyConfig.InitialLetterLocation, CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation FROM CasinoCompany INNER JOIN CompanyConfig ON CasinoCompany.CompanyCode = CompanyConfig.CompanyCode WHERE CompanyConfig.CompanyCode = @intCompanyCode ORDER BY CasinoCompany.CompanyName; GO ------------------------------------------------ 'Calling code from Access Dim rs1 As ADODB.Recordset Dim objCmd As ADODB.Command Set rs1 = New ADODB.Recordset Set objCmd = New ADODB.Command With objCmd .ActiveConnection = gstrConnection 'Connection string .CommandText = "RECompanyConfigurationGET" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, adParamInput, , typCmpConf.CompanyCode) End With With rs1 .CursorLocation = adUseClient .Open objCmd, , adOpenStatic, adLockReadOnly If .BOF = False Or .EOF = False Then .MoveLast ... End if End With Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, June 17, 2011 7:51 PM To: Access Developers discussion and problem solving; Sqlserver-Dba Subject: [dba-SQLServer] Execute permission denied I am trying to figure out how to use stored procedures to return recordsets to Access. I created a stored procedure that accepts a parameter, the stored procedure pulls a recordset and if used like so: exec usp_MySP 1 returns a recordset to the query window in SQL Server. So, now how to get it to work in Access. I thought I was going to create a pass through query dynamically, save it and then "open" the query to get the recordset. The query is a passthrough query usp_InmatesForVolunteers 1 The ODBC connect string is: ODBC;DRIVER=SQL Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout ; All of this (except for the database part) comes directly out of a DSN file which works to link tables and views into Access. Tested and working for that purpose. So the passthrough query fails. Error: [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was denied on the object 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) Interestingly if I remove the database part of the connection string it returns exactly the same error message, even mentioning that database. Thus the user itself being mapped to that database seems to be working as well. As I said, this all works for linking SQL Server tables and views, just not executing the sp. Any ideas? -- 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 Sat Jun 18 18:50:51 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 19:50:51 -0400 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> References: <4DFC128A.4010202@colbyconsulting.com> <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> Message-ID: <4DFD39DB.2060702@colbyconsulting.com> Jim, In fact I had done all of that, though I made the SP directly in SQL Server. It turned out to be a permissions issue. There were no users specifically allowed to execute the sp. Once I did that it looks just like a query in Access. I will need to do things like rebuild the pass through queries when a new user logs in since each user has one or more specific camp (s)he visits. I do so using code similar to yours below. John W. Colby www.ColbyConsulting.com On 6/18/2011 7:38 PM, Jim Lawrence wrote: > Hi John: > > It can not be too different from the standard method: > > /*Stored Procedure > CREATE PROC dbo.RECompanyConfigurationGET > @intCompanyCode int > AS > SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, > CompanyConfig.InitialLetterLocation, > CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation > FROM CasinoCompany INNER JOIN CompanyConfig ON > CasinoCompany.CompanyCode = CompanyConfig.CompanyCode > WHERE CompanyConfig.CompanyCode = @intCompanyCode > ORDER BY CasinoCompany.CompanyName; > GO > > ------------------------------------------------ > > 'Calling code from Access > Dim rs1 As ADODB.Recordset > Dim objCmd As ADODB.Command > > Set rs1 = New ADODB.Recordset > Set objCmd = New ADODB.Command > > With objCmd > .ActiveConnection = gstrConnection 'Connection string > .CommandText = "RECompanyConfigurationGET" > .CommandType = adCmdStoredProc > .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, > adParamInput, , typCmpConf.CompanyCode) > End With > > With rs1 > .CursorLocation = adUseClient > .Open objCmd, , adOpenStatic, adLockReadOnly > If .BOF = False Or .EOF = False Then > .MoveLast > ... > End if > End With > > Jim > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, June 17, 2011 7:51 PM > To: Access Developers discussion and problem solving; Sqlserver-Dba > Subject: [dba-SQLServer] Execute permission denied > > I am trying to figure out how to use stored procedures to return recordsets > to Access. I created a > stored procedure that accepts a parameter, the stored procedure pulls a > recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to create a > pass through query > dynamically, save it and then "open" the query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout > ; > > All of this (except for the database part) comes directly out of a DSN file > which works to link > tables and views into Access. Tested and working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was > denied on the object > 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string it > returns exactly the same > error message, even mentioning that database. Thus the user itself being > mapped to that database > seems to be working as well. > > As I said, this all works for linking SQL Server tables and views, just not > executing the sp. > > Any ideas? > From jwcolby at colbyconsulting.com Sat Jun 18 19:24:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 20:24:21 -0400 Subject: [dba-SQLServer] Date format Message-ID: <4DFD41B5.8010703@colbyconsulting.com> I have a table where a field is a date type. For some reason the date is stored (or at least displayed) in YYYY-MM-DD format. In my Access FE I am trying to use the date picker from http://allenbrowne.com/ser-51.html All the other dates in the system work well with this control (form) but not this one specific date. The format string placed in the access control does not modify it to be the more (American) normal mm/dd/yyyy. Does anyone have any ideas why sql server would store / display it in this format? If I reformat it on the way out to my form, can I store it back in in the more "normal" format and have it store? -- John W. Colby www.ColbyConsulting.com From accessd at shaw.ca Sat Jun 18 19:32:20 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 18 Jun 2011 17:32:20 -0700 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: <4DFD39DB.2060702@colbyconsulting.com> References: <4DFC128A.4010202@colbyconsulting.com> <75A4341A01E14FFDAAC43AE47426E948@creativesystemdesigns.com> <4DFD39DB.2060702@colbyconsulting.com> Message-ID: <4DDFFD088172462DA20015DE579ADAE1@creativesystemdesigns.com> John: Oh yes that pesky permission thing again. ;-) Everything is turned off on the new SQL Server 2008. ...and that is why every SP was prefixed with "dbo.", after importing from SQL 2000, when I was doing originally testing. I am glad you got it solved. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, June 18, 2011 4:51 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Execute permission denied Jim, In fact I had done all of that, though I made the SP directly in SQL Server. It turned out to be a permissions issue. There were no users specifically allowed to execute the sp. Once I did that it looks just like a query in Access. I will need to do things like rebuild the pass through queries when a new user logs in since each user has one or more specific camp (s)he visits. I do so using code similar to yours below. John W. Colby www.ColbyConsulting.com On 6/18/2011 7:38 PM, Jim Lawrence wrote: > Hi John: > > It can not be too different from the standard method: > > /*Stored Procedure > CREATE PROC dbo.RECompanyConfigurationGET > @intCompanyCode int > AS > SELECT DISTINCT CompanyConfig.CompanyCode, CasinoCompany.CompanyName, > CompanyConfig.InitialLetterLocation, > CompanyConfig.FollowupLetterLocation, CompanyConfig.ExpiryLetterLocation > FROM CasinoCompany INNER JOIN CompanyConfig ON > CasinoCompany.CompanyCode = CompanyConfig.CompanyCode > WHERE CompanyConfig.CompanyCode = @intCompanyCode > ORDER BY CasinoCompany.CompanyName; > GO > > ------------------------------------------------ > > 'Calling code from Access > Dim rs1 As ADODB.Recordset > Dim objCmd As ADODB.Command > > Set rs1 = New ADODB.Recordset > Set objCmd = New ADODB.Command > > With objCmd > .ActiveConnection = gstrConnection 'Connection string > .CommandText = "RECompanyConfigurationGET" > .CommandType = adCmdStoredProc > .Parameters.Append .CreateParameter("@intCompanyCode", adInteger, > adParamInput, , typCmpConf.CompanyCode) > End With > > With rs1 > .CursorLocation = adUseClient > .Open objCmd, , adOpenStatic, adLockReadOnly > If .BOF = False Or .EOF = False Then > .MoveLast > ... > End if > End With > > Jim > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, June 17, 2011 7:51 PM > To: Access Developers discussion and problem solving; Sqlserver-Dba > Subject: [dba-SQLServer] Execute permission denied > > I am trying to figure out how to use stored procedures to return recordsets > to Access. I created a > stored procedure that accepts a parameter, the stored procedure pulls a > recordset and if used like so: > > exec usp_MySP 1 > > returns a recordset to the query window in SQL Server. > > So, now how to get it to work in Access. I thought I was going to create a > pass through query > dynamically, save it and then "open" the query to get the recordset. > > The query is a passthrough query > > usp_InmatesForVolunteers 1 > > The ODBC connect string is: > > ODBC;DRIVER=SQL > Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout > ; > > All of this (except for the database part) comes directly out of a DSN file > which works to link > tables and views into Access. Tested and working for that purpose. > > So the passthrough query fails. Error: > > [Microsoft][ODBC Sql Server Driver][SQL Server]The execute permission was > denied on the object > 'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > > Interestingly if I remove the database part of the connection string it > returns exactly the same > error message, even mentioning that database. Thus the user itself being > mapped to that database > seems to be working as well. > > As I said, this all works for linking SQL Server tables and views, just not > executing the sp. > > Any ideas? > _______________________________________________ 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 Jun 18 20:18:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 18 Jun 2011 21:18:26 -0400 Subject: [dba-SQLServer] How important is specifying exact fields Message-ID: <4DFD4E62.9020206@colbyconsulting.com> I am developing a strategy for selecting locations and AA meetings around a prison camp. My strategy is to have a table of cities "associated" with a camp through a m-m table. I also have camps "associated" with a volunteer through a m-m table. Once I do this I want to select meetings / locations specific to the logged in volunteer. This involves a rather long set of joined tables as you can imagine. Volunteer to VolunteerCamp to Camp to CampCity to City to Location for the first view, and from there to LocationMeeting. I basically created the view, then I created a SP with a SELECT * FROM MongoView WHERE MongoView.IDVol = @VolID. @VolID is passed in to the SP and is used to filter and return only the Locations (for the first SP) or the meetings (for the second SP) The results of the SP is then used in combos to select locations and meetings. My question then is, how important is it to minimize the fields pulled along the way. I really have to have the VolID from the first (leftmost) table and many of the fields from the last (right most table). The point of this whole thing is to narrow down from hundreds or thousands of locations and meetings only those relevant to the specific volunteer. It just occurred to me I could have done this differently and "associat" cities to each volunteer rather than to the camp. This would allow each volunteer to decide what cities (s)he cares about locations / meetings in. In any event, the view / SP pulls a very small hand full of locations so do I really care if it pulls a few fields I don't need in the end? It seems like I might be using the same query for several different SPs which require different sets of fields. IOW should I custom build a view and SP for for each place I need it, such as these combos? Or build a hand full of more general views used in more places. Also, if I do add more than the necessary fields in the View, can I narrow it down in the SP? IOW select the specific fields in the SP instead of Select * where every field is necessary. This is the first time I have started using views / SPs in SQL Server to drive Access and so I don't really trust my instincts. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jun 18 21:28:07 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 19 Jun 2011 12:28:07 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD41B5.8010703@colbyconsulting.com> References: <4DFD41B5.8010703@colbyconsulting.com> Message-ID: <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> That rings a bell, I discussed something similar recently on another forum, but I can't locate the details now. It was something about ODBC returning a string in that format rather than a DateTime under some circumstances. I will keep looking, but in the meantime, can use use CVDate() to force it to a real date. -- Stuart On 18 Jun 2011 at 20:24, jwcolby wrote: > I have a table where a field is a date type. For some reason the date > is stored (or at least displayed) in YYYY-MM-DD format. > > In my Access FE I am trying to use the date picker from > > http://allenbrowne.com/ser-51.html > > All the other dates in the system work well with this control (form) > but not this one specific date. > > The format string placed in the access control does not modify it to > be the more (American) normal mm/dd/yyyy. > > Does anyone have any ideas why sql server would store / display it in > this format? If I reformat it on the way out to my form, can I store > it back in in the more "normal" format and have it store? -- 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 stuart at lexacorp.com.pg Sat Jun 18 21:37:37 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 19 Jun 2011 12:37:37 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> References: <4DFD41B5.8010703@colbyconsulting.com>, <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> Message-ID: <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> Found it: http://msdn.microsoft.com/en-us/library/ms180878.aspx#ODBCDatetimeFormat Backward Compatibility for Down-level Clients Some down-level clients do not support the time, date, datetime2 and datetimeoffset data types added in SQL Server 2008. The following table shows the type mapping between an up-level instance of SQL Server 2008 and down-level clients. Looks like you are using one of SQL Server 2008's new date/time data types for that field and accessing it via ODBC. MS in their wisdom have decided to convert it and return a YY-MM-DD string instead of a numeric value of some type. Best bet is to change the field type in SQL Server to one of the older datetime or smalldatetime types. -- Stuart On 19 Jun 2011 at 12:28, Stuart McLachlan wrote: > That rings a bell, I discussed something similar recently on another > forum, but I can't locate the details now. It was something about > ODBC returning a string in that format rather than a DateTime under > some circumstances. > > I will keep looking, but in the meantime, can use use CVDate() to > force it to a real date. > > -- > Stuart > > On 18 Jun 2011 at 20:24, jwcolby wrote: > > > I have a table where a field is a date type. For some reason the > > date is stored (or at least displayed) in YYYY-MM-DD format. > > > > In my Access FE I am trying to use the date picker from > > > > http://allenbrowne.com/ser-51.html > > > > All the other dates in the system work well with this control (form) > > but not this one specific date. > > > > The format string placed in the access control does not modify it to > > be the more (American) normal mm/dd/yyyy. > > > > Does anyone have any ideas why sql server would store / display it > > in this format? If I reformat it on the way out to my form, can I > > store it back in in the more "normal" format and have it store? > > -- 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 jwcolby at colbyconsulting.com Sun Jun 19 07:03:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 19 Jun 2011 08:03:19 -0400 Subject: [dba-SQLServer] Date format In-Reply-To: <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> References: <4DFD41B5.8010703@colbyconsulting.com>, <4DFD5EB7.18271.51C636E@stuart.lexacorp.com.pg> <4DFD60F1.32447.525184B@stuart.lexacorp.com.pg> Message-ID: <4DFDE587.4000204@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 6/18/2011 10:37 PM, Stuart McLachlan wrote: > Found it: > http://msdn.microsoft.com/en-us/library/ms180878.aspx#ODBCDatetimeFormat > > > Backward Compatibility for Down-level Clients > > Some down-level clients do not support the time, date, datetime2 and datetimeoffset data > types added in SQL Server 2008. The following table shows the type mapping between an > up-level instance of SQL Server 2008 and down-level clients. > > > Looks like you are using one of SQL Server 2008's new date/time data types for that field and > accessing it via ODBC. MS in their wisdom have decided to convert it and return a > YY-MM-DD string instead of a numeric value of some type. > > Best bet is to change the field type in SQL Server to one of the older datetime or > smalldatetime types. > From jwcolby at colbyconsulting.com Mon Jun 20 07:59:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 20 Jun 2011 08:59:46 -0400 Subject: [dba-SQLServer] [AccessD] How important is specifying exact fields In-Reply-To: References: <4DFD4E62.9020206@colbyconsulting.com> Message-ID: <4DFF4442.8040109@colbyconsulting.com> Asgar, The views I identified do in fact select specific fields from each table. My question really has to do with the SQl Server optimizer stuff. Let's assume I select 15 fields in a view. I then use that view in a stored procedure where I narrow down the select statement to a set of 5 fields that I need for a specific combo. Does SQL Server only actually pull the 5 queries into the view that it uses as the base for the selection in the SP? Or does it pull all 15 fields and then pass all 15 to the SP to select which fields it wants to use? IOW can I use a base view with 15 fields for 5 different SPs which need different subsets of fields. John W. Colby www.ColbyConsulting.com On 6/19/2011 6:23 PM, Asger Blond wrote: > First, just a warning against the use of SELECT * in SQL Server views and table valued functions. > In Access the fields for a SELECT * is resolved at run time for a stored query, which means that the query will always return the fields existing in the table at the moment the query is executed. > In SQL Server things are different: A SELECT * is resolved at run time only for stored procedures, for views and table valued functions the fields are resolved at design time. This means that a view or a function might give unexpected results or fail if you have dropped or added fields in the tables referenced in the view or table valued function. > To see the different behaviours try out this in SQL Server: > --- > CREATE TABLE T(C1 int) > INSERT INTO T VALUES(1) > GO > > CREATE VIEW vwT AS > SELECT * FROM T > GO > > SELECT * FROM vwT > GO > > CREATE PROCEDURE uspT AS > SELECT * FROM T > GO > > EXEC uspT > GO > > CREATE FUNCTION udfT1() RETURNS table AS > RETURN (SELECT * FROM T) > GO > SELECT * FROM udfT1() > GO > > CREATE FUNCTION udfT2() RETURNS @t table (C1 int) AS > BEGIN > INSERT INTO @t SELECT * FROM T > RETURN > END > GO > > SELECT * FROM udfT2() > GO > > ALTER TABLE T ADD C2 varchar(11) > GO > > UPDATE T SET C2='x' > GO > > SELECT * FROM T > GO > > SELECT * FROM vwT--> only the first field returned > GO > > EXEC uspT--> both fields returned > GO > > SELECT * FROM udfT1()--> only the first field returned > GO > > SELECT * FROM udfT2()--> fails > GO > > --- > > So comparing Access and SQL Server: a stored query in Access should be equated to a stored procedure in SQL Server, not to a view or a table valued function. > > Second, and for the main part of your question, it certainly will reduce overhead and bandwidth if the sp only returns the wanted fields. You can narrow down the wanted fields in the sp by using a parameter in the sp and then branch the select statement according to the supplied parameter. I.e. (air code): > > CREATE PROCEDURE sp @place int AS > IF @place = 1 > SELECT ...,...,... FROM ... > IF @place = 2 > SELECT ..., ... FROM ... > GO > > Asger > > > -----Oprindelig meddelelse----- > Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] P? vegne af jwcolby > Sendt: 19. juni 2011 03:18 > Til: Sqlserver-Dba; Access Developers discussion and problem solving > Emne: [AccessD] How important is specifying exact fields > > I am developing a strategy for selecting locations and AA meetings around a prison camp. My > strategy is to have a table of cities "associated" with a camp through a m-m table. I also have > camps "associated" with a volunteer through a m-m table. > > Once I do this I want to select meetings / locations specific to the logged in volunteer. This > involves a rather long set of joined tables as you can imagine. Volunteer to VolunteerCamp to Camp > to CampCity to City to Location for the first view, and from there to LocationMeeting. > > I basically created the view, then I created a SP with a SELECT * FROM MongoView WHERE > MongoView.IDVol = @VolID. @VolID is passed in to the SP and is used to filter and return only the > Locations (for the first SP) or the meetings (for the second SP) The results of the SP is then used > in combos to select locations and meetings. > > My question then is, how important is it to minimize the fields pulled along the way. I really have > to have the VolID from the first (leftmost) table and many of the fields from the last (right most > table). > > The point of this whole thing is to narrow down from hundreds or thousands of locations and meetings > only those relevant to the specific volunteer. > > It just occurred to me I could have done this differently and "associat" cities to each volunteer > rather than to the camp. This would allow each volunteer to decide what cities (s)he cares about > locations / meetings in. > > In any event, the view / SP pulls a very small hand full of locations so do I really care if it > pulls a few fields I don't need in the end? It seems like I might be using the same query for > several different SPs which require different sets of fields. > > IOW should I custom build a view and SP for for each place I need it, such as these combos? Or > build a hand full of more general views used in more places. > > Also, if I do add more than the necessary fields in the View, can I narrow it down in the SP? IOW > select the specific fields in the SP instead of Select * where every field is necessary. > > This is the first time I have started using views / SPs in SQL Server to drive Access and so I don't > really trust my instincts. > From rls at WeBeDb.com Mon Jun 20 08:24:40 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 20 Jun 2011 08:24:40 -0500 Subject: [dba-SQLServer] Execute permission denied In-Reply-To: References: Message-ID: <185C37D1-34CA-41B0-957B-63635C84F17F@holly.arvixe.com> exec usp_InmatesForVolunteers 1 At 10:00 PM 6/17/2011, you wrote: >Date: Fri, 17 Jun 2011 22:50:50 -0400 >From: jwcolby >To: Access Developers discussion and problem solving > , Sqlserver-Dba > >Subject: [dba-SQLServer] Execute permission denied >Message-ID: <4DFC128A.4010202 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >I am trying to figure out how to use stored procedures to return >recordsets to Access. I created a >stored procedure that accepts a parameter, the stored procedure >pulls a recordset and if used like so: > >exec usp_MySP 1 > >returns a recordset to the query window in SQL Server. > >So, now how to get it to work in Access. I thought I was going to >create a pass through query >dynamically, save it and then "open" the query to get the recordset. > >The query is a passthrough query > >usp_InmatesForVolunteers 1 > >The ODBC connect string is: > >ODBC;DRIVER=SQL >Server;UID=MyUser;PWD=MyPassword;SERVER=5.58.170.179;DATABASE=InmateCheckout; > >All of this (except for the database part) comes directly out of a >DSN file which works to link >tables and views into Access. Tested and working for that purpose. > >So the passthrough query fails. Error: > >[Microsoft][ODBC Sql Server Driver][SQL Server]The execute >permission was denied on the object >'usp_InmatesForVolunteers', database 'InmateCheckout', schema 'dbo'. (#229) > >Interestingly if I remove the database part of the connection string >it returns exactly the same >error message, even mentioning that database. Thus the user itself >being mapped to that database >seems to be working as well. > >As I said, this all works for linking SQL Server tables and views, >just not executing the sp. > >Any ideas? > >-- >John W. Colby >www.ColbyConsulting.com Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jun 20 08:28:18 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 20 Jun 2011 08:28:18 -0500 Subject: [dba-SQLServer] Date format In-Reply-To: References: Message-ID: Do not use Date type, use datetime type. Access does not handle the date type correctly. At 07:32 PM 6/18/2011, you wrote: >Date: Sat, 18 Jun 2011 20:24:21 -0400 >From: jwcolby >To: Sqlserver-Dba >Subject: [dba-SQLServer] Date format >Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >I have a table where a field is a date type. For some reason the >date is stored (or at least >displayed) in YYYY-MM-DD format. > >In my Access FE I am trying to use the date picker from > >http://allenbrowne.com/ser-51.html > >All the other dates in the system work well with this control (form) >but not this one specific date. > >The format string placed in the access control does not modify it to >be the more (American) normal >mm/dd/yyyy. > >Does anyone have any ideas why sql server would store / display it >in this format? If I reformat it >on the way out to my form, can I store it back in in the more >"normal" format and have it store? >-- >John W. Colby >www.ColbyConsulting.com Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Mon Jun 20 08:46:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 20 Jun 2011 09:46:20 -0400 Subject: [dba-SQLServer] Date format In-Reply-To: References: Message-ID: <4DFF4F2C.9000307@colbyconsulting.com> > Do not use Date type, use datetime type. Access does not handle the date type correctly. Ooohhhh. OK! Thanks. John W. Colby www.ColbyConsulting.com On 6/20/2011 9:28 AM, Robert Stewart wrote: > Do not use Date type, use datetime type. Access does not handle the date type correctly. > > > At 07:32 PM 6/18/2011, you wrote: >> Date: Sat, 18 Jun 2011 20:24:21 -0400 >> From: jwcolby >> To: Sqlserver-Dba >> Subject: [dba-SQLServer] Date format >> Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> I have a table where a field is a date type. For some reason the date is stored (or at least >> displayed) in YYYY-MM-DD format. >> >> In my Access FE I am trying to use the date picker from >> >> http://allenbrowne.com/ser-51.html >> >> All the other dates in the system work well with this control (form) but not this one specific date. >> >> The format string placed in the access control does not modify it to be the more (American) normal >> mm/dd/yyyy. >> >> Does anyone have any ideas why sql server would store / display it in this format? If I reformat it >> on the way out to my form, can I store it back in in the more "normal" format and have it store? >> -- >> John W. Colby >> www.ColbyConsulting.com > > Robert L. Stewart > www.WeBeDb.com > www.DBGUIDesign.com > www.RLStewartPhotography.com _______________________________________________ > 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 Mon Jun 20 16:22:32 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 21 Jun 2011 07:22:32 +1000 Subject: [dba-SQLServer] Date format In-Reply-To: References: , , Message-ID: <4DFFBA18.30448.E51636E@stuart.lexacorp.com.pg> It's not Access that's the problem, it's the SQL Server ODBC driver. It doesn't know about the new Date/Time data types and MS decided in their wisdom to pass those datatypes as Strings rather than as numerics. You will get the same result with any programming environment which uses the same ODBC driver. -- Stuart On 20 Jun 2011 at 8:28, Robert Stewart wrote: > Do not use Date type, use datetime type. Access does not handle the > date type correctly. > > > At 07:32 PM 6/18/2011, you wrote: > >Date: Sat, 18 Jun 2011 20:24:21 -0400 > >From: jwcolby > >To: Sqlserver-Dba > >Subject: [dba-SQLServer] Date format > >Message-ID: <4DFD41B5.8010703 at colbyconsulting.com> > >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > >I have a table where a field is a date type. For some reason the > >date is stored (or at least displayed) in YYYY-MM-DD format. > > > >In my Access FE I am trying to use the date picker from > > > >http://allenbrowne.com/ser-51.html > > > >All the other dates in the system work well with this control (form) > >but not this one specific date. > > > >The format string placed in the access control does not modify it to > >be the more (American) normal mm/dd/yyyy. > > > >Does anyone have any ideas why sql server would store / display it in > >this format? If I reformat it on the way out to my form, can I store > >it back in in the more "normal" format and have it store? -- John W. > >Colby www.ColbyConsulting.com > > Robert L. Stewart > www.WeBeDb.com > www.DBGUIDesign.com > www.RLStewartPhotography.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From newsgrps at dalyn.co.nz Tue Jun 21 15:33:56 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 08:33:56 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level Message-ID: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Team, I have an SQL 2005 database that has been attached to SQL2008. Everything runs fine. An IT audit company has made the following recommendation: "A review of the databases has highlighted that the database "StockData4" is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility level should be 100). It is recommended that an upgrade of the database StockData4 with the correct compatibility level be undertaken." From what I have read this just involves changing the databases compatibility level setting. Apart from being able to use features introduced in SQL2008, is there any other advantage to the change? Are there any disadvantages? Is there anything else that might be affected by the change that I should know now and fix? From newsgrps at dalyn.co.nz Tue Jun 21 15:43:13 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 08:43:13 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level (with name included) Message-ID: <20110621204525.HKHH4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Team, I have an SQL 2005 database that has been attached to SQL2008. Everything runs fine. An IT audit company has made the following recommendation: "A review of the databases has highlighted that the database "StockData4" is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility level should be 100). It is recommended that an upgrade of the database StockData4 with the correct compatibility level be undertaken." From what I have read this just involves changing the databases compatibility level setting. Apart from being able to use features introduced in SQL2008, is there any other advantage to the change? Are there any disadvantages? Is there anything else that might be affected by the change that I should know now and fix? Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From fhtapia at gmail.com Tue Jun 21 16:31:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 21 Jun 2011 14:31:51 -0700 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: yes, just changing the compatibility level will change what is needed for the database and allows you access to all the newer sql server 2008 features. the advantage is that you are more compatible with the current engine. As Microsoft moves forward you will have features supported in previous version of sql server deprecated or behave oddly, to help avoid odd behavior you'd normally update to the current compatibility level. Other than syntax and the newer sql 2008 features I don't know what else would be the pressing issue unless the company runs scripts specifically targeted at a specific database version. -Francisco http://bit.ly/sqlthis | Tsql and More... http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > Team, > > I have an SQL 2005 database that has been attached to SQL2008. Everything > runs fine. > > An IT audit company has made the following recommendation: > > "A review of the databases has highlighted that the database "StockData4" > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility > level should be 100). It is recommended that an upgrade of the database > StockData4 with the correct compatibility level be undertaken." > > From what I have read this just involves changing the databases > compatibility level setting. Apart from being able to use features > introduced in SQL2008, is there any other advantage to the change? Are > there any disadvantages? Is there anything else that might be affected by > the change that I should know now and fix? > > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From newsgrps at dalyn.co.nz Tue Jun 21 17:42:16 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 10:42:16 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: <20110621224430.QMAD4106.mta03.xtra.co.nz@David-PC.dalyn.co.nz> Thanks. At 22/06/2011, Francisco Tapia wrote: >yes, just changing the compatibility level will change what is needed for >the database and allows you access to all the newer sql server 2008 >features. the advantage is that you are more compatible with the current >engine. As Microsoft moves forward you will have features supported in >previous version of sql server deprecated or behave oddly, to help avoid odd >behavior you'd normally update to the current compatibility level. Other >than syntax and the newer sql 2008 features I don't know what else would be >the pressing issue unless the company runs scripts specifically targeted at >a specific database version. > > >-Francisco >http://bit.ly/sqlthis | Tsql and More... >http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > >On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > Team, > > > > I have an SQL 2005 database that has been attached to SQL2008. Everything > > runs fine. > > > > An IT audit company has made the following recommendation: > > > > "A review of the databases has highlighted that the database "StockData4" > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 compatibility > > level should be 100). It is recommended that an upgrade of the database > > StockData4 with the correct compatibility level be undertaken." > > > > From what I have read this just involves changing the databases > > compatibility level setting. Apart from being able to use features > > introduced in SQL2008, is there any other advantage to the change? Are > > there any disadvantages? Is there anything else that might be affected by > > the change that I should know now and fix? > > > > > > ______________________________**_________________ > > dba-SQLServer mailing list > > dba-SQLServer@**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 Wed Jun 22 02:58:11 2011 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 22 Jun 2011 08:58:11 +0100 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: Hello David and Francisco, About 6 months ago, I was asked to connect to a SQL Server database on a live working box. I was able to detach and attach the db on another server, but I wanted to connect while it was on the existing server. I did not know the password for the SQL instance. At the time, I spent 20 - 30 minutes reading about cracking the password on SQL server and there were a lot of interesting articles on that topic - in fact it was not important to crack the database, but the reason I spent the 20 - 30 mins was because the reading was interesting. It seemed to me that it is easy enough to crack a password in SQL 2005 - but it also seems that MS changed that for SQL 2008. Perhaps this is one reason that the IT audit company raised it. In David's case, there the server is already 2008, and only the single db compatability level is 2005, I would love to hear why the audit company wants it upgraded? I bet they have no idea why, and when they are informed that the server is already at 2008 - and so the enhanced security is already in place - they probably have no real idea why they are hassling you. There must be a special word for this situation - people that portray importantance with no substance, or at least with less substance than they present. What I hate is that they introduce enough FUD to cause us to change our compatabiltiy levels from SQL 90 to SQL 100. Mark On 21 June 2011 22:31, Francisco Tapia wrote: > yes, just changing the compatibility level will change what is needed for > the database and allows you access to all the newer sql server 2008 > features. the advantage is that you are more compatible with the current > engine. As Microsoft moves forward you will have features supported in > previous version of sql server deprecated or behave oddly, to help avoid > odd > behavior you'd normally update to the current compatibility level. Other > than syntax and the newer sql 2008 features I don't know what else would be > the pressing issue unless the company runs scripts specifically targeted at > a specific database version. > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > Team, > > > > I have an SQL 2005 database that has been attached to SQL2008. > Everything > > runs fine. > > > > An IT audit company has made the following recommendation: > > > > "A review of the databases has highlighted that the database "StockData4" > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 > compatibility > > level should be 100). It is recommended that an upgrade of the database > > StockData4 with the correct compatibility level be undertaken." > > > > From what I have read this just involves changing the databases > > compatibility level setting. Apart from being able to use features > > introduced in SQL2008, is there any other advantage to the change? Are > > there any disadvantages? Is there anything else that might be affected > by > > the change that I should know now and fix? > > > > > > ______________________________**_________________ > > dba-SQLServer mailing list > > dba-SQLServer@**databaseadvisors.com > > > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver< > 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 newsgrps at dalyn.co.nz Wed Jun 22 03:20:05 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Wed, 22 Jun 2011 20:20:05 +1200 Subject: [dba-SQLServer] Updating Database Compatibility Level In-Reply-To: References: <20110621203607.LBRI26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: <20110622082217.JQAY26379.mta01.xtra.co.nz@David-PC.dalyn.co.nz> I have suggested that the company quiz the Audit firm for their reasons. Will let you know if we get a reply. David At 22/06/2011, Mark Breen wrote: >Hello David and Francisco, > >About 6 months ago, I was asked to connect to a SQL Server database on a >live working box. > >I was able to detach and attach the db on another server, but I wanted to >connect while it was on the existing server. > >I did not know the password for the SQL instance. > >At the time, I spent 20 - 30 minutes reading about cracking the password on >SQL server and there were a lot of interesting articles on that topic - in >fact it was not important to crack the database, but the reason I spent the >20 - 30 mins was because the reading was interesting. > >It seemed to me that it is easy enough to crack a password in SQL 2005 - but >it also seems that MS changed that for SQL 2008. Perhaps this is one reason >that the IT audit company raised it. > >In David's case, there the server is already 2008, and only the single db >compatability level is 2005, I would love to hear why the audit company >wants it upgraded? I bet they have no idea why, and when they are informed >that the server is already at 2008 - and so the enhanced security is already >in place - they probably have no real idea why they are hassling you. > >There must be a special word for this situation - people that portray >importantance with no substance, or at least with less substance than they >present. What I hate is that they introduce enough FUD to cause us to >change our compatabiltiy levels from SQL 90 to SQL 100. > >Mark > > > > > > > > >On 21 June 2011 22:31, Francisco Tapia wrote: > > > yes, just changing the compatibility level will change what is needed for > > the database and allows you access to all the newer sql server 2008 > > features. the advantage is that you are more compatible with the current > > engine. As Microsoft moves forward you will have features supported in > > previous version of sql server deprecated or behave oddly, to help avoid > > odd > > behavior you'd normally update to the current compatibility level. Other > > than syntax and the newer sql 2008 features I don't know what else would be > > the pressing issue unless the company runs scripts specifically targeted at > > a specific database version. > > > > > > -Francisco > > http://bit.ly/sqlthis | Tsql and More... > > http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free) > > > > > > > > > > On Tue, Jun 21, 2011 at 1:33 PM, newsgrps wrote: > > > > > Team, > > > > > > I have an SQL 2005 database that has been attached to SQL2008. > > Everything > > > runs fine. > > > > > > An IT audit company has made the following recommendation: > > > > > > "A review of the databases has highlighted that the database "StockData4" > > > is SQL 90 which is the SQL 2005 compatibility level (SQL 2008 > > compatibility > > > level should be 100). It is recommended that an upgrade of the database > > > StockData4 with the correct compatibility level be undertaken." > > > > > > From what I have read this just involves changing the databases > > > compatibility level setting. Apart from being able to use features > > > introduced in SQL2008, is there any other advantage to the change? Are > > > there any disadvantages? Is there anything else that might be affected > > by > > > the change that I should know now and fix? > > > > > > > > > ______________________________**_________________ > > > dba-SQLServer mailing list > > > dba-SQLServer@**databaseadvisors.com > > > > > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver< > > 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 dmart06 at gmail.com Fri Jun 24 10:39:49 2011 From: dmart06 at gmail.com (Donna Martin) Date: Fri, 24 Jun 2011 11:39:49 -0400 Subject: [dba-SQLServer] SQL Server 2008 Installation Message-ID: Good morning, I am about to install SQL Server 2008 onto my new laptop that has Windows 7 Pro and is 64 bit. When I looked at the version of Visual Studio, I have 2005 installed. Also, my .net framework is v4.0. Please advise if I should uninstall both of these BEFORE beginning the installation of SQL Server 2008. Any and all pointers, tips, warnings, 'don't even think of doing...' items will be gratefully accepted! One quick note: I will be accessing this using ColdFusion, just in case that matters! Thanks in advance! Donna From dmart06 at emory.edu Fri Jun 24 11:43:07 2011 From: dmart06 at emory.edu (Martin, Donna M) Date: Fri, 24 Jun 2011 16:43:07 +0000 Subject: [dba-SQLServer] FW: SQL Server 2008 Installation In-Reply-To: References: Message-ID: Oops...Left out the fact that this is just the Developer's version...my bad. D ________________________________________ From: dba-sqlserver-bounces at databaseadvisors.com [dba-sqlserver-bounces at databaseadvisors.com] on behalf of Donna Martin [dmart06 at gmail.com] Sent: Friday, June 24, 2011 11:39 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Server 2008 Installation Good morning, I am about to install SQL Server 2008 onto my new laptop that has Windows 7 Pro and is 64 bit. When I looked at the version of Visual Studio, I have 2005 installed. Also, my .net framework is v4.0. Please advise if I should uninstall both of these BEFORE beginning the installation of SQL Server 2008. Any and all pointers, tips, warnings, 'don't even think of doing...' items will be gratefully accepted! One quick note: I will be accessing this using ColdFusion, just in case that matters! Thanks in advance! Donna _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). From fuller.artful at gmail.com Sat Jun 25 10:01:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 25 Jun 2011 11:01:16 -0400 Subject: [dba-SQLServer] No Office 12 Access Database Engine OLE DB Provider Message-ID: I've begun working my way into Learning SQL Server 2008 Reporting Services Step by Step, and I'm stumbling already. The first exercise is to use the Import/Export wizard to import the Northwind.mdb database from Access. A screenshot shows selecting the source database; the option selected is Microsoft Office 12.0 Access Database Engine OLE DB Provider -- which doesn't appear on my list of data sources. I found a link to it, however, so if you encounter this problem you can download both the 32- and 64-bit executables from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255 HTH someone. Arthur From gustav at cactus.dk Sat Jun 25 10:26:28 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 25 Jun 2011 17:26:28 +0200 Subject: [dba-SQLServer] No Office 12 Access Database Engine OLE DB Provider Message-ID: Hi Arthur You could study the report samples here: http://northwind.codeplex.com/documentation including the ported database. /gustav >>> fuller.artful at gmail.com 25-06-2011 17:01 >>> I've begun working my way into Learning SQL Server 2008 Reporting Services Step by Step, and I'm stumbling already. The first exercise is to use the Import/Export wizard to import the Northwind.mdb database from Access. A screenshot shows selecting the source database; the option selected is Microsoft Office 12.0 Access Database Engine OLE DB Provider -- which doesn't appear on my list of data sources. I found a link to it, however, so if you encounter this problem you can download both the 32- and 64-bit executables from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255 HTH someone. Arthur From rls at WeBeDb.com Mon Jun 27 08:08:21 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 27 Jun 2011 08:08:21 -0500 Subject: [dba-SQLServer] SQL Server 2008 Installation In-Reply-To: References: Message-ID: Donna, Unless you just have to have 2008, I would suggest 2008R2 instead. You will need the framework, so you do not need to change that. But, if you are using VS 2005, then you are not using framework 4.0. Sorry, but I do not remember the version for it, but I think it is 2. I would recommend using the Development version of SQL Server if you have it available and if this is for development purposes. Robert At 10:39 AM 6/24/2011, you wrote: >Date: Fri, 24 Jun 2011 11:39:49 -0400 >From: Donna Martin >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] SQL Server 2008 Installation >Message-ID: >Content-Type: text/plain; charset=ISO-8859-1 > >Good morning, > >I am about to install SQL Server 2008 onto my new laptop that has Windows 7 >Pro and is 64 bit. When I looked at the version of Visual Studio, I have >2005 installed. Also, my .net framework is v4.0. > >Please advise if I should uninstall both of these BEFORE beginning the >installation of SQL Server 2008. > >Any and all pointers, tips, warnings, 'don't even think of doing...' items >will be gratefully accepted! > >One quick note: I will be accessing this using ColdFusion, just in case >that matters! > >Thanks in advance! > >Donna Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com