From jwcolby at colbyconsulting.com Wed Jan 5 12:00:15 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 05 Jan 2011 13:00:15 -0500 Subject: [dba-SQLServer] SQL Server security Message-ID: <4D24B1AF.3090800@colbyconsulting.com> I am having performance issues in a largish Access application, a Disability Insurance Claim call center app. I have one particular table which is not huge in terms of field count but it does have a lot of records and most of the fields are indexed, and it has about 800K records in it. This table holds "contact" info, as in phone calls that the users have. They document every "contact" with every one, claimants, doctors, lawyers, etc. into a memo field and also date of call, ClaimID FK, employee id FK, contact type id FK etc. Kind of a mini center of the universe for this application. The result is that people are storing new records in this table constantly throughout the day and we are getting a lot of "record locked..." issues caused by (AFAICT) the time it takes Jet to store the records and update all of the indexes, and probably the memo storage area of the mdb. Just to give a picture, this one table has been moved out to it's own mdb and that mdb is about 700 megabytes after a compact. Most of the rest of the database (150 tables) is in another mdb and after compact that database is 800 megabytes, so this one table is close to as big as the rest of the db. I do not have experience in a transactional database using SQL Server, but I am thinking that SQL Server express 2005 will not have an issue keeping up with this kind of usage - 25 users adding records to this table all day without causing locking issues like I am seeing now. My issue at this point is that they use a network logon and force the users to change their password every 30 days. Is SQL Server going to use that same network username / password database or does it use a list of usernames / passwords physically on the server itself? IOW will Windows authentication work or will I need to go to SQL Server username / password? -- John W. Colby www.ColbyConsulting.com From df.waters at comcast.net Wed Jan 5 12:17:18 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 5 Jan 2011 12:17:18 -0600 Subject: [dba-SQLServer] SQL Server security In-Reply-To: <4D24B1AF.3090800@colbyconsulting.com> References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 GB in Access might be larger in SQL Server - someone else probably knows. SQL Server 2008 R2 Express has a capacity of 10 Gb. Typing data into a memo field will lock one page of records, even if you're using Access 2000+ and have set your mdb for Record-Level Locking. Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, January 05, 2011 12:00 PM To: Sqlserver-Dba; VBA; Access Developers discussion and problem solving Subject: [dba-SQLServer] SQL Server security I am having performance issues in a largish Access application, a Disability Insurance Claim call center app. I have one particular table which is not huge in terms of field count but it does have a lot of records and most of the fields are indexed, and it has about 800K records in it. This table holds "contact" info, as in phone calls that the users have. They document every "contact" with every one, claimants, doctors, lawyers, etc. into a memo field and also date of call, ClaimID FK, employee id FK, contact type id FK etc. Kind of a mini center of the universe for this application. The result is that people are storing new records in this table constantly throughout the day and we are getting a lot of "record locked..." issues caused by (AFAICT) the time it takes Jet to store the records and update all of the indexes, and probably the memo storage area of the mdb. Just to give a picture, this one table has been moved out to it's own mdb and that mdb is about 700 megabytes after a compact. Most of the rest of the database (150 tables) is in another mdb and after compact that database is 800 megabytes, so this one table is close to as big as the rest of the db. I do not have experience in a transactional database using SQL Server, but I am thinking that SQL Server express 2005 will not have an issue keeping up with this kind of usage - 25 users adding records to this table all day without causing locking issues like I am seeing now. My issue at this point is that they use a network logon and force the users to change their password every 30 days. Is SQL Server going to use that same network username / password database or does it use a list of usernames / passwords physically on the server itself? IOW will Windows authentication work or will I need to go to SQL Server username / password? -- 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 Wed Jan 5 12:40:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 05 Jan 2011 13:40:09 -0500 Subject: [dba-SQLServer] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: <4D24BB09.1090906@colbyconsulting.com> Dan, > SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 GB in Access might be larger in SQL Server - someone else probably knows. Yep, and yep. Actually AFAICT the preliminary import of Access into SQL Server gives me a SQL Server database file that is slightly smaller than the compacted access be file. > SQL Server 2008 R2 Express has a capacity of 10 Gb. Yes, but it won't run on Windows 2000. SQL Server 2005 will. > Typing data into a memo field will lock one page of records, even if you're using Access 2000+ and have set your mdb for Record-Level Locking. Yep, one of many issues with Access as the sizes get larger. I am hoping that SQL Server express will solve these for me. John W. Colby www.ColbyConsulting.com On 1/5/2011 1:17 PM, Dan Waters wrote: > SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 > GB in Access might be larger in SQL Server - someone else probably knows. > > SQL Server 2008 R2 Express has a capacity of 10 Gb. > > Typing data into a memo field will lock one page of records, even if you're > using Access 2000+ and have set your mdb for Record-Level Locking. > > Dan > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Wednesday, January 05, 2011 12:00 PM > To: Sqlserver-Dba; VBA; Access Developers discussion and problem solving > Subject: [dba-SQLServer] SQL Server security > > I am having performance issues in a largish Access application, a Disability > Insurance Claim call > center app. > > I have one particular table which is not huge in terms of field count but it > does have a lot of > records and most of the fields are indexed, and it has about 800K records in > it. This table holds > "contact" info, as in phone calls that the users have. They document every > "contact" with every > one, claimants, doctors, lawyers, etc. into a memo field and also date of > call, ClaimID FK, employee > id FK, contact type id FK etc. Kind of a mini center of the universe for > this application. > > The result is that people are storing new records in this table constantly > throughout the day and we > are getting a lot of "record locked..." issues caused by (AFAICT) the time > it takes Jet to store the > records and update all of the indexes, and probably the memo storage area of > the mdb. > > Just to give a picture, this one table has been moved out to it's own mdb > and that mdb is about 700 > megabytes after a compact. Most of the rest of the database (150 tables) is > in another mdb and > after compact that database is 800 megabytes, so this one table is close to > as big as the rest of > the db. > > I do not have experience in a transactional database using SQL Server, but I > am thinking that SQL > Server express 2005 will not have an issue keeping up with this kind of > usage - 25 users adding > records to this table all day without causing locking issues like I am > seeing now. > > My issue at this point is that they use a network logon and force the users > to change their password > every 30 days. Is SQL Server going to use that same network username / > password database or does it > use a list of usernames / passwords physically on the server itself? IOW > will Windows > authentication work or will I need to go to SQL Server username / password? > From fhtapia at gmail.com Wed Jan 5 13:41:23 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 5 Jan 2011 11:41:23 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: <4D24B1AF.3090800@colbyconsulting.com> References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: -Francisco http://bit.ly/sqlthis | Tsql and More... On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: > > I do not have experience in a transactional database using SQL Server, but > I am thinking that SQL Server express 2005 will not have an issue keeping up > with this kind of usage - 25 users adding records to this table all day > without causing locking issues like I am seeing now. > It's been a while since I did a conversion, I don't remember if you need to make all your fields varchar or nvarchar, but that's the gist. I remember also going unbound to simplify the data entry process, but ymmv with that piece of advise. We have SQL Server running in the backend for many of our transactional systems and we have > than 25 users all w/o locking problems. My issue at this point is that they use a network logon and force the users > to change their password every 30 days. Is SQL Server going to use that > same network username / password database or does it use a list of usernames > / passwords physically on the server itself? IOW will Windows > authentication work or will I need to go to SQL Server username / password? Windows Authentication will work just fine. To simplify the user to server problem, you'd want the network admin to add your users who have access to the application to a specific domain group... then just give access to the domain group. You can even put security around who has access to what based on domain group, works a treat. If you have too much difficulty with that you can always fall back to sql authentication, but I always prefer windows authentication except for the web apps we have... From jlawrenc1 at shaw.ca Wed Jan 5 13:59:06 2011 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Wed, 5 Jan 2011 11:59:06 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: A nice new blog you have there fransico. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia Sent: Wednesday, January 05, 2011 11:41 AM To: Discussion concerning Visual Basic and related programming issues. Cc: Sqlserver-Dba; Access Developers discussion and problem solving Subject: Re: [dba-SQLServer] [dba-VB] SQL Server security -Francisco http://bit.ly/sqlthis | Tsql and More... On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: > > I do not have experience in a transactional database using SQL Server, but > I am thinking that SQL Server express 2005 will not have an issue keeping up > with this kind of usage - 25 users adding records to this table all day > without causing locking issues like I am seeing now. > It's been a while since I did a conversion, I don't remember if you need to make all your fields varchar or nvarchar, but that's the gist. I remember also going unbound to simplify the data entry process, but ymmv with that piece of advise. We have SQL Server running in the backend for many of our transactional systems and we have > than 25 users all w/o locking problems. My issue at this point is that they use a network logon and force the users > to change their password every 30 days. Is SQL Server going to use that > same network username / password database or does it use a list of usernames > / passwords physically on the server itself? IOW will Windows > authentication work or will I need to go to SQL Server username / password? Windows Authentication will work just fine. To simplify the user to server problem, you'd want the network admin to add your users who have access to the application to a specific domain group... then just give access to the domain group. You can even put security around who has access to what based on domain group, works a treat. If you have too much difficulty with that you can always fall back to sql authentication, but I always prefer windows authentication except for the web apps we have... _______________________________________________ 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 Wed Jan 5 14:50:33 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 5 Jan 2011 12:50:33 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: Thanks I'm going to be adding some new stuff soon On 1/5/11, Jim Lawrence wrote: > A nice new blog you have there fransico. > > Jim > > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco > Tapia > Sent: Wednesday, January 05, 2011 11:41 AM > To: Discussion concerning Visual Basic and related programming issues. > Cc: Sqlserver-Dba; Access Developers discussion and problem solving > Subject: Re: [dba-SQLServer] [dba-VB] SQL Server security > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > > > > > On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: >> >> I do not have experience in a transactional database using SQL Server, but >> I am thinking that SQL Server express 2005 will not have an issue keeping > up >> with this kind of usage - 25 users adding records to this table all day >> without causing locking issues like I am seeing now. >> > > It's been a while since I did a conversion, I don't remember if you need to > make all your fields varchar or nvarchar, but that's the gist. I remember > also going unbound to simplify the data entry process, but ymmv with that > piece of advise. We have SQL Server running in the backend for many of our > transactional systems and we have > than 25 users all w/o locking problems. > > My issue at this point is that they use a network logon and force the users >> to change their password every 30 days. Is SQL Server going to use that >> same network username / password database or does it use a list of > usernames >> / passwords physically on the server itself? IOW will Windows >> authentication work or will I need to go to SQL Server username / > password? > > > Windows Authentication will work just fine. To simplify the user to server > problem, you'd want the network admin to add your users who have access to > the application to a specific domain group... then just give access to the > domain group. You can even put security around who has access to what based > on domain group, works a treat. If you have too much difficulty with that > you can always fall back to sql authentication, but I always prefer windows > authentication except for the web apps we have... > _______________________________________________ > 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 > > -- Sent from my mobile device -Francisco http://bit.ly/sqlthis | Tsql and More... From jwcolby at colbyconsulting.com Fri Jan 7 23:01:31 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 08 Jan 2011 00:01:31 -0500 Subject: [dba-SQLServer] Access - link to SQL database -Database not showing Message-ID: <4D27EFAB.5040200@colbyconsulting.com> I have installed SQL Server 2005 on a (remote) Windows 2000 server machine at the client. From my workstation at the client I then open SQL Server MSExpress 2005 and I can see that SQL Server Express instance and two databases that I created on that SQL Server Express instance. From Access I try to link to a table in one of those databases. When I get to the wizard page where I am allowed to change the default database, I cannot see either of the two databases that I need to get at, only the master, msdb and tempdb. I was having a problem where I could not connect and had to open the surface configuration and allow remote connections. I selected TCP AND named pipes. That allowed MSE to see that server as well as Access to see that server, but it does not yet allow me to see the actual database of interest. Any clue why? I have done this before here at my office and I could always see the databases. TIA, -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 7 23:06:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 08 Jan 2011 00:06:11 -0500 Subject: [dba-SQLServer] Further to "can's see SQL Server database... Message-ID: <4D27F0C3.2030206@colbyconsulting.com> I went back in with MSE and looked at that server. While I can see the databases of interest, if I click on them and try to see the tables inside, I get an error "the database DISCO is not available" and the plus symbol in front of the database disappears. So I can see that the db exists but not actually access it (from my workstation). I can see and open the database from MSE on the server itself. Is this an ownership / rights kind of issue? I am not getting an actual error number from my workstation, just an "not available" generic kind of message. If it is ownership / rights, how do I go about discovering how to fix it? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 13:25:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 14:25:11 -0500 Subject: [dba-SQLServer] Help... SQL Server Security Message-ID: <4D2A0B97.4080504@colbyconsulting.com> I have always used Windows Security for SQL Server because the servers are all mine, and I am the only one using them. Now things change and I need to allow people who are unknown to me access a server on a VM I have created just for this task. Which means I have to learn SQL Server security. My understanding is that for this specific requirement I need to go to a user / role model administered within SQL Server and checked by sql server. I have two scenarios for now. Scenario one: A small group of perhaps 4 or 5 users who belong to Lenoir Prison Ministries and who will use the database to maintain and utilize a volunteer database. Scenario two: A small group of perhaps 5-10 employees of a non-profit called Family Support network who will enter information about their contacts with families of children with disabilities. So, two distinct databases, which need to be only accessed by a specific small set of people. In both cases, the load will be small, probably only one or two people in the db at a time, probably only for a short period of time. I have set up a Hamachi VPN and a private network on a Virtual Machine which will be dedicated to these two databases. I have a SQL Server 2008 express instance running on this VM. My concept is that I will assist each user in setting up the Hamachi and getting connected to the VPN, and then probably have them download a run-time over the vpn. Haven't figured all that out yet but I will. What I specifically need help with is setting up SQL server security such that these people aren't Windows users but just SQL Server users. I am trying to find something that will walk me through setting up the groups and users, and then allow me to actually test this. Any suggested (internet) reading or even an email that walks me through it would be much appreciated. Thanks, -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 14:27:47 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 15:27:47 -0500 Subject: [dba-SQLServer] Microsoft SQL Server - Lesson 02: Microsoft SQL Server Installation Message-ID: <4D2A1A43.2080205@colbyconsulting.com> I found this on the web. Lesson 3 is setting up the networking and such. The only problem is I do not know what it is doing. But I am following the directions... -- John W. Colby www.ColbyConsulting.com http://www.functionx.com/sqlserver/Lesson02.htm From jwcolby at colbyconsulting.com Sun Jan 9 14:53:39 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 15:53:39 -0500 Subject: [dba-SQLServer] Security - creating users Message-ID: <4D2A2053.4010703@colbyconsulting.com> I am following along in the How-To I posted earlier, and when I get to the section for creating users it says that every user we are about to set up has to have a windows user. This can't possible be true since millions of people out there on the internet use SQL Server every day and nobody is creating a login for them. Besides I am having to duplicate this inside of SQL Server? Setting up a windows user / password and then setting up a SQL server user / password. How does this really work. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sun Jan 9 15:09:53 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 10 Jan 2011 07:09:53 +1000 Subject: [dba-SQLServer] Security - creating users In-Reply-To: <4D2A2053.4010703@colbyconsulting.com> References: <4D2A2053.4010703@colbyconsulting.com> Message-ID: <4D2A2421.10642.13BF17BC@stuart.lexacorp.com.pg> That is only the case if you are using Windows Authentication. If you are using SQL Server Authentication, it is up to you how many different useers you create. You can have multiple people connect using the same "username" at the same time. Are you talking about a web application here or your own application connecting to the SQL Server over the internet? In the case of a web application, You just create one user called "webaccess" or something like that. Your web application connects to SQL Server under that username, you don't need credentials for individual people accessing the website. For your own application, it's up to you how you want to handle tracking actually users and authenticating allowed actions you can create as many "users" as you need. -- Stuart On 9 Jan 2011 at 15:53, jwcolby wrote: > I am following along in the How-To I posted earlier, and when I get to > the section for creating users it says that every user we are about > to set up has to have a windows user. This can't possible be true > since millions of people out there on the internet use SQL Server > every day and nobody is creating a login for them. Besides I am > having to duplicate this inside of SQL Server? Setting up a windows > user / password and then setting up a SQL server user / password. > > How does this really work. > > -- > 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 accessd at shaw.ca Sun Jan 9 15:51:43 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 9 Jan 2011 13:51:43 -0800 Subject: [dba-SQLServer] Upsizing In-Reply-To: <4D2A0B97.4080504@colbyconsulting.com> References: <4D2A0B97.4080504@colbyconsulting.com> Message-ID: Hi All: I know that Upsizing has been discussed at certain points but I now have to do a quick and dirty upgrade before I can seriously translate a site to ADO-OLE. Right now the client has an Access2003 application sitting on a Windows Server 2003 or 2008 (not sure yet). There is a SQL Server 2005 on the computer. Due to some bizarre unstable connection issues we have to move things up and quickly. The current application is broken into FE and BE. 1. Should the FE and BE be merged before running the upsizing or not? 2. Will all the queries and reports have to be manually updated? 3. Is there anyway to modify the Upsize generated SQL connections to point to another SQL server? 4. Is there a better way to do this process than using the Upsize wizard? 5. Is there any other issues that should be handled or looked out for? TIA Jim From jwcolby at colbyconsulting.com Sun Jan 9 22:27:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 23:27:26 -0500 Subject: [dba-SQLServer] SQL Server Security - Some success Message-ID: <4D2A8AAE.2090203@colbyconsulting.com> OK, I manually created a jwcolby user and gave it rights to see the Caldwell prison ministries database, then I could see the db but not do anything with it. I then manually assigned db_datareader and db_datawriter and voila, data. So I am happy that I at least am seeing data. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 23:07:39 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Jan 2011 00:07:39 -0500 Subject: [dba-SQLServer] Read only rights Message-ID: <4D2A941B.2050202@colbyconsulting.com> I created two users to test the rights I assigned and how they function, straight in SQL Server. One is read and one is read and write. The read / write operates as expected, however the read only allowed me to modify but not save the modifications. Somehow I expected the query to be readonly. Again this was directly in a SQL Server table, logged in to SSMS through that user. I expect the same results once I get to getting at the data from Access. Is there a way to prevent even the appearance of modifying the data if the user is read only? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sun Jan 9 23:15:28 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 10 Jan 2011 15:15:28 +1000 Subject: [dba-SQLServer] Read only rights In-Reply-To: <4D2A941B.2050202@colbyconsulting.com> References: <4D2A941B.2050202@colbyconsulting.com> Message-ID: <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> I don't expect the same results in Access :-) The query is Read Only, the problem is with your display interface. The SSMS interface doesn't retreive any information about the R/W status of the data that its displaying so it doesn't stop you from modify the *displayed* data. Access forms are smarter and lock the displayed data if it is RO. -- Stuart On 10 Jan 2011 at 0:07, jwcolby wrote: > I created two users to test the rights I assigned and how they > function, straight in SQL Server. One is read and one is read and > write. > > The read / write operates as expected, however the read only allowed > me to modify but not save the modifications. Somehow I expected the > query to be readonly. > > Again this was directly in a SQL Server table, logged in to SSMS > through that user. > > I expect the same results once I get to getting at the data from > Access. Is there a way to prevent even the appearance of modifying > the data if the user is read only? > > -- > 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 Sun Jan 9 23:50:50 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Jan 2011 00:50:50 -0500 Subject: [dba-SQLServer] Read only rights In-Reply-To: <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> References: <4D2A941B.2050202@colbyconsulting.com> <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> Message-ID: <4D2A9E3A.9090508@colbyconsulting.com> OK, that would be a good thing! Thanks for the reply! Boy am I learning stuff on this project!!! John W. Colby www.ColbyConsulting.com On 1/10/2011 12:15 AM, Stuart McLachlan wrote: > I don't expect the same results in Access :-) > > The query is Read Only, the problem is with your display interface. > > The SSMS interface doesn't retreive any information about the R/W status of the data that its > displaying so it doesn't stop you from modify the *displayed* data. > > Access forms are smarter and lock the displayed data if it is RO. > From jwcolby at colbyconsulting.com Tue Jan 11 07:39:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Jan 2011 08:39:19 -0500 Subject: [dba-SQLServer] Contiguous Time Periods Message-ID: <4D2C5D87.7010800@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.simple-talk.com/sql/t-sql-programming/contiguous-time-periods/?utm_source=simpletalk&utm_medium=email-main&utm_content=TimePeriods-20101130&utm_campaign=SQL From Gustav at cactus.dk Tue Jan 11 10:53:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Jan 2011 17:53:20 +0100 Subject: [dba-SQLServer] Contiguous Time Periods Message-ID: Hi John Thanks, this is always an interesting topic, but I don't understand why he waits so long introducing the option of using the id of the previous time recording as the foreign key in a self-referencing table. And by using dates only in favour of timestamps, he enables all sorts of errors which could be cut off if time was included. But I'm not a T-SQL guy and probably never will be. I prefer to keep this sort of mechanics outside the database and not write anything until properly validated. /gustav >>> jwcolby at colbyconsulting.com 11-01-2011 14:39 >>> -- John W. Colby www.ColbyConsulting.com http://www.simple-talk.com/sql/t-sql-programming/contiguous-time-periods/?utm_source=simpletalk&utm_medium=email-main&utm_content=TimePeriods-20101130&utm_campaign=SQL From jwcolby at colbyconsulting.com Tue Jan 11 11:48:17 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Jan 2011 12:48:17 -0500 Subject: [dba-SQLServer] Contiguous Time Periods In-Reply-To: References: Message-ID: <4D2C97E1.3010404@colbyconsulting.com> To be honest, I scanned the whole thing quickly, thinking the whole time about the validation function that you wrote / helped write. I'm thinking that this is about doing millions of records where you need the speed of SQL Server to get it to work at all. John W. Colby www.ColbyConsulting.com On 1/11/2011 11:53 AM, Gustav Brock wrote: > Hi John > > Thanks, this is always an interesting topic, but I don't understand why he waits so long introducing the option of using the id of the previous time recording as the foreign key in a self-referencing table. And by using dates only in favour of timestamps, he enables all sorts of errors which could be cut off if time was included. > > But I'm not a T-SQL guy and probably never will be. I prefer to keep this sort of mechanics outside the database and not write anything until properly validated. > > /gustav > > >>>> jwcolby at colbyconsulting.com 11-01-2011 14:39>>> > From jwcolby at colbyconsulting.com Sat Jan 15 17:37:00 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Jan 2011 18:37:00 -0500 Subject: [dba-SQLServer] SQL Server over Hamachi: First test not hopeful Message-ID: <4D322F9C.8090405@colbyconsulting.com> I developed a SQL Server database, with perhaps 10-15 tables, populated a few with just a handful of records, created an Access database and built a few forms. My strategy is to do Access because I can do it quickly, but link it to SQL Server, the run the FE on a remote computer over Hamachi. Tonight I went to a local Arby's to test the speed of the system. The local Arby's has an open wifi, which using Speedtest.net tested 5 mbit down, 1 mbit up - typical low end cable in my area. So I tried to use the system and... well... it took an extremely long time to connect, if it connected at all. Access mostly timed out trying to log on. SQL Server Management System would log on sometimes. Sometimes not. Trying to hit it at the actual Hamachi IP address worked but took awhile. 15 - 30 seconds to connect (I did not time it). To be honest I am puzzled. Google finds plenty of folks trying this, some succeeding, most pretty slow. Remote desktop is plenty fast. From inside of my office, out across the internet via Hamachi I have done things like file transfers etc (in the past). Remote desktop has always been very speedy, but there isn't much needed for RD. I had really expected faster connections / operation. I really expected SSMS to just work, pretty much at speed. It didn't. Sigh, back to the drawing boards. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 16 21:21:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 16 Jan 2011 22:21:26 -0500 Subject: [dba-SQLServer] Access to SQL Server over Hamachi - it WORKS Message-ID: <4D33B5B6.1050102@colbyconsulting.com> Today I stepped back and set it all up internal to my network. Yesterday I had moved the Fe to my laptop. Today I deleted all of my linked tables, then I relinked all of the tables. In doing so I created a new DSN where I hit the SQL Server directly at the Hamachi IP address. Relinked using this new DSN and voila, she's a wurkin, and lightning fast over my internal network but forcing the traffic through Hamachi. So I tested a bit, then went back out to the local Arby's where I was pretty much unable to do anything last night (other than browse the internet). Got right on the connection, opened the Access FE and voila, she's a wurkin, and lightning fast. You wouldn't know you weren't directly on my LAN. Access on my laptop over Hamachi, over a public network, in to my network, directly into a Virtual Machine over Hamachi, running SQL Server 2008 Express. I am so jazzed! that leaves me with one technical barrier now, getting an Access 2007 run-time to host an Access 2003 FE. Now I need to set up a VM to run on my laptop so that I can have an environment without Office installed. Install the Access 2007 run-time and drop the Access 2003 Fe in place. Set up Hamachi on that VM and then get it all playing nice. This will allow me to take my laptop on the road to demo the system. We shall see. And yes Jim, I understand I still need to cause SQL Server to do the heavy lifting. To this point I have never really used SQL Server as the BE for Access. My biggest client uses Access 2K and it doesn't really play nice with ADO. Since I can now develop these new databases in 2003, I can do things like bind the form to an ADO recordset and still have it read/write. I will need to learn how to use a stored procedure were I can pass in a PK and have the SP return a table of data already selected and sorted. I.e. SQL Server doing the lifting. The nice thing is that these are small databases so I can do things like leave the list tables just linked, at least for awhile while I learn all the stuff I have never had to do. Next up, 2007 run-time. -- John W. Colby www.ColbyConsulting.com From paul.hartland at googlemail.com Fri Jan 21 02:08:13 2011 From: paul.hartland at googlemail.com (Paul Hartland) Date: Fri, 21 Jan 2011 08:08:13 +0000 Subject: [dba-SQLServer] Transfering SSRS 2005 Reports To SSRS 2008 On A New Server Message-ID: To all, We have lots of reports on our current server using SSRS 2005, over the Christmas period we had a new server and installed SQL Server 2008 and SSRS 2008. Yesterday after a bit of reading up from good old Google I tried to move all the reports across to SSRS 2008 I backed up Reportsever and ReportServerTempDB from the old server using the COPY_ONLY and also backed up the encryption keys. I restored the ReportServer and ReportServerTempDB databases to the SQL Server 2008, I then went into report server configuration manager and restored the encryption keys. I then opened a browser and entered the URL for the reports, hey presto all the folders and reports etc were there, so far so good. Unfortunately when I now try to open any of the reports I get an error message saying that the data source 'our_data_source' cannot be found. It looks like the data source name which on the existing SSRS 2005 had spaces in has been replaced with underscores at some point during the transfer. I tried creating a new data source and pointing a report which I was testing to the new data source, but when I ran the report I still got the same error message. Has anyone came across this before, if so any ideas on how I can rectify this ? Many thanks in advance for any help on this. -- Paul Hartland paul.hartland at googlemail.com From davidmcafee at gmail.com Fri Jan 21 13:59:51 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 21 Jan 2011 11:59:51 -0800 Subject: [dba-SQLServer] Is there a better way to do this? Message-ID: Is there a better way to do this? IF (@ChangeKey IN(0,1,2,3,4,5,8,9,10,11,12,13)) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart >@OldEnd) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewEnd <@OldStart) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart <@OldStart AND @NewEnd >@OldEnd) BEGIN --Do a bunch of stuff here END From jwcolby at colbyconsulting.com Sat Jan 22 10:16:02 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 22 Jan 2011 11:16:02 -0500 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security Message-ID: <4D3B02C2.1010909@colbyconsulting.com> What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- John W. Colby www.ColbyConsulting.com From jlawrenc1 at shaw.ca Sat Jan 22 15:32:29 2011 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Sat, 22 Jan 2011 13:32:29 -0800 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D3B02C2.1010909@colbyconsulting.com> References: <4D3B02C2.1010909@colbyconsulting.com> Message-ID: Hi John: Basically, you can limit the users that have access to your SQL server by creating a group of people with the same rights on the hosting server. Start > Administration tools > Computer Management > Local Users and Groups. First create the new users and then create a group and add all the new users. Make sure to add good passwords to each or force them to change upon initial entry, set the strength of the password and the password's duration through your selected policy... minimum 12 characters, mixture of numbers and letters, upper and lower case and additional special characters would be my starting point. Then in the Microsoft SQL Server Management Studio. The appropriate SQL Server > Databases > the database of choice > Security > Users > enter the Group and then set all their access privileges. When completed a certain group of users accessing the MS SQL server, via the sites IP address through port 1433, to the hosting server, will be challenged for their user names and passwords to gain access to a particular database, with limited rights. If the hosting server (the one with the MS SQL server in it) is the only external access point then go into your router, make sure port 1433 is open and (virtual) direct via your internal IP addressing to that hosting server. Note: If you have multiple MS SQL servers running on various servers then you can change the default listening port in each MS SQL. (Can not remember how to do that but it should be easy to look up. Check the following link out) http://www.databasejournal.com/features/mssql/article.php/3689846/Using-Non- Standard-Port-for-SQL-Server.htm This should be all handled from your users FE application. The last items that might be useful is first open notepad, create a text file with any name with an extension of UDL. Then go in an experiment until you correctly connect to your SQL server and when done, change the extension to TXT and cut and paste the displayed link into your users FE application. (Remember if you change the listening port that will have to be appropriately set.) There are few more things I have undoubtedly over-looked or forgotten but that's the basics and I am sure some of the gurus on this site will correct me or fill in the details. HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, January 22, 2011 8:16 AM To: Sqlserver-Dba; VBA Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- 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 ab-mi at post3.tele.dk Sat Jan 22 18:06:56 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sun, 23 Jan 2011 01:06:56 +0100 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D3B02C2.1010909@colbyconsulting.com> References: <4D3B02C2.1010909@colbyconsulting.com> Message-ID: <4D26495788244688A0AE7D8856B23C1E@abpc> John, To use Active Directory your server needs to be set up as a Domain Controller. In that case your procedure is correct and should work. Since it doesn't work I would suppose your server isn't set up as a Domain Controller. I'm not a system administrator guy and can't help on this topic. But maybe others on the list can? What's puzzling me however is that you are in fact able to access your DiscoSvr\SQLExpress from the workstation. This indicates that your workstation login is validated successfully against the SQL Server on the server DiscoSvr. Something spooky going on here... Asger -----Oprindelig meddelelse----- Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af jwcolby Sendt: 22. januar 2011 17:16 Til: Sqlserver-Dba; VBA Emne: [dba-SQLServer] How do I troubleshoot SQL Server Security What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- 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 Jan 22 21:03:43 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 22 Jan 2011 22:03:43 -0500 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D26495788244688A0AE7D8856B23C1E@abpc> References: <4D3B02C2.1010909@colbyconsulting.com> <4D26495788244688A0AE7D8856B23C1E@abpc> Message-ID: <4D3B9A8F.8050801@colbyconsulting.com> They have a domain controller somewhere. This server is not it. From what can tell I was banging against the DiscoSvr's user / group validation rather than the domain controller's group / user validation. John W. Colby www.ColbyConsulting.com On 1/22/2011 7:06 PM, Asger Blond wrote: > John, > To use Active Directory your server needs to be set up as a Domain Controller. In that case your procedure is correct and should work. > Since it doesn't work I would suppose your server isn't set up as a Domain Controller. I'm not a system administrator guy and can't help on this topic. But maybe others on the list can? > What's puzzling me however is that you are in fact able to access your DiscoSvr\SQLExpress from the workstation. This indicates that your workstation login is validated successfully against the SQL Server on the server DiscoSvr. Something spooky going on here... > > Asger > > -----Oprindelig meddelelse----- > Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af jwcolby > Sendt: 22. januar 2011 17:16 > Til: Sqlserver-Dba; VBA > Emne: [dba-SQLServer] How do I troubleshoot SQL Server Security > > What I want to do: > > Create an instance of SQL Server running on a specific server, and somehow magically allow a > specific set of users logged in to the "system" (not necessarily that server) to access the server. > > AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network > and do not really understand how it works. In any event it appears that I am going to have to use > Active Directory in the SQL Server login? > > What I tried to do: > > On the server (windows 2000) I: > > 1) Created a windows security group DISUsers > 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express > database, including my user. > 3) In SQL Server 2005 Express SSMS at the server level I clicked security login > 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers > 5) I checked that the login had the public server role (and only that role) > 6) I went into the DISCO database and clickde SDecurity / Users > 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) > 7) I checked the Role members db_DataReader and db_DataWriter > > I saved all of the above. > > I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. > > I can see the database object and I can see a + symbol but if I try to expand the database to see > the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database > "Disco" under the current Security Context: SQL Server Error 916" > > I do not understand network security, but AFAICT what is happening is that I am logging in to a > network (Active Directory) login (which all users do) but I have just set up SQL Server on that > server to use a group / users specific to that server. > > So is it possible to use a similar method to manipulate SQL Server with active directory groups / > users? How is that done. > From jwcolby at colbyconsulting.com Sat Jan 22 23:07:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 00:07:52 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in Message-ID: <4D3BB7A8.30103@colbyconsulting.com> Well this is annoying. It seems I deleted the user that I created the instance of sql server with SSMS Security Logins object. Now I have no authority to do anything. Is there a way to put it back in? I tried to create it over again but I cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I can't even see the properties of that user, even though that is me... I think... Am I just screwed? Can I even delete the server instance? Luckily I wasn't all that far along in defining databases but I have probably a dozen hours involved in two specific databases. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jan 22 23:52:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 23 Jan 2011 15:52:59 +1000 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BB7A8.30103@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> When you delete a use and create a new one with the same name, that is NOT the same user. It has a different Security ID (SID). You will need to give rights to the new user all over again. One solution would be to shut down the SQL Server service, backup the database files then create a new instance and attach the databases to it. -- Stuart On 23 Jan 2011 at 0:07, jwcolby wrote: > Well this is annoying. It seems I deleted the user that I created the > instance of sql server with SSMS Security Logins object. Now I have > no authority to do anything. > > Is there a way to put it back in? I tried to create it over again but > I cannot seem to do so. In fact I recreated the vmDev\jwcolby user > but I can't even see the properties of that user, even though that is > me... > > I think... > > Am I just screwed? > > Can I even delete the server instance? > > Luckily I wasn't all that far along in defining databases but I have > probably a dozen hours involved in two specific databases. > > -- > 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 Sun Jan 23 07:01:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 08:01:52 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> Message-ID: <4D3C26C0.50402@colbyconsulting.com> I can't even do a backup. It gives me a "login failed - error 4064" John W. Colby www.ColbyConsulting.com On 1/23/2011 12:52 AM, Stuart McLachlan wrote: > When you delete a use and create a new one with the same name, that is NOT the same > user. It has a different Security ID (SID). > > You will need to give rights to the new user all over again. > > One solution would be to shut down the SQL Server service, backup the database files then > create a new instance and attach the databases to it. > From stuart at lexacorp.com.pg Sun Jan 23 07:33:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 23 Jan 2011 23:33:41 +1000 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C26C0.50402@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> Message-ID: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy the database files somewhere else for safety. -- Stuart On 23 Jan 2011 at 8:01, jwcolby wrote: > I can't even do a backup. It gives me a "login failed - error 4064" > > John W. Colby > www.ColbyConsulting.com > > On 1/23/2011 12:52 AM, Stuart McLachlan wrote: > > When you delete a use and create a new one with the same name, that > > is NOT the same user. It has a different Security ID (SID). > > > > You will need to give rights to the new user all over again. > > > > One solution would be to shut down the SQL Server service, backup > > the database files then create a new instance and attach the > > databases to it. > > > _______________________________________________ > 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 Jan 23 10:47:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 11:47:24 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C5B9C.7090702@colbyconsulting.com> Ahh.... John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From jwcolby at colbyconsulting.com Sun Jan 23 14:12:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 15:12:25 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C8BA9.501@colbyconsulting.com> Well, this is getting ugly. It seems that the SQL Server Express I had installed is R2. I installed a full on 2008 but it was not R2. Because the database was created in R2 it can't be opened in non-R2. Nothing is ever simple. John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From jwcolby at colbyconsulting.com Sun Jan 23 14:31:41 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 15:31:41 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C902D.6070403@colbyconsulting.com> Stuart, It seems that I was previously logging on and doing things as my windows login user. When I shut down the SQL Server express instance, the next time i tried to log in to that instance, I was unable to do so because of the "unknown user" issue. I tried to log in using the SQL Server security as the sa user and voila, I am in and able to see the databases. Now... I just installed full on SQL Server 2008 to this machine. It is the developer edition which acts like the enterprise edition - full compression and everything. But the Express edition does not allow that stuff. Apparently the express version is R2 and it is what I developed these databases in. The dev version I own is non-R2 and can't open the databases created by the Express (R2) version. I found something on the internet saying that I would have to "export backwards" whatever that means. I also have to get ownership or access valid to users or groups other than sa. John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From marklbreen at gmail.com Tue Jan 25 02:53:38 2011 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 25 Jan 2011 08:53:38 +0000 Subject: [dba-SQLServer] Is there a better way to do this? In-Reply-To: References: Message-ID: Hello David, two quick suggestions 1) read up on case statements and practice them a little, they might clean up the code 2) sometimes you can improve readability by creating a few neat userdefinted functions, they are as easy to create as a sproc and one written you could maybe restructure your code to read like if ufn_BasicChange() Begin --do stuff End if ufn_OtherTypeOfChange() Begin --do stuff End or alternately, you could combine both the case and the values you are playing with Case ufn_AllPossibileOptions(@NewDate) When 'Basic' then begin ............. end When 'Has No Date' then begin ............. end When 'Has A Date' then begin ............. end Else begin ............. end End Hope that is useful, John Colby thought me about how to use functions in 1998 so credit goes to him :) Mark On 21 January 2011 19:59, David McAfee wrote: > Is there a better way to do this? > > IF (@ChangeKey IN(0,1,2,3,4,5,8,9,10,11,12,13)) > > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart >@OldEnd) > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewEnd <@OldStart) > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart <@OldStart AND @NewEnd > >@OldEnd) > BEGIN > --Do a bunch of stuff here > END > _______________________________________________ > 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 Tue Jan 25 17:23:25 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 25 Jan 2011 18:23:25 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BB7A8.30103@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, sorry:) Arthur On Sun, Jan 23, 2011 at 12:07 AM, jwcolby wrote: > Well this is annoying. It seems I deleted the user that I created the > instance of sql server with SSMS Security Logins object. Now I have no > authority to do anything. > > Is there a way to put it back in? I tried to create it over again but I > cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I > can't even see the properties of that user, even though that is me... > > I think... > > Am I just screwed? > > Can I even delete the server instance? > > Luckily I wasn't all that far along in defining databases but I have > probably a dozen hours involved in two specific databases. > > -- > 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 Tue Jan 25 18:08:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 25 Jan 2011 19:08:04 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: <4D3F65E4.70401@colbyconsulting.com> LOL, yep, pretty darned funny *after* I figured out how to get back in. ;) John W. Colby www.ColbyConsulting.com On 1/25/2011 6:23 PM, Arthur Fuller wrote: > ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, > sorry:) > Arthur > > On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: > >> Well this is annoying. It seems I deleted the user that I created the >> instance of sql server with SSMS Security Logins object. Now I have no >> authority to do anything. >> >> Is there a way to put it back in? I tried to create it over again but I >> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >> can't even see the properties of that user, even though that is me... >> >> I think... >> >> Am I just screwed? >> >> Can I even delete the server instance? >> >> Luckily I wasn't all that far along in defining databases but I have >> probably a dozen hours involved in two specific databases. >> >> -- >> 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 Tue Jan 25 18:17:01 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 25 Jan 2011 16:17:01 -0800 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3F65E4.70401@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3F65E4.70401@colbyconsulting.com> Message-ID: <-480677922828379142@unknownmsgid> Had a weird issue with a db from an operating system we use here, the db is 2005 express my coworker loaded the ss2008 management studio and he was unable to manage the db, he then installed ss2005 and all went well. I hadn't ran into that issue, just curious if you had a similar issue... Sent from my mobile On Jan 25, 2011, at 4:08 PM, jwcolby wrote: > LOL, yep, pretty darned funny *after* I figured out how to get back in. > > ;) > > John W. Colby > www.ColbyConsulting.com > > On 1/25/2011 6:23 PM, Arthur Fuller wrote: >> ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, >> sorry:) >> Arthur >> >> On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: >> >>> Well this is annoying. It seems I deleted the user that I created the >>> instance of sql server with SSMS Security Logins object. Now I have no >>> authority to do anything. >>> >>> Is there a way to put it back in? I tried to create it over again but I >>> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >>> can't even see the properties of that user, even though that is me... >>> >>> I think... >>> >>> Am I just screwed? >>> >>> Can I even delete the server instance? >>> >>> Luckily I wasn't all that far along in defining databases but I have >>> probably a dozen hours involved in two specific databases. >>> >>> -- >>> 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 jwcolby at colbyconsulting.com Tue Jan 25 20:54:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 25 Jan 2011 21:54:42 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <-480677922828379142@unknownmsgid> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3F65E4.70401@colbyconsulting.com> <-480677922828379142@unknownmsgid> Message-ID: <4D3F8CF2.4060604@colbyconsulting.com> Not specifically. I did have an issue where I could not install SQL Server 2008 because the server was Windows 2000 and it can't use the .net version required. SQL Server 2005 runs just fine. John W. Colby www.ColbyConsulting.com On 1/25/2011 7:17 PM, Francisco Tapia wrote: > Had a weird issue with a db from an operating system we use here, the > db is 2005 express my coworker loaded the ss2008 management studio and > he was unable to manage the db, he then installed ss2005 and all went > well. > > I hadn't ran into that issue, just curious if you had a similar issue... > > Sent from my mobile > > On Jan 25, 2011, at 4:08 PM, jwcolby wrote: > >> LOL, yep, pretty darned funny *after* I figured out how to get back in. >> >> ;) >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 1/25/2011 6:23 PM, Arthur Fuller wrote: >>> ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, >>> sorry:) >>> Arthur >>> >>> On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: >>> >>>> Well this is annoying. It seems I deleted the user that I created the >>>> instance of sql server with SSMS Security Logins object. Now I have no >>>> authority to do anything. >>>> >>>> Is there a way to put it back in? I tried to create it over again but I >>>> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >>>> can't even see the properties of that user, even though that is me... >>>> >>>> I think... >>>> >>>> Am I just screwed? >>>> >>>> Can I even delete the server instance? >>>> >>>> Luckily I wasn't all that far along in defining databases but I have >>>> probably a dozen hours involved in two specific databases. >>>> >>>> -- >>>> 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 pcs.accessd at gmail.com Tue Jan 25 22:24:02 2011 From: pcs.accessd at gmail.com (Borge Hansen) Date: Wed, 26 Jan 2011 14:24:02 +1000 Subject: [dba-SQLServer] Change default backup destination and reduction of log file size Message-ID: I recently installed the web server version of SQL 2008 R2, and as part of installation I must have specified the default backup destination folder. I've restored three SQL 2005 DBs and all is good. I moved the backup destination folder though in the file / folder system. Now whenever I do a simple full backup the Management Studio is serving up the location of the old now non existing backup folder. Simple question: How and where do I change the default backup destination setting? Also, One Db has a mdf file of 750mb and the logfile is about 500mb. How do I reduce the size of the logfile? I thought that performing a simple full backup would automatically reduce the logfile. Thanks, borge From ab-mi at post3.tele.dk Wed Jan 26 04:29:07 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Wed, 26 Jan 2011 11:29:07 +0100 Subject: [dba-SQLServer] Change default backup destination and reduction of log file size In-Reply-To: References: Message-ID: <7682A8AF4B3A4592BD08BB824249BFCA@abpc> In SSMS rightclick the server name - choose Facets - then in BackupDirectory enter the destination folder. Notice that this will only be the default backup folder for databases you have not previously backed up - for previously backed up database you have to change the destination manually. As for reducing the log file you have to make a BACKUP LOG - a full database backup won't reduce the log file. Asger -----Oprindelig meddelelse----- Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af Borge Hansen Sendt: 26. januar 2011 05:24 Til: Discussion concerning MS SQL Server Emne: [dba-SQLServer] Change default backup destination and reduction of log file size I recently installed the web server version of SQL 2008 R2, and as part of installation I must have specified the default backup destination folder. I've restored three SQL 2005 DBs and all is good. I moved the backup destination folder though in the file / folder system. Now whenever I do a simple full backup the Management Studio is serving up the location of the old now non existing backup folder. Simple question: How and where do I change the default backup destination setting? Also, One Db has a mdf file of 750mb and the logfile is about 500mb. How do I reduce the size of the logfile? I thought that performing a simple full backup would automatically reduce the logfile. Thanks, borge _______________________________________________ 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 Jan 26 16:18:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 26 Jan 2011 17:18:09 -0500 Subject: [dba-SQLServer] What SQL To Use In-Reply-To: <8ADF297DF43D4EF8BCECED9B8A29E953@HAL9005> References: <8ADF297DF43D4EF8BCECED9B8A29E953@HAL9005> Message-ID: There is a limit on the size of a given db in the express version. I don't rember exactly what it is, but I think it's 2GB. That may be enough for your small firm. Arthur On Fri, Dec 31, 2010 at 11:06 AM, Rocky Smolin wrote: > Thanks for the reply Mark. Best to you and the fam for the coming year. > > Rocky > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark > Breen > Sent: Friday, December 31, 2010 3:33 AM > To: Discussion concerning MS SQL Server > Subject: Re: [dba-SQLServer] What SQL To Use > > Hi Rocky, > > There are only rare occasions that you really need the paid for version of > SQL Server. > > I would be 99.99% sure you can use the free version. > > One thing that the free version is missing is the some of the > administration > tools for schedule jobs and other things. However, the wonderful world of > opensource provides those tools FOC also. > > I can think of no reason to use the paid for version at all. Even when you > have very large db's there are plenty of options to still use the free > version. > > Use Express and spend the money saved on handbags and Italian shoes for > ladies. It will bring you much more happiness than spending it on SQL > Server. > > Happy new year to you and your family > > Mark > > > > > On 30 December 2010 17:26, Rocky Smolin wrote: > > > Dear List: > > > > A client is upgrading his server. Currently he is using SQL Server > > Small Business 2003. He is looking at an upgrade to SQL Server Small > > Business > > 2008 but is also looking at a hefty license fee. > > > > He wants to know if SQL Server Express will do the job or if he'll > > have to upgrade to SQL Server Small Business 2008. > > > > This is a law firm with a max of 20 users - typical on-line is 13. > > > > I'm not SQL savvy. Does anyone know? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > Skype: rocky.smolin > > www.e-z-mrp.com > > www.bchacc.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 Thu Jan 27 10:54:56 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 27 Jan 2011 11:54:56 -0500 Subject: [dba-SQLServer] Is R2 the only (read official) edition now Message-ID: <4D41A360.5090609@colbyconsulting.com> Is SQL Server R2 the only thing sold now? I am trying to discover whether I can load SQL Server express 2008 on Windows XP (32 bit I think) and I immediately get dragged to a page about SQL Server 2008 R2. As if That is the version available now. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 30 15:53:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 30 Jan 2011 16:53:36 -0500 Subject: [dba-SQLServer] Hamachi VPN information Message-ID: <4D45DDE0.3060409@colbyconsulting.com> I use Hamachi a lot. I am trying to set up Hamachi VPNs specific to client groups, IOW a VPN for Lenoir Prison Ministry, a VPN for Forgiven Ministry, a group for FSN Hope, a group for C2DbInternal etc. What I did not really understand is that there are actually three types of networks. I am going to cut and paste the definitions from Hamachi's page just so that you can see what they have to say. http://help.logmein.com/SelfServiceSearchResults?kw=hub+and+spoke&product=lmihamachi2&sr=0 http://help.logmein.com/SelfServiceKnowledgeRenderer?type=Documentation&id=kA130000000Lu1YCAS&search=1&kw=hub%20and%20spoke * Gateway virtual networking: Provide remote users with secure access to your private network/LAN, including the resources on it, from a centralized LogMeIn Hamachi? gateway, without modifying firewalls or network routers. * Hub-and-spoke virtual networking: Provide remote users with secure access to specific resources on your network, from any location, without modifying firewalls or network routers. * Mesh networking: Connect all of your network clients to each other. Quickly and easily create a simple, virtual, mesh network that allows remote machines to directly connect to each other, thereby giving users basic network access to all the network resources they need. So, I wanted a private network for each client. I wanted a hub and spoke for each client because both of the other types (mesh and gateway) allow all computers to see each other. In most cases, these clients are a group of people who really don't want each other to see their shares etc. If you create a network from a client (as I did) instead of from the Hamachi Web page, then you automatically create a mesh network. Once you create a network from a client, I have never found a way to "connect" or subscribe that network into your online network management page. Bad news. So think carefully about the future and consider doing all of your network management from the web page. Essentially you create an Hamachi account which you can log in to. Once you do that you can create networks from that page, then send emails to people with invitations to join your networks. You get to "approve" the subscriptions. Because I had created all of my networks from the client on my laptop, they were all "mesh" networks, and everyone could see everyone. Even worse the visibility extended out of the network to other networks. Even worse than that, I started getting echos between the networks. IOW, because mu computer belonged to each of the mesg networks I would ping computers and get many different ping echos. If you are ever going to do a single network then fine (maybe) build it from one of the Hamachi clients. However if you ever anticipate doing multiple networks as I am doing, do yourself a favor and start from the Web page and always create your networks from there. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Wed Jan 5 12:00:15 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 05 Jan 2011 13:00:15 -0500 Subject: [dba-SQLServer] SQL Server security Message-ID: <4D24B1AF.3090800@colbyconsulting.com> I am having performance issues in a largish Access application, a Disability Insurance Claim call center app. I have one particular table which is not huge in terms of field count but it does have a lot of records and most of the fields are indexed, and it has about 800K records in it. This table holds "contact" info, as in phone calls that the users have. They document every "contact" with every one, claimants, doctors, lawyers, etc. into a memo field and also date of call, ClaimID FK, employee id FK, contact type id FK etc. Kind of a mini center of the universe for this application. The result is that people are storing new records in this table constantly throughout the day and we are getting a lot of "record locked..." issues caused by (AFAICT) the time it takes Jet to store the records and update all of the indexes, and probably the memo storage area of the mdb. Just to give a picture, this one table has been moved out to it's own mdb and that mdb is about 700 megabytes after a compact. Most of the rest of the database (150 tables) is in another mdb and after compact that database is 800 megabytes, so this one table is close to as big as the rest of the db. I do not have experience in a transactional database using SQL Server, but I am thinking that SQL Server express 2005 will not have an issue keeping up with this kind of usage - 25 users adding records to this table all day without causing locking issues like I am seeing now. My issue at this point is that they use a network logon and force the users to change their password every 30 days. Is SQL Server going to use that same network username / password database or does it use a list of usernames / passwords physically on the server itself? IOW will Windows authentication work or will I need to go to SQL Server username / password? -- John W. Colby www.ColbyConsulting.com From df.waters at comcast.net Wed Jan 5 12:17:18 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 5 Jan 2011 12:17:18 -0600 Subject: [dba-SQLServer] SQL Server security In-Reply-To: <4D24B1AF.3090800@colbyconsulting.com> References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 GB in Access might be larger in SQL Server - someone else probably knows. SQL Server 2008 R2 Express has a capacity of 10 Gb. Typing data into a memo field will lock one page of records, even if you're using Access 2000+ and have set your mdb for Record-Level Locking. Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, January 05, 2011 12:00 PM To: Sqlserver-Dba; VBA; Access Developers discussion and problem solving Subject: [dba-SQLServer] SQL Server security I am having performance issues in a largish Access application, a Disability Insurance Claim call center app. I have one particular table which is not huge in terms of field count but it does have a lot of records and most of the fields are indexed, and it has about 800K records in it. This table holds "contact" info, as in phone calls that the users have. They document every "contact" with every one, claimants, doctors, lawyers, etc. into a memo field and also date of call, ClaimID FK, employee id FK, contact type id FK etc. Kind of a mini center of the universe for this application. The result is that people are storing new records in this table constantly throughout the day and we are getting a lot of "record locked..." issues caused by (AFAICT) the time it takes Jet to store the records and update all of the indexes, and probably the memo storage area of the mdb. Just to give a picture, this one table has been moved out to it's own mdb and that mdb is about 700 megabytes after a compact. Most of the rest of the database (150 tables) is in another mdb and after compact that database is 800 megabytes, so this one table is close to as big as the rest of the db. I do not have experience in a transactional database using SQL Server, but I am thinking that SQL Server express 2005 will not have an issue keeping up with this kind of usage - 25 users adding records to this table all day without causing locking issues like I am seeing now. My issue at this point is that they use a network logon and force the users to change their password every 30 days. Is SQL Server going to use that same network username / password database or does it use a list of usernames / passwords physically on the server itself? IOW will Windows authentication work or will I need to go to SQL Server username / password? -- 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 Wed Jan 5 12:40:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 05 Jan 2011 13:40:09 -0500 Subject: [dba-SQLServer] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: <4D24BB09.1090906@colbyconsulting.com> Dan, > SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 GB in Access might be larger in SQL Server - someone else probably knows. Yep, and yep. Actually AFAICT the preliminary import of Access into SQL Server gives me a SQL Server database file that is slightly smaller than the compacted access be file. > SQL Server 2008 R2 Express has a capacity of 10 Gb. Yes, but it won't run on Windows 2000. SQL Server 2005 will. > Typing data into a memo field will lock one page of records, even if you're using Access 2000+ and have set your mdb for Record-Level Locking. Yep, one of many issues with Access as the sizes get larger. I am hoping that SQL Server express will solve these for me. John W. Colby www.ColbyConsulting.com On 1/5/2011 1:17 PM, Dan Waters wrote: > SQL Server 2005 Express has a capacity of 4 Gb. I think I remember that 1.5 > GB in Access might be larger in SQL Server - someone else probably knows. > > SQL Server 2008 R2 Express has a capacity of 10 Gb. > > Typing data into a memo field will lock one page of records, even if you're > using Access 2000+ and have set your mdb for Record-Level Locking. > > Dan > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Wednesday, January 05, 2011 12:00 PM > To: Sqlserver-Dba; VBA; Access Developers discussion and problem solving > Subject: [dba-SQLServer] SQL Server security > > I am having performance issues in a largish Access application, a Disability > Insurance Claim call > center app. > > I have one particular table which is not huge in terms of field count but it > does have a lot of > records and most of the fields are indexed, and it has about 800K records in > it. This table holds > "contact" info, as in phone calls that the users have. They document every > "contact" with every > one, claimants, doctors, lawyers, etc. into a memo field and also date of > call, ClaimID FK, employee > id FK, contact type id FK etc. Kind of a mini center of the universe for > this application. > > The result is that people are storing new records in this table constantly > throughout the day and we > are getting a lot of "record locked..." issues caused by (AFAICT) the time > it takes Jet to store the > records and update all of the indexes, and probably the memo storage area of > the mdb. > > Just to give a picture, this one table has been moved out to it's own mdb > and that mdb is about 700 > megabytes after a compact. Most of the rest of the database (150 tables) is > in another mdb and > after compact that database is 800 megabytes, so this one table is close to > as big as the rest of > the db. > > I do not have experience in a transactional database using SQL Server, but I > am thinking that SQL > Server express 2005 will not have an issue keeping up with this kind of > usage - 25 users adding > records to this table all day without causing locking issues like I am > seeing now. > > My issue at this point is that they use a network logon and force the users > to change their password > every 30 days. Is SQL Server going to use that same network username / > password database or does it > use a list of usernames / passwords physically on the server itself? IOW > will Windows > authentication work or will I need to go to SQL Server username / password? > From fhtapia at gmail.com Wed Jan 5 13:41:23 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 5 Jan 2011 11:41:23 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: <4D24B1AF.3090800@colbyconsulting.com> References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: -Francisco http://bit.ly/sqlthis | Tsql and More... On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: > > I do not have experience in a transactional database using SQL Server, but > I am thinking that SQL Server express 2005 will not have an issue keeping up > with this kind of usage - 25 users adding records to this table all day > without causing locking issues like I am seeing now. > It's been a while since I did a conversion, I don't remember if you need to make all your fields varchar or nvarchar, but that's the gist. I remember also going unbound to simplify the data entry process, but ymmv with that piece of advise. We have SQL Server running in the backend for many of our transactional systems and we have > than 25 users all w/o locking problems. My issue at this point is that they use a network logon and force the users > to change their password every 30 days. Is SQL Server going to use that > same network username / password database or does it use a list of usernames > / passwords physically on the server itself? IOW will Windows > authentication work or will I need to go to SQL Server username / password? Windows Authentication will work just fine. To simplify the user to server problem, you'd want the network admin to add your users who have access to the application to a specific domain group... then just give access to the domain group. You can even put security around who has access to what based on domain group, works a treat. If you have too much difficulty with that you can always fall back to sql authentication, but I always prefer windows authentication except for the web apps we have... From jlawrenc1 at shaw.ca Wed Jan 5 13:59:06 2011 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Wed, 5 Jan 2011 11:59:06 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: A nice new blog you have there fransico. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia Sent: Wednesday, January 05, 2011 11:41 AM To: Discussion concerning Visual Basic and related programming issues. Cc: Sqlserver-Dba; Access Developers discussion and problem solving Subject: Re: [dba-SQLServer] [dba-VB] SQL Server security -Francisco http://bit.ly/sqlthis | Tsql and More... On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: > > I do not have experience in a transactional database using SQL Server, but > I am thinking that SQL Server express 2005 will not have an issue keeping up > with this kind of usage - 25 users adding records to this table all day > without causing locking issues like I am seeing now. > It's been a while since I did a conversion, I don't remember if you need to make all your fields varchar or nvarchar, but that's the gist. I remember also going unbound to simplify the data entry process, but ymmv with that piece of advise. We have SQL Server running in the backend for many of our transactional systems and we have > than 25 users all w/o locking problems. My issue at this point is that they use a network logon and force the users > to change their password every 30 days. Is SQL Server going to use that > same network username / password database or does it use a list of usernames > / passwords physically on the server itself? IOW will Windows > authentication work or will I need to go to SQL Server username / password? Windows Authentication will work just fine. To simplify the user to server problem, you'd want the network admin to add your users who have access to the application to a specific domain group... then just give access to the domain group. You can even put security around who has access to what based on domain group, works a treat. If you have too much difficulty with that you can always fall back to sql authentication, but I always prefer windows authentication except for the web apps we have... _______________________________________________ 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 Wed Jan 5 14:50:33 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 5 Jan 2011 12:50:33 -0800 Subject: [dba-SQLServer] [dba-VB] SQL Server security In-Reply-To: References: <4D24B1AF.3090800@colbyconsulting.com> Message-ID: Thanks I'm going to be adding some new stuff soon On 1/5/11, Jim Lawrence wrote: > A nice new blog you have there fransico. > > Jim > > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco > Tapia > Sent: Wednesday, January 05, 2011 11:41 AM > To: Discussion concerning Visual Basic and related programming issues. > Cc: Sqlserver-Dba; Access Developers discussion and problem solving > Subject: Re: [dba-SQLServer] [dba-VB] SQL Server security > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > > > > > On Wed, Jan 5, 2011 at 10:00 AM, jwcolby wrote: >> >> I do not have experience in a transactional database using SQL Server, but >> I am thinking that SQL Server express 2005 will not have an issue keeping > up >> with this kind of usage - 25 users adding records to this table all day >> without causing locking issues like I am seeing now. >> > > It's been a while since I did a conversion, I don't remember if you need to > make all your fields varchar or nvarchar, but that's the gist. I remember > also going unbound to simplify the data entry process, but ymmv with that > piece of advise. We have SQL Server running in the backend for many of our > transactional systems and we have > than 25 users all w/o locking problems. > > My issue at this point is that they use a network logon and force the users >> to change their password every 30 days. Is SQL Server going to use that >> same network username / password database or does it use a list of > usernames >> / passwords physically on the server itself? IOW will Windows >> authentication work or will I need to go to SQL Server username / > password? > > > Windows Authentication will work just fine. To simplify the user to server > problem, you'd want the network admin to add your users who have access to > the application to a specific domain group... then just give access to the > domain group. You can even put security around who has access to what based > on domain group, works a treat. If you have too much difficulty with that > you can always fall back to sql authentication, but I always prefer windows > authentication except for the web apps we have... > _______________________________________________ > 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 > > -- Sent from my mobile device -Francisco http://bit.ly/sqlthis | Tsql and More... From jwcolby at colbyconsulting.com Fri Jan 7 23:01:31 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 08 Jan 2011 00:01:31 -0500 Subject: [dba-SQLServer] Access - link to SQL database -Database not showing Message-ID: <4D27EFAB.5040200@colbyconsulting.com> I have installed SQL Server 2005 on a (remote) Windows 2000 server machine at the client. From my workstation at the client I then open SQL Server MSExpress 2005 and I can see that SQL Server Express instance and two databases that I created on that SQL Server Express instance. From Access I try to link to a table in one of those databases. When I get to the wizard page where I am allowed to change the default database, I cannot see either of the two databases that I need to get at, only the master, msdb and tempdb. I was having a problem where I could not connect and had to open the surface configuration and allow remote connections. I selected TCP AND named pipes. That allowed MSE to see that server as well as Access to see that server, but it does not yet allow me to see the actual database of interest. Any clue why? I have done this before here at my office and I could always see the databases. TIA, -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 7 23:06:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 08 Jan 2011 00:06:11 -0500 Subject: [dba-SQLServer] Further to "can's see SQL Server database... Message-ID: <4D27F0C3.2030206@colbyconsulting.com> I went back in with MSE and looked at that server. While I can see the databases of interest, if I click on them and try to see the tables inside, I get an error "the database DISCO is not available" and the plus symbol in front of the database disappears. So I can see that the db exists but not actually access it (from my workstation). I can see and open the database from MSE on the server itself. Is this an ownership / rights kind of issue? I am not getting an actual error number from my workstation, just an "not available" generic kind of message. If it is ownership / rights, how do I go about discovering how to fix it? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 13:25:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 14:25:11 -0500 Subject: [dba-SQLServer] Help... SQL Server Security Message-ID: <4D2A0B97.4080504@colbyconsulting.com> I have always used Windows Security for SQL Server because the servers are all mine, and I am the only one using them. Now things change and I need to allow people who are unknown to me access a server on a VM I have created just for this task. Which means I have to learn SQL Server security. My understanding is that for this specific requirement I need to go to a user / role model administered within SQL Server and checked by sql server. I have two scenarios for now. Scenario one: A small group of perhaps 4 or 5 users who belong to Lenoir Prison Ministries and who will use the database to maintain and utilize a volunteer database. Scenario two: A small group of perhaps 5-10 employees of a non-profit called Family Support network who will enter information about their contacts with families of children with disabilities. So, two distinct databases, which need to be only accessed by a specific small set of people. In both cases, the load will be small, probably only one or two people in the db at a time, probably only for a short period of time. I have set up a Hamachi VPN and a private network on a Virtual Machine which will be dedicated to these two databases. I have a SQL Server 2008 express instance running on this VM. My concept is that I will assist each user in setting up the Hamachi and getting connected to the VPN, and then probably have them download a run-time over the vpn. Haven't figured all that out yet but I will. What I specifically need help with is setting up SQL server security such that these people aren't Windows users but just SQL Server users. I am trying to find something that will walk me through setting up the groups and users, and then allow me to actually test this. Any suggested (internet) reading or even an email that walks me through it would be much appreciated. Thanks, -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 14:27:47 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 15:27:47 -0500 Subject: [dba-SQLServer] Microsoft SQL Server - Lesson 02: Microsoft SQL Server Installation Message-ID: <4D2A1A43.2080205@colbyconsulting.com> I found this on the web. Lesson 3 is setting up the networking and such. The only problem is I do not know what it is doing. But I am following the directions... -- John W. Colby www.ColbyConsulting.com http://www.functionx.com/sqlserver/Lesson02.htm From jwcolby at colbyconsulting.com Sun Jan 9 14:53:39 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 15:53:39 -0500 Subject: [dba-SQLServer] Security - creating users Message-ID: <4D2A2053.4010703@colbyconsulting.com> I am following along in the How-To I posted earlier, and when I get to the section for creating users it says that every user we are about to set up has to have a windows user. This can't possible be true since millions of people out there on the internet use SQL Server every day and nobody is creating a login for them. Besides I am having to duplicate this inside of SQL Server? Setting up a windows user / password and then setting up a SQL server user / password. How does this really work. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sun Jan 9 15:09:53 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 10 Jan 2011 07:09:53 +1000 Subject: [dba-SQLServer] Security - creating users In-Reply-To: <4D2A2053.4010703@colbyconsulting.com> References: <4D2A2053.4010703@colbyconsulting.com> Message-ID: <4D2A2421.10642.13BF17BC@stuart.lexacorp.com.pg> That is only the case if you are using Windows Authentication. If you are using SQL Server Authentication, it is up to you how many different useers you create. You can have multiple people connect using the same "username" at the same time. Are you talking about a web application here or your own application connecting to the SQL Server over the internet? In the case of a web application, You just create one user called "webaccess" or something like that. Your web application connects to SQL Server under that username, you don't need credentials for individual people accessing the website. For your own application, it's up to you how you want to handle tracking actually users and authenticating allowed actions you can create as many "users" as you need. -- Stuart On 9 Jan 2011 at 15:53, jwcolby wrote: > I am following along in the How-To I posted earlier, and when I get to > the section for creating users it says that every user we are about > to set up has to have a windows user. This can't possible be true > since millions of people out there on the internet use SQL Server > every day and nobody is creating a login for them. Besides I am > having to duplicate this inside of SQL Server? Setting up a windows > user / password and then setting up a SQL server user / password. > > How does this really work. > > -- > 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 accessd at shaw.ca Sun Jan 9 15:51:43 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 9 Jan 2011 13:51:43 -0800 Subject: [dba-SQLServer] Upsizing In-Reply-To: <4D2A0B97.4080504@colbyconsulting.com> References: <4D2A0B97.4080504@colbyconsulting.com> Message-ID: Hi All: I know that Upsizing has been discussed at certain points but I now have to do a quick and dirty upgrade before I can seriously translate a site to ADO-OLE. Right now the client has an Access2003 application sitting on a Windows Server 2003 or 2008 (not sure yet). There is a SQL Server 2005 on the computer. Due to some bizarre unstable connection issues we have to move things up and quickly. The current application is broken into FE and BE. 1. Should the FE and BE be merged before running the upsizing or not? 2. Will all the queries and reports have to be manually updated? 3. Is there anyway to modify the Upsize generated SQL connections to point to another SQL server? 4. Is there a better way to do this process than using the Upsize wizard? 5. Is there any other issues that should be handled or looked out for? TIA Jim From jwcolby at colbyconsulting.com Sun Jan 9 22:27:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 09 Jan 2011 23:27:26 -0500 Subject: [dba-SQLServer] SQL Server Security - Some success Message-ID: <4D2A8AAE.2090203@colbyconsulting.com> OK, I manually created a jwcolby user and gave it rights to see the Caldwell prison ministries database, then I could see the db but not do anything with it. I then manually assigned db_datareader and db_datawriter and voila, data. So I am happy that I at least am seeing data. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 9 23:07:39 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Jan 2011 00:07:39 -0500 Subject: [dba-SQLServer] Read only rights Message-ID: <4D2A941B.2050202@colbyconsulting.com> I created two users to test the rights I assigned and how they function, straight in SQL Server. One is read and one is read and write. The read / write operates as expected, however the read only allowed me to modify but not save the modifications. Somehow I expected the query to be readonly. Again this was directly in a SQL Server table, logged in to SSMS through that user. I expect the same results once I get to getting at the data from Access. Is there a way to prevent even the appearance of modifying the data if the user is read only? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sun Jan 9 23:15:28 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 10 Jan 2011 15:15:28 +1000 Subject: [dba-SQLServer] Read only rights In-Reply-To: <4D2A941B.2050202@colbyconsulting.com> References: <4D2A941B.2050202@colbyconsulting.com> Message-ID: <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> I don't expect the same results in Access :-) The query is Read Only, the problem is with your display interface. The SSMS interface doesn't retreive any information about the R/W status of the data that its displaying so it doesn't stop you from modify the *displayed* data. Access forms are smarter and lock the displayed data if it is RO. -- Stuart On 10 Jan 2011 at 0:07, jwcolby wrote: > I created two users to test the rights I assigned and how they > function, straight in SQL Server. One is read and one is read and > write. > > The read / write operates as expected, however the read only allowed > me to modify but not save the modifications. Somehow I expected the > query to be readonly. > > Again this was directly in a SQL Server table, logged in to SSMS > through that user. > > I expect the same results once I get to getting at the data from > Access. Is there a way to prevent even the appearance of modifying > the data if the user is read only? > > -- > 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 Sun Jan 9 23:50:50 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Jan 2011 00:50:50 -0500 Subject: [dba-SQLServer] Read only rights In-Reply-To: <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> References: <4D2A941B.2050202@colbyconsulting.com> <4D2A95F0.4760.523BB9@stuart.lexacorp.com.pg> Message-ID: <4D2A9E3A.9090508@colbyconsulting.com> OK, that would be a good thing! Thanks for the reply! Boy am I learning stuff on this project!!! John W. Colby www.ColbyConsulting.com On 1/10/2011 12:15 AM, Stuart McLachlan wrote: > I don't expect the same results in Access :-) > > The query is Read Only, the problem is with your display interface. > > The SSMS interface doesn't retreive any information about the R/W status of the data that its > displaying so it doesn't stop you from modify the *displayed* data. > > Access forms are smarter and lock the displayed data if it is RO. > From jwcolby at colbyconsulting.com Tue Jan 11 07:39:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Jan 2011 08:39:19 -0500 Subject: [dba-SQLServer] Contiguous Time Periods Message-ID: <4D2C5D87.7010800@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.simple-talk.com/sql/t-sql-programming/contiguous-time-periods/?utm_source=simpletalk&utm_medium=email-main&utm_content=TimePeriods-20101130&utm_campaign=SQL From Gustav at cactus.dk Tue Jan 11 10:53:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Jan 2011 17:53:20 +0100 Subject: [dba-SQLServer] Contiguous Time Periods Message-ID: Hi John Thanks, this is always an interesting topic, but I don't understand why he waits so long introducing the option of using the id of the previous time recording as the foreign key in a self-referencing table. And by using dates only in favour of timestamps, he enables all sorts of errors which could be cut off if time was included. But I'm not a T-SQL guy and probably never will be. I prefer to keep this sort of mechanics outside the database and not write anything until properly validated. /gustav >>> jwcolby at colbyconsulting.com 11-01-2011 14:39 >>> -- John W. Colby www.ColbyConsulting.com http://www.simple-talk.com/sql/t-sql-programming/contiguous-time-periods/?utm_source=simpletalk&utm_medium=email-main&utm_content=TimePeriods-20101130&utm_campaign=SQL From jwcolby at colbyconsulting.com Tue Jan 11 11:48:17 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Jan 2011 12:48:17 -0500 Subject: [dba-SQLServer] Contiguous Time Periods In-Reply-To: References: Message-ID: <4D2C97E1.3010404@colbyconsulting.com> To be honest, I scanned the whole thing quickly, thinking the whole time about the validation function that you wrote / helped write. I'm thinking that this is about doing millions of records where you need the speed of SQL Server to get it to work at all. John W. Colby www.ColbyConsulting.com On 1/11/2011 11:53 AM, Gustav Brock wrote: > Hi John > > Thanks, this is always an interesting topic, but I don't understand why he waits so long introducing the option of using the id of the previous time recording as the foreign key in a self-referencing table. And by using dates only in favour of timestamps, he enables all sorts of errors which could be cut off if time was included. > > But I'm not a T-SQL guy and probably never will be. I prefer to keep this sort of mechanics outside the database and not write anything until properly validated. > > /gustav > > >>>> jwcolby at colbyconsulting.com 11-01-2011 14:39>>> > From jwcolby at colbyconsulting.com Sat Jan 15 17:37:00 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Jan 2011 18:37:00 -0500 Subject: [dba-SQLServer] SQL Server over Hamachi: First test not hopeful Message-ID: <4D322F9C.8090405@colbyconsulting.com> I developed a SQL Server database, with perhaps 10-15 tables, populated a few with just a handful of records, created an Access database and built a few forms. My strategy is to do Access because I can do it quickly, but link it to SQL Server, the run the FE on a remote computer over Hamachi. Tonight I went to a local Arby's to test the speed of the system. The local Arby's has an open wifi, which using Speedtest.net tested 5 mbit down, 1 mbit up - typical low end cable in my area. So I tried to use the system and... well... it took an extremely long time to connect, if it connected at all. Access mostly timed out trying to log on. SQL Server Management System would log on sometimes. Sometimes not. Trying to hit it at the actual Hamachi IP address worked but took awhile. 15 - 30 seconds to connect (I did not time it). To be honest I am puzzled. Google finds plenty of folks trying this, some succeeding, most pretty slow. Remote desktop is plenty fast. From inside of my office, out across the internet via Hamachi I have done things like file transfers etc (in the past). Remote desktop has always been very speedy, but there isn't much needed for RD. I had really expected faster connections / operation. I really expected SSMS to just work, pretty much at speed. It didn't. Sigh, back to the drawing boards. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 16 21:21:26 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 16 Jan 2011 22:21:26 -0500 Subject: [dba-SQLServer] Access to SQL Server over Hamachi - it WORKS Message-ID: <4D33B5B6.1050102@colbyconsulting.com> Today I stepped back and set it all up internal to my network. Yesterday I had moved the Fe to my laptop. Today I deleted all of my linked tables, then I relinked all of the tables. In doing so I created a new DSN where I hit the SQL Server directly at the Hamachi IP address. Relinked using this new DSN and voila, she's a wurkin, and lightning fast over my internal network but forcing the traffic through Hamachi. So I tested a bit, then went back out to the local Arby's where I was pretty much unable to do anything last night (other than browse the internet). Got right on the connection, opened the Access FE and voila, she's a wurkin, and lightning fast. You wouldn't know you weren't directly on my LAN. Access on my laptop over Hamachi, over a public network, in to my network, directly into a Virtual Machine over Hamachi, running SQL Server 2008 Express. I am so jazzed! that leaves me with one technical barrier now, getting an Access 2007 run-time to host an Access 2003 FE. Now I need to set up a VM to run on my laptop so that I can have an environment without Office installed. Install the Access 2007 run-time and drop the Access 2003 Fe in place. Set up Hamachi on that VM and then get it all playing nice. This will allow me to take my laptop on the road to demo the system. We shall see. And yes Jim, I understand I still need to cause SQL Server to do the heavy lifting. To this point I have never really used SQL Server as the BE for Access. My biggest client uses Access 2K and it doesn't really play nice with ADO. Since I can now develop these new databases in 2003, I can do things like bind the form to an ADO recordset and still have it read/write. I will need to learn how to use a stored procedure were I can pass in a PK and have the SP return a table of data already selected and sorted. I.e. SQL Server doing the lifting. The nice thing is that these are small databases so I can do things like leave the list tables just linked, at least for awhile while I learn all the stuff I have never had to do. Next up, 2007 run-time. -- John W. Colby www.ColbyConsulting.com From paul.hartland at googlemail.com Fri Jan 21 02:08:13 2011 From: paul.hartland at googlemail.com (Paul Hartland) Date: Fri, 21 Jan 2011 08:08:13 +0000 Subject: [dba-SQLServer] Transfering SSRS 2005 Reports To SSRS 2008 On A New Server Message-ID: To all, We have lots of reports on our current server using SSRS 2005, over the Christmas period we had a new server and installed SQL Server 2008 and SSRS 2008. Yesterday after a bit of reading up from good old Google I tried to move all the reports across to SSRS 2008 I backed up Reportsever and ReportServerTempDB from the old server using the COPY_ONLY and also backed up the encryption keys. I restored the ReportServer and ReportServerTempDB databases to the SQL Server 2008, I then went into report server configuration manager and restored the encryption keys. I then opened a browser and entered the URL for the reports, hey presto all the folders and reports etc were there, so far so good. Unfortunately when I now try to open any of the reports I get an error message saying that the data source 'our_data_source' cannot be found. It looks like the data source name which on the existing SSRS 2005 had spaces in has been replaced with underscores at some point during the transfer. I tried creating a new data source and pointing a report which I was testing to the new data source, but when I ran the report I still got the same error message. Has anyone came across this before, if so any ideas on how I can rectify this ? Many thanks in advance for any help on this. -- Paul Hartland paul.hartland at googlemail.com From davidmcafee at gmail.com Fri Jan 21 13:59:51 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 21 Jan 2011 11:59:51 -0800 Subject: [dba-SQLServer] Is there a better way to do this? Message-ID: Is there a better way to do this? IF (@ChangeKey IN(0,1,2,3,4,5,8,9,10,11,12,13)) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart >@OldEnd) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewEnd <@OldStart) BEGIN --Do a bunch of stuff here END ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart <@OldStart AND @NewEnd >@OldEnd) BEGIN --Do a bunch of stuff here END From jwcolby at colbyconsulting.com Sat Jan 22 10:16:02 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 22 Jan 2011 11:16:02 -0500 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security Message-ID: <4D3B02C2.1010909@colbyconsulting.com> What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- John W. Colby www.ColbyConsulting.com From jlawrenc1 at shaw.ca Sat Jan 22 15:32:29 2011 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Sat, 22 Jan 2011 13:32:29 -0800 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D3B02C2.1010909@colbyconsulting.com> References: <4D3B02C2.1010909@colbyconsulting.com> Message-ID: Hi John: Basically, you can limit the users that have access to your SQL server by creating a group of people with the same rights on the hosting server. Start > Administration tools > Computer Management > Local Users and Groups. First create the new users and then create a group and add all the new users. Make sure to add good passwords to each or force them to change upon initial entry, set the strength of the password and the password's duration through your selected policy... minimum 12 characters, mixture of numbers and letters, upper and lower case and additional special characters would be my starting point. Then in the Microsoft SQL Server Management Studio. The appropriate SQL Server > Databases > the database of choice > Security > Users > enter the Group and then set all their access privileges. When completed a certain group of users accessing the MS SQL server, via the sites IP address through port 1433, to the hosting server, will be challenged for their user names and passwords to gain access to a particular database, with limited rights. If the hosting server (the one with the MS SQL server in it) is the only external access point then go into your router, make sure port 1433 is open and (virtual) direct via your internal IP addressing to that hosting server. Note: If you have multiple MS SQL servers running on various servers then you can change the default listening port in each MS SQL. (Can not remember how to do that but it should be easy to look up. Check the following link out) http://www.databasejournal.com/features/mssql/article.php/3689846/Using-Non- Standard-Port-for-SQL-Server.htm This should be all handled from your users FE application. The last items that might be useful is first open notepad, create a text file with any name with an extension of UDL. Then go in an experiment until you correctly connect to your SQL server and when done, change the extension to TXT and cut and paste the displayed link into your users FE application. (Remember if you change the listening port that will have to be appropriately set.) There are few more things I have undoubtedly over-looked or forgotten but that's the basics and I am sure some of the gurus on this site will correct me or fill in the details. HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, January 22, 2011 8:16 AM To: Sqlserver-Dba; VBA Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- 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 ab-mi at post3.tele.dk Sat Jan 22 18:06:56 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sun, 23 Jan 2011 01:06:56 +0100 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D3B02C2.1010909@colbyconsulting.com> References: <4D3B02C2.1010909@colbyconsulting.com> Message-ID: <4D26495788244688A0AE7D8856B23C1E@abpc> John, To use Active Directory your server needs to be set up as a Domain Controller. In that case your procedure is correct and should work. Since it doesn't work I would suppose your server isn't set up as a Domain Controller. I'm not a system administrator guy and can't help on this topic. But maybe others on the list can? What's puzzling me however is that you are in fact able to access your DiscoSvr\SQLExpress from the workstation. This indicates that your workstation login is validated successfully against the SQL Server on the server DiscoSvr. Something spooky going on here... Asger -----Oprindelig meddelelse----- Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af jwcolby Sendt: 22. januar 2011 17:16 Til: Sqlserver-Dba; VBA Emne: [dba-SQLServer] How do I troubleshoot SQL Server Security What I want to do: Create an instance of SQL Server running on a specific server, and somehow magically allow a specific set of users logged in to the "system" (not necessarily that server) to access the server. AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network and do not really understand how it works. In any event it appears that I am going to have to use Active Directory in the SQL Server login? What I tried to do: On the server (windows 2000) I: 1) Created a windows security group DISUsers 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express database, including my user. 3) In SQL Server 2005 Express SSMS at the server level I clicked security login 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers 5) I checked that the login had the public server role (and only that role) 6) I went into the DISCO database and clickde SDecurity / Users 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) 7) I checked the Role members db_DataReader and db_DataWriter I saved all of the above. I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. I can see the database object and I can see a + symbol but if I try to expand the database to see the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database "Disco" under the current Security Context: SQL Server Error 916" I do not understand network security, but AFAICT what is happening is that I am logging in to a network (Active Directory) login (which all users do) but I have just set up SQL Server on that server to use a group / users specific to that server. So is it possible to use a similar method to manipulate SQL Server with active directory groups / users? How is that done. -- 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 Jan 22 21:03:43 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 22 Jan 2011 22:03:43 -0500 Subject: [dba-SQLServer] How do I troubleshoot SQL Server Security In-Reply-To: <4D26495788244688A0AE7D8856B23C1E@abpc> References: <4D3B02C2.1010909@colbyconsulting.com> <4D26495788244688A0AE7D8856B23C1E@abpc> Message-ID: <4D3B9A8F.8050801@colbyconsulting.com> They have a domain controller somewhere. This server is not it. From what can tell I was banging against the DiscoSvr's user / group validation rather than the domain controller's group / user validation. John W. Colby www.ColbyConsulting.com On 1/22/2011 7:06 PM, Asger Blond wrote: > John, > To use Active Directory your server needs to be set up as a Domain Controller. In that case your procedure is correct and should work. > Since it doesn't work I would suppose your server isn't set up as a Domain Controller. I'm not a system administrator guy and can't help on this topic. But maybe others on the list can? > What's puzzling me however is that you are in fact able to access your DiscoSvr\SQLExpress from the workstation. This indicates that your workstation login is validated successfully against the SQL Server on the server DiscoSvr. Something spooky going on here... > > Asger > > -----Oprindelig meddelelse----- > Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af jwcolby > Sendt: 22. januar 2011 17:16 > Til: Sqlserver-Dba; VBA > Emne: [dba-SQLServer] How do I troubleshoot SQL Server Security > > What I want to do: > > Create an instance of SQL Server running on a specific server, and somehow magically allow a > specific set of users logged in to the "system" (not necessarily that server) to access the server. > > AFAIK Users log in to Active Directory. I do not use Active Directory on my home / business network > and do not really understand how it works. In any event it appears that I am going to have to use > Active Directory in the SQL Server login? > > What I tried to do: > > On the server (windows 2000) I: > > 1) Created a windows security group DISUsers > 2) Added most of the normal users of the computer, all of which will use the SQL Server 2005 Express > database, including my user. > 3) In SQL Server 2005 Express SSMS at the server level I clicked security login > 4) I created a login DiscoServer and I assigned that to the group DiscoSvr\DiscoUsers > 5) I checked that the login had the public server role (and only that role) > 6) I went into the DISCO database and clickde SDecurity / Users > 7) I created a DiscoUsers user assigned to the DiscoSvr\DiscoUsers object (group) > 7) I checked the Role members db_DataReader and db_DataWriter > > I saved all of the above. > > I then go to my workstation, log in, open ssms and select DiscoSvr\SQLExpress. > > I can see the database object and I can see a + symbol but if I try to expand the database to see > the objects I get a very generic error message "DispecLLC\jcolby is not able to access the database > "Disco" under the current Security Context: SQL Server Error 916" > > I do not understand network security, but AFAICT what is happening is that I am logging in to a > network (Active Directory) login (which all users do) but I have just set up SQL Server on that > server to use a group / users specific to that server. > > So is it possible to use a similar method to manipulate SQL Server with active directory groups / > users? How is that done. > From jwcolby at colbyconsulting.com Sat Jan 22 23:07:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 00:07:52 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in Message-ID: <4D3BB7A8.30103@colbyconsulting.com> Well this is annoying. It seems I deleted the user that I created the instance of sql server with SSMS Security Logins object. Now I have no authority to do anything. Is there a way to put it back in? I tried to create it over again but I cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I can't even see the properties of that user, even though that is me... I think... Am I just screwed? Can I even delete the server instance? Luckily I wasn't all that far along in defining databases but I have probably a dozen hours involved in two specific databases. -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jan 22 23:52:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 23 Jan 2011 15:52:59 +1000 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BB7A8.30103@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> When you delete a use and create a new one with the same name, that is NOT the same user. It has a different Security ID (SID). You will need to give rights to the new user all over again. One solution would be to shut down the SQL Server service, backup the database files then create a new instance and attach the databases to it. -- Stuart On 23 Jan 2011 at 0:07, jwcolby wrote: > Well this is annoying. It seems I deleted the user that I created the > instance of sql server with SSMS Security Logins object. Now I have > no authority to do anything. > > Is there a way to put it back in? I tried to create it over again but > I cannot seem to do so. In fact I recreated the vmDev\jwcolby user > but I can't even see the properties of that user, even though that is > me... > > I think... > > Am I just screwed? > > Can I even delete the server instance? > > Luckily I wasn't all that far along in defining databases but I have > probably a dozen hours involved in two specific databases. > > -- > 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 Sun Jan 23 07:01:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 08:01:52 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg> Message-ID: <4D3C26C0.50402@colbyconsulting.com> I can't even do a backup. It gives me a "login failed - error 4064" John W. Colby www.ColbyConsulting.com On 1/23/2011 12:52 AM, Stuart McLachlan wrote: > When you delete a use and create a new one with the same name, that is NOT the same > user. It has a different Security ID (SID). > > You will need to give rights to the new user all over again. > > One solution would be to shut down the SQL Server service, backup the database files then > create a new instance and attach the databases to it. > From stuart at lexacorp.com.pg Sun Jan 23 07:33:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 23 Jan 2011 23:33:41 +1000 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C26C0.50402@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> Message-ID: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy the database files somewhere else for safety. -- Stuart On 23 Jan 2011 at 8:01, jwcolby wrote: > I can't even do a backup. It gives me a "login failed - error 4064" > > John W. Colby > www.ColbyConsulting.com > > On 1/23/2011 12:52 AM, Stuart McLachlan wrote: > > When you delete a use and create a new one with the same name, that > > is NOT the same user. It has a different Security ID (SID). > > > > You will need to give rights to the new user all over again. > > > > One solution would be to shut down the SQL Server service, backup > > the database files then create a new instance and attach the > > databases to it. > > > _______________________________________________ > 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 Jan 23 10:47:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 11:47:24 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C5B9C.7090702@colbyconsulting.com> Ahh.... John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From jwcolby at colbyconsulting.com Sun Jan 23 14:12:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 15:12:25 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C8BA9.501@colbyconsulting.com> Well, this is getting ugly. It seems that the SQL Server Express I had installed is R2. I installed a full on 2008 but it was not R2. Because the database was created in R2 it can't be opened in non-R2. Nothing is ever simple. John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From jwcolby at colbyconsulting.com Sun Jan 23 14:31:41 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 23 Jan 2011 15:31:41 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> References: <4D3BB7A8.30103@colbyconsulting.com>, <4D3BC23B.27165.9855301@stuart.lexacorp.com.pg>, <4D3C26C0.50402@colbyconsulting.com> <4D3C2E35.1870.B2B1E82@stuart.lexacorp.com.pg> Message-ID: <4D3C902D.6070403@colbyconsulting.com> Stuart, It seems that I was previously logging on and doing things as my windows login user. When I shut down the SQL Server express instance, the next time i tried to log in to that instance, I was unable to do so because of the "unknown user" issue. I tried to log in using the SQL Server security as the sa user and voila, I am in and able to see the databases. Now... I just installed full on SQL Server 2008 to this machine. It is the developer edition which acts like the enterprise edition - full compression and everything. But the Express edition does not allow that stuff. Apparently the express version is R2 and it is what I developed these databases in. The dev version I own is non-R2 and can't open the databases created by the Express (R2) version. I found something on the internet saying that I would have to "export backwards" whatever that means. I also have to get ownership or access valid to users or groups other than sa. John W. Colby www.ColbyConsulting.com On 1/23/2011 8:33 AM, Stuart McLachlan wrote: > I didn't mean a backup in SQL Server, that's why I said shut down the service first. Just copy > the database files somewhere else for safety. > From marklbreen at gmail.com Tue Jan 25 02:53:38 2011 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 25 Jan 2011 08:53:38 +0000 Subject: [dba-SQLServer] Is there a better way to do this? In-Reply-To: References: Message-ID: Hello David, two quick suggestions 1) read up on case statements and practice them a little, they might clean up the code 2) sometimes you can improve readability by creating a few neat userdefinted functions, they are as easy to create as a sproc and one written you could maybe restructure your code to read like if ufn_BasicChange() Begin --do stuff End if ufn_OtherTypeOfChange() Begin --do stuff End or alternately, you could combine both the case and the values you are playing with Case ufn_AllPossibileOptions(@NewDate) When 'Basic' then begin ............. end When 'Has No Date' then begin ............. end When 'Has A Date' then begin ............. end Else begin ............. end End Hope that is useful, John Colby thought me about how to use functions in 1998 so credit goes to him :) Mark On 21 January 2011 19:59, David McAfee wrote: > Is there a better way to do this? > > IF (@ChangeKey IN(0,1,2,3,4,5,8,9,10,11,12,13)) > > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart >@OldEnd) > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewEnd <@OldStart) > BEGIN > --Do a bunch of stuff here > END > ELSE IF (@ChangeKey IN(6,7,14,15) AND @NewStart <@OldStart AND @NewEnd > >@OldEnd) > BEGIN > --Do a bunch of stuff here > END > _______________________________________________ > 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 Tue Jan 25 17:23:25 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 25 Jan 2011 18:23:25 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3BB7A8.30103@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, sorry:) Arthur On Sun, Jan 23, 2011 at 12:07 AM, jwcolby wrote: > Well this is annoying. It seems I deleted the user that I created the > instance of sql server with SSMS Security Logins object. Now I have no > authority to do anything. > > Is there a way to put it back in? I tried to create it over again but I > cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I > can't even see the properties of that user, even though that is me... > > I think... > > Am I just screwed? > > Can I even delete the server instance? > > Luckily I wasn't all that far along in defining databases but I have > probably a dozen hours involved in two specific databases. > > -- > 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 Tue Jan 25 18:08:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 25 Jan 2011 19:08:04 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: References: <4D3BB7A8.30103@colbyconsulting.com> Message-ID: <4D3F65E4.70401@colbyconsulting.com> LOL, yep, pretty darned funny *after* I figured out how to get back in. ;) John W. Colby www.ColbyConsulting.com On 1/25/2011 6:23 PM, Arthur Fuller wrote: > ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, > sorry:) > Arthur > > On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: > >> Well this is annoying. It seems I deleted the user that I created the >> instance of sql server with SSMS Security Logins object. Now I have no >> authority to do anything. >> >> Is there a way to put it back in? I tried to create it over again but I >> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >> can't even see the properties of that user, even though that is me... >> >> I think... >> >> Am I just screwed? >> >> Can I even delete the server instance? >> >> Luckily I wasn't all that far along in defining databases but I have >> probably a dozen hours involved in two specific databases. >> >> -- >> 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 Tue Jan 25 18:17:01 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 25 Jan 2011 16:17:01 -0800 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <4D3F65E4.70401@colbyconsulting.com> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3F65E4.70401@colbyconsulting.com> Message-ID: <-480677922828379142@unknownmsgid> Had a weird issue with a db from an operating system we use here, the db is 2005 express my coworker loaded the ss2008 management studio and he was unable to manage the db, he then installed ss2005 and all went well. I hadn't ran into that issue, just curious if you had a similar issue... Sent from my mobile On Jan 25, 2011, at 4:08 PM, jwcolby wrote: > LOL, yep, pretty darned funny *after* I figured out how to get back in. > > ;) > > John W. Colby > www.ColbyConsulting.com > > On 1/25/2011 6:23 PM, Arthur Fuller wrote: >> ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, >> sorry:) >> Arthur >> >> On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: >> >>> Well this is annoying. It seems I deleted the user that I created the >>> instance of sql server with SSMS Security Logins object. Now I have no >>> authority to do anything. >>> >>> Is there a way to put it back in? I tried to create it over again but I >>> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >>> can't even see the properties of that user, even though that is me... >>> >>> I think... >>> >>> Am I just screwed? >>> >>> Can I even delete the server instance? >>> >>> Luckily I wasn't all that far along in defining databases but I have >>> probably a dozen hours involved in two specific databases. >>> >>> -- >>> 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 jwcolby at colbyconsulting.com Tue Jan 25 20:54:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 25 Jan 2011 21:54:42 -0500 Subject: [dba-SQLServer] Deleted my own user, can't log in In-Reply-To: <-480677922828379142@unknownmsgid> References: <4D3BB7A8.30103@colbyconsulting.com> <4D3F65E4.70401@colbyconsulting.com> <-480677922828379142@unknownmsgid> Message-ID: <4D3F8CF2.4060604@colbyconsulting.com> Not specifically. I did have an issue where I could not install SQL Server 2008 because the server was Windows 2000 and it can't use the .net version required. SQL Server 2005 runs just fine. John W. Colby www.ColbyConsulting.com On 1/25/2011 7:17 PM, Francisco Tapia wrote: > Had a weird issue with a db from an operating system we use here, the > db is 2005 express my coworker loaded the ss2008 management studio and > he was unable to manage the db, he then installed ss2005 and all went > well. > > I hadn't ran into that issue, just curious if you had a similar issue... > > Sent from my mobile > > On Jan 25, 2011, at 4:08 PM, jwcolby wrote: > >> LOL, yep, pretty darned funny *after* I figured out how to get back in. >> >> ;) >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 1/25/2011 6:23 PM, Arthur Fuller wrote: >>> ROFL! I guess I'd call this SQL Suicide. (Can't wipe the grin off my face, >>> sorry:) >>> Arthur >>> >>> On Sun, Jan 23, 2011 at 12:07 AM, jwcolbywrote: >>> >>>> Well this is annoying. It seems I deleted the user that I created the >>>> instance of sql server with SSMS Security Logins object. Now I have no >>>> authority to do anything. >>>> >>>> Is there a way to put it back in? I tried to create it over again but I >>>> cannot seem to do so. In fact I recreated the vmDev\jwcolby user but I >>>> can't even see the properties of that user, even though that is me... >>>> >>>> I think... >>>> >>>> Am I just screwed? >>>> >>>> Can I even delete the server instance? >>>> >>>> Luckily I wasn't all that far along in defining databases but I have >>>> probably a dozen hours involved in two specific databases. >>>> >>>> -- >>>> 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 pcs.accessd at gmail.com Tue Jan 25 22:24:02 2011 From: pcs.accessd at gmail.com (Borge Hansen) Date: Wed, 26 Jan 2011 14:24:02 +1000 Subject: [dba-SQLServer] Change default backup destination and reduction of log file size Message-ID: I recently installed the web server version of SQL 2008 R2, and as part of installation I must have specified the default backup destination folder. I've restored three SQL 2005 DBs and all is good. I moved the backup destination folder though in the file / folder system. Now whenever I do a simple full backup the Management Studio is serving up the location of the old now non existing backup folder. Simple question: How and where do I change the default backup destination setting? Also, One Db has a mdf file of 750mb and the logfile is about 500mb. How do I reduce the size of the logfile? I thought that performing a simple full backup would automatically reduce the logfile. Thanks, borge From ab-mi at post3.tele.dk Wed Jan 26 04:29:07 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Wed, 26 Jan 2011 11:29:07 +0100 Subject: [dba-SQLServer] Change default backup destination and reduction of log file size In-Reply-To: References: Message-ID: <7682A8AF4B3A4592BD08BB824249BFCA@abpc> In SSMS rightclick the server name - choose Facets - then in BackupDirectory enter the destination folder. Notice that this will only be the default backup folder for databases you have not previously backed up - for previously backed up database you have to change the destination manually. As for reducing the log file you have to make a BACKUP LOG - a full database backup won't reduce the log file. Asger -----Oprindelig meddelelse----- Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] P? vegne af Borge Hansen Sendt: 26. januar 2011 05:24 Til: Discussion concerning MS SQL Server Emne: [dba-SQLServer] Change default backup destination and reduction of log file size I recently installed the web server version of SQL 2008 R2, and as part of installation I must have specified the default backup destination folder. I've restored three SQL 2005 DBs and all is good. I moved the backup destination folder though in the file / folder system. Now whenever I do a simple full backup the Management Studio is serving up the location of the old now non existing backup folder. Simple question: How and where do I change the default backup destination setting? Also, One Db has a mdf file of 750mb and the logfile is about 500mb. How do I reduce the size of the logfile? I thought that performing a simple full backup would automatically reduce the logfile. Thanks, borge _______________________________________________ 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 Jan 26 16:18:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 26 Jan 2011 17:18:09 -0500 Subject: [dba-SQLServer] What SQL To Use In-Reply-To: <8ADF297DF43D4EF8BCECED9B8A29E953@HAL9005> References: <8ADF297DF43D4EF8BCECED9B8A29E953@HAL9005> Message-ID: There is a limit on the size of a given db in the express version. I don't rember exactly what it is, but I think it's 2GB. That may be enough for your small firm. Arthur On Fri, Dec 31, 2010 at 11:06 AM, Rocky Smolin wrote: > Thanks for the reply Mark. Best to you and the fam for the coming year. > > Rocky > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark > Breen > Sent: Friday, December 31, 2010 3:33 AM > To: Discussion concerning MS SQL Server > Subject: Re: [dba-SQLServer] What SQL To Use > > Hi Rocky, > > There are only rare occasions that you really need the paid for version of > SQL Server. > > I would be 99.99% sure you can use the free version. > > One thing that the free version is missing is the some of the > administration > tools for schedule jobs and other things. However, the wonderful world of > opensource provides those tools FOC also. > > I can think of no reason to use the paid for version at all. Even when you > have very large db's there are plenty of options to still use the free > version. > > Use Express and spend the money saved on handbags and Italian shoes for > ladies. It will bring you much more happiness than spending it on SQL > Server. > > Happy new year to you and your family > > Mark > > > > > On 30 December 2010 17:26, Rocky Smolin wrote: > > > Dear List: > > > > A client is upgrading his server. Currently he is using SQL Server > > Small Business 2003. He is looking at an upgrade to SQL Server Small > > Business > > 2008 but is also looking at a hefty license fee. > > > > He wants to know if SQL Server Express will do the job or if he'll > > have to upgrade to SQL Server Small Business 2008. > > > > This is a law firm with a max of 20 users - typical on-line is 13. > > > > I'm not SQL savvy. Does anyone know? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > Skype: rocky.smolin > > www.e-z-mrp.com > > www.bchacc.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 Thu Jan 27 10:54:56 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 27 Jan 2011 11:54:56 -0500 Subject: [dba-SQLServer] Is R2 the only (read official) edition now Message-ID: <4D41A360.5090609@colbyconsulting.com> Is SQL Server R2 the only thing sold now? I am trying to discover whether I can load SQL Server express 2008 on Windows XP (32 bit I think) and I immediately get dragged to a page about SQL Server 2008 R2. As if That is the version available now. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Jan 30 15:53:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 30 Jan 2011 16:53:36 -0500 Subject: [dba-SQLServer] Hamachi VPN information Message-ID: <4D45DDE0.3060409@colbyconsulting.com> I use Hamachi a lot. I am trying to set up Hamachi VPNs specific to client groups, IOW a VPN for Lenoir Prison Ministry, a VPN for Forgiven Ministry, a group for FSN Hope, a group for C2DbInternal etc. What I did not really understand is that there are actually three types of networks. I am going to cut and paste the definitions from Hamachi's page just so that you can see what they have to say. http://help.logmein.com/SelfServiceSearchResults?kw=hub+and+spoke&product=lmihamachi2&sr=0 http://help.logmein.com/SelfServiceKnowledgeRenderer?type=Documentation&id=kA130000000Lu1YCAS&search=1&kw=hub%20and%20spoke * Gateway virtual networking: Provide remote users with secure access to your private network/LAN, including the resources on it, from a centralized LogMeIn Hamachi? gateway, without modifying firewalls or network routers. * Hub-and-spoke virtual networking: Provide remote users with secure access to specific resources on your network, from any location, without modifying firewalls or network routers. * Mesh networking: Connect all of your network clients to each other. Quickly and easily create a simple, virtual, mesh network that allows remote machines to directly connect to each other, thereby giving users basic network access to all the network resources they need. So, I wanted a private network for each client. I wanted a hub and spoke for each client because both of the other types (mesh and gateway) allow all computers to see each other. In most cases, these clients are a group of people who really don't want each other to see their shares etc. If you create a network from a client (as I did) instead of from the Hamachi Web page, then you automatically create a mesh network. Once you create a network from a client, I have never found a way to "connect" or subscribe that network into your online network management page. Bad news. So think carefully about the future and consider doing all of your network management from the web page. Essentially you create an Hamachi account which you can log in to. Once you do that you can create networks from that page, then send emails to people with invitations to join your networks. You get to "approve" the subscriptions. Because I had created all of my networks from the client on my laptop, they were all "mesh" networks, and everyone could see everyone. Even worse the visibility extended out of the network to other networks. Even worse than that, I started getting echos between the networks. IOW, because mu computer belonged to each of the mesg networks I would ping computers and get many different ping echos. If you are ever going to do a single network then fine (maybe) build it from one of the Hamachi clients. However if you ever anticipate doing multiple networks as I am doing, do yourself a favor and start from the Web page and always create your networks from there. -- John W. Colby www.ColbyConsulting.com