From michael at ddisolutions.com.au Thu Dec 1 01:02:23 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 1 Dec 2011 18:02:23 +1100 Subject: [dba-SQLServer] MySQL question References: <99266C61B516644D9727F983FAFAB46511B8E4@remote.ddisolutions.com.au> Message-ID: <99266C61B516644D9727F983FAFAB46511B8F6@remote.ddisolutions.com.au> Thanks guys, I could login, and I found the show databases command. No database installed. I have referred the issue back to their support people. Show give me some time to get my head around it all. Cheers Michael M For starters, try to log in using the command line tool. If you make it that far, enter "show databases". You will get at least one ("test") and perhaps more. Assuming you get that far, try a Create Database command and see what happens. As far as copying the client's database, the specifics will pertain to which engine is in use. HTH, Arthur On Wed, Nov 30, 2011 at 2:56 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Hi Guys, > > I know this is slightly OT but... > > My client was supposed to install a 3rd party app and set it's database > up as SQL Server. > However events have occurred and now they have a MySQL database they > want me to use! > I've never used MySQL as a datasource but I'll assume it should be ok. I > only have to read, no writes, which is something I suppose. > > I'm downloading 5.5 and the Workbench for testing here. > > I only have access to the clients pc with MySQL installed using > TeamViewer, basically a remote desktop tool for those not on the domain. > When I look at the 3rd party apps options page the database stuff IS NOT > SETUP. > How can I tell if the database is in fact installed? Only the command > line client is installed. I REFUSE to do any installations of tools on > their PC... > > Is there a simple way to backup their database (if it exists) and then > load it here? > They only gave me the password to MySQL. Which does work in the command > line tool, not that I know what to do with it :-/ > > Sorry for the OT. > > Cheers > > Michael M > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1411 / Virus Database: 2092/4047 - Release Date: 11/29/11 From jwcolby at colbyconsulting.com Sun Dec 4 09:59:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 10:59:19 -0500 Subject: [dba-SQLServer] Users in SQL Server Message-ID: <4EDB98D7.30009@colbyconsulting.com> Several times now I have run into an issue where SQL Server does not have a pair of users I use for my Access application called DiscoAdmin and DiscoApp. The problem is that one of the the databases that I am picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. Basically I am able to create the user but not assign rights - db_reader, db_writer etc. I have always been fuzzy about how this stuff works and I just need an explanation of why it won't allow me to set these rights even though the user exists and the check boxes are enabled when I select that database. I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. Any assistance great fully accepted. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From jwcolby at colbyconsulting.com Sun Dec 4 10:13:31 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 11:13:31 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDB98D7.30009@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> Message-ID: <4EDB9C2B.1010201@colbyconsulting.com> >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not have a pair of users I use for > my Access application called DiscoAdmin and DiscoApp. The problem is that one of the the databases > that I am picking up on that server was already set up and has those users. When I try to set those > users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an explanation of why it won't > allow me to set these rights even though the user exists and the check boxes are enabled when I > select that database. I just discovered that if I delete the user out in that database and then set > the rights through the user back in the server security stuff it happily accepts my changes and > re-adds the user to the database. This just seems strange. If I don't do this rigamarole then I have > a DiscoApp in the database with a set of rights for that database but when I look at it back at the > server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. From df.waters at comcast.net Sun Dec 4 10:47:12 2011 From: df.waters at comcast.net (Dan Waters) Date: Sun, 4 Dec 2011 10:47:12 -0600 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDB9C2B.1010201@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> Message-ID: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> I was working with a customer and needed to get a database copy for myself. For some reason backup wasn't working (an IT issue), so I decided to detach the database, copy it, and then reattach it. However, I couldn't reattach it because all my rights were associated with that database - once the database was gone so was my right to attach a database! Gotcha! Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, December 04, 2011 10:14 AM To: Discussion concerning MS SQL Server; Access Developers discussion and problem solving Subject: Re: [dba-SQLServer] Users in SQL Server >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not > have a pair of users I use for my Access application called DiscoAdmin > and DiscoApp. The problem is that one of the the databases that I am > picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an > explanation of why it won't allow me to set these rights even though > the user exists and the check boxes are enabled when I select that > database. I just discovered that if I delete the user out in that > database and then set the rights through the user back in the server > security stuff it happily accepts my changes and re-adds the user to > the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. _______________________________________________ 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 Dec 4 12:11:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 13:11:09 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: <4EDBB7BD.6060308@colbyconsulting.com> Yea, this stuff is a mess like I've seldom seen. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 11:47 AM, Dan Waters wrote: > I was working with a customer and needed to get a database copy for myself. > For some reason backup wasn't working (an IT issue), so I decided to detach > the database, copy it, and then reattach it. However, I couldn't reattach > it because all my rights were associated with that database - once the > database was gone so was my right to attach a database! Gotcha! > > Dan > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, December 04, 2011 10:14 AM > To: Discussion concerning MS SQL Server; Access Developers discussion and > problem solving > Subject: Re: [dba-SQLServer] Users in SQL Server > > >I just discovered that if I delete the user out in that database and then > set the rights through the user back in the server security stuff it happily > accepts my changes and re-adds the user to the database. > > Unfortunately after I did this delete / re-add rigamarole I discovered that > all of the rights to objects in the database were removed. For example I > had rights to execute stored procedures assigned to these users but after > deleting the users the rights to execute were lost. > > Sigh. > > This SQL Server Users stuff is really developer unfriendly. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/4/2011 10:59 AM, jwcolby wrote: >> >> Several times now I have run into an issue where SQL Server does not >> have a pair of users I use for my Access application called DiscoAdmin >> and DiscoApp. The problem is that one of the the databases that I am >> picking up on that server was already set up and has those users. When I > try to set those users up in the server's security it tells me that "the > server principal 'DiscoApp' already exists. >> Basically I am able to create the user but not assign rights - db_reader, > db_writer etc. >> >> I have always been fuzzy about how this stuff works and I just need an >> explanation of why it won't allow me to set these rights even though >> the user exists and the check boxes are enabled when I select that >> database. I just discovered that if I delete the user out in that >> database and then set the rights through the user back in the server >> security stuff it happily accepts my changes and re-adds the user to >> the database. This just seems strange. If I don't do this rigamarole then > I have a DiscoApp in the database with a set of rights for that database but > when I look at it back at the server level it does not reflect those rights > for that user for that database. >> >> Any assistance great fully accepted. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fuller.artful at gmail.com Sun Dec 4 12:13:43 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 4 Dec 2011 13:13:43 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: For over five years I worked (full-time but contract, gradually lessening to part-time contract, as more and more got put in place). But pretty much at the outset, I told the owners of the firm that I was the super-user, at least insofar as the database was concerned, and that I would suggest db-inherited permission levels according to SQL Server. This (at the db level) meant four levels of permission: sales, department manager, senior manager, and God (me). the only one with absolute control over the db. I told them flat-out that I didn't trust their modest skills to fork with their essential data. Now, obviously this approach wouldn't have worked in a larger organization, but the underlying point remains similar, IMO. Either you trust me, as the designer and developer of your core asset (the bricks and mortar, in comparison, are trivial -- the Big Asset is the db), to serve and protect and revise and re-design as exigencies and business priorities emerge, or you don't. And if the latter, then I'm off to work for someone who understands and respects boundaries. To this admittedly authoritarian attitude, I also provided the means, passwords, etc. that would be needed in the event of a bus rolling over me, or similar unforeseen events. On the other hand, I spent a while on a multi-million dollar project managed (allegedly) by a very large consulting firm, owned in half by MS, which dictated the use of MS products entirely throughout the solution. Numerous problems that could have been solved almost instantly by switching to Oracle or PostGres were off the table due to the heavy participation of MS. The information was very confidential, and the first thing the DB designer did was isolate virtually everyone from accessing the actual data. When creating a sproc or view, we got back rows of asterisks, so as not to violate privacty restrictions. We were held down to verifying accuracy by the number of rows returned by any given sproc or view or query. On this project, to further complicate matters, there were 8 servers, each with a DB of a TB or more, and some of the joins required grabbing data from more than one server, and occasionally more than one DB on some of the servers. It took a couple of years to figure out how all this might work (maybe that means I'm insufficiently aware of these complexities; but my superiors had the same problems: how to mask all the data while also being able to prove that any given sproc delivered the required result-set). I call this "working in handcuffs"; I appreciate the need for secrecy and privacy in certain domains, and in this particular example can fully appreciate why us developers were not granted access to the specific data in the rows returned (without giving too much away, think "rows containing HIV-positive persons, their health records, their history of physicians, etc.). All this pretty much describes why I prefer to work for SMBs than giant federal or even provincial ministries. I have worked for both, at length, and I prefer the smaller and more achievable projects. Just IME and my $0.02. A. From jwcolby at colbyconsulting.com Sun Dec 4 12:50:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 13:50:07 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: <4EDBC0DF.6070300@colbyconsulting.com> I understand and agree but that really isn't the point in this case. I have total access and nobody else understands anything, never mind the tiny amount that I understand. My problem really is that I don't understand the whole SQL Server users / roles thing and I keep screwing stuff up. I had SQL Server 2005 express set up and functioning. I had set up users at the server level to allow specific limited functionality to a couple of "users". These weren't really users as in the domain, but rather a DiscopApp user, in other words my disco (Access) application. That user was set up as a user at the server level, without which (AFAICT) the application could not even log on to the server. Then the database(s) had to have that user as well or the application couldn't execute stored procedures and stuff. 1) Log on to sql server 2) Do stuff in the database. But... the users in the server security system are NOT the same user as the same user with the same name in the database security system. New physical server, new installation of SQL Server. I disconnected the database and reconnected it in the new machine. The database still had the users I set up but... those user's aren't the SQL Server security. When I tried to add the users in SQL Server side I could do that but I couldn't add their permissions in the database because... THEY ALREADY EXISTED (in the database). What an abortion. I go Google this mess and yep... it's an abortion! This is really one of those places where our full time SQL Server admins are shaking their heads and telling me (or at least thinking) that since I don't have the time to learn all of the arcane asininities required to be a knowledgable SQL Server admin I have no business using SQL Server. Sadly, I have no choice. Sadly SQL Server makes no apparent effort to provide wizards to help me out. It seems like a no brainer to have a little wizard that would move the user stuff stored in a database up to the server level so that the user could be used to log in to SQL Server. Sadly I have to learn the arcane asininities required to do this from the command prompt. Apparently it can be done from the command line (some how). Or tell my client they need to hire a SQL Server admin and put him to work doing office installs in the 95% of his time that will be free to do things other than SQL Server. SQL Server is insanely powerful when it is not beating you over the head with arcane asininities. ;) John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 1:13 PM, Arthur Fuller wrote: > For over five years I worked (full-time but contract, gradually lessening > to part-time contract, as more and more got put in place). But pretty much > at the outset, I told the owners of the firm that I was the super-user, at > least insofar as the database was concerned, and that I would suggest > db-inherited permission levels according to SQL Server. This (at the db > level) meant four levels of permission: sales, department manager, senior > manager, and God (me). the only one with absolute control over the db. I > told them flat-out that I didn't trust their modest skills to fork with > their essential data. > > Now, obviously this approach wouldn't have worked in a larger organization, > but the underlying point remains similar, IMO. Either you trust me, as the > designer and developer of your core asset (the bricks and mortar, in > comparison, are trivial -- the Big Asset is the db), to serve and protect > and revise and re-design as exigencies and business priorities emerge, or > you don't. And if the latter, then I'm off to work for someone who > understands and respects boundaries. > > To this admittedly authoritarian attitude, I also provided the means, > passwords, etc. that would be needed in the event of a bus rolling over me, > or similar unforeseen events. > > On the other hand, I spent a while on a multi-million dollar project > managed (allegedly) by a very large consulting firm, owned in half by MS, > which dictated the use of MS products entirely throughout the solution. > Numerous problems that could have been solved almost instantly by switching > to Oracle or PostGres were off the table due to the heavy participation of > MS. > > The information was very confidential, and the first thing the DB designer > did was isolate virtually everyone from accessing the actual data. When > creating a sproc or view, we got back rows of asterisks, so as not to > violate privacty restrictions. We were held down to verifying accuracy by > the number of rows returned by any given sproc or view or query. On this > project, to further complicate matters, there were 8 servers, each with a > DB of a TB or more, and some of the joins required grabbing data from more > than one server, and occasionally more than one DB on some of the servers. > > It took a couple of years to figure out how all this might work (maybe that > means I'm insufficiently aware of these complexities; but my superiors had > the same problems: how to mask all the data while also being able to prove > that any given sproc delivered the required result-set). I call this > "working in handcuffs"; I appreciate the need for secrecy and privacy in > certain domains, and in this particular example can fully appreciate why us > developers were not granted access to the specific data in the rows > returned (without giving too much away, think "rows containing HIV-positive > persons, their health records, their history of physicians, etc.). > > All this pretty much describes why I prefer to work for SMBs than giant > federal or even provincial ministries. I have worked for both, at length, > and I prefer the smaller and more achievable projects. > > Just IME and my $0.02. > > A. > _______________________________________________ > 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 Sun Dec 4 19:50:26 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Sun, 4 Dec 2011 17:50:26 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDBC0DF.6070300@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> Message-ID: <1126424970034065031@unknownmsgid> John, You're right, but I shake my head because you don't care to learn, and then blame everyone for your shortcomings and unwillingness to try Tip: sp_help_revlogin http://sqlthis.blogspot.com/2006/01/migrating-logins-from-one-sql-server.html?m=1 Sent from my mobile On Dec 4, 2011, at 10:51 AM, jwcolby wrote: > I understand and agree but that really isn't the point in this case. I have total access and nobody else understands anything, never mind the tiny amount that I understand. My problem really is that I don't understand the whole SQL Server users / roles thing and I keep screwing stuff up. > > I had SQL Server 2005 express set up and functioning. I had set up users at the server level to allow specific limited functionality to a couple of "users". These weren't really users as in the domain, but rather a DiscopApp user, in other words my disco (Access) application. That user was set up as a user at the server level, without which (AFAICT) the application could not even log on to the server. Then the database(s) had to have that user as well or the application couldn't execute stored procedures and stuff. > > 1) Log on to sql server > 2) Do stuff in the database. > > But... the users in the server security system are NOT the same user as the same user with the same name in the database security system. New physical server, new installation of SQL Server. I disconnected the database and reconnected it in the new machine. The database still had the users I set up but... those user's aren't the SQL Server security. When I tried to add the users in SQL Server side I could do that but I couldn't add their permissions in the database because... THEY ALREADY EXISTED (in the database). > > What an abortion. > > I go Google this mess and yep... it's an abortion! > > This is really one of those places where our full time SQL Server admins are shaking their heads and telling me (or at least thinking) that since I don't have the time to learn all of the arcane asininities required to be a knowledgable SQL Server admin I have no business using SQL Server. Sadly, I have no choice. Sadly SQL Server makes no apparent effort to provide wizards to help me out. It seems like a no brainer to have a little wizard that would move the user stuff stored in a database up to the server level so that the user could be used to log in to SQL Server. > > Sadly I have to learn the arcane asininities required to do this from the command prompt. Apparently it can be done from the command line (some how). Or tell my client they need to hire a SQL Server admin and put him to work doing office installs in the 95% of his time that will be free to do things other than SQL Server. > > SQL Server is insanely powerful when it is not beating you over the head with arcane asininities. > > ;) > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/4/2011 1:13 PM, Arthur Fuller wrote: >> For over five years I worked (full-time but contract, gradually lessening >> to part-time contract, as more and more got put in place). But pretty much >> at the outset, I told the owners of the firm that I was the super-user, at >> least insofar as the database was concerned, and that I would suggest >> db-inherited permission levels according to SQL Server. This (at the db >> level) meant four levels of permission: sales, department manager, senior >> manager, and God (me). the only one with absolute control over the db. I >> told them flat-out that I didn't trust their modest skills to fork with >> their essential data. >> >> Now, obviously this approach wouldn't have worked in a larger organization, >> but the underlying point remains similar, IMO. Either you trust me, as the >> designer and developer of your core asset (the bricks and mortar, in >> comparison, are trivial -- the Big Asset is the db), to serve and protect >> and revise and re-design as exigencies and business priorities emerge, or >> you don't. And if the latter, then I'm off to work for someone who >> understands and respects boundaries. >> >> To this admittedly authoritarian attitude, I also provided the means, >> passwords, etc. that would be needed in the event of a bus rolling over me, >> or similar unforeseen events. >> >> On the other hand, I spent a while on a multi-million dollar project >> managed (allegedly) by a very large consulting firm, owned in half by MS, >> which dictated the use of MS products entirely throughout the solution. >> Numerous problems that could have been solved almost instantly by switching >> to Oracle or PostGres were off the table due to the heavy participation of >> MS. >> >> The information was very confidential, and the first thing the DB designer >> did was isolate virtually everyone from accessing the actual data. When >> creating a sproc or view, we got back rows of asterisks, so as not to >> violate privacty restrictions. We were held down to verifying accuracy by >> the number of rows returned by any given sproc or view or query. On this >> project, to further complicate matters, there were 8 servers, each with a >> DB of a TB or more, and some of the joins required grabbing data from more >> than one server, and occasionally more than one DB on some of the servers. >> >> It took a couple of years to figure out how all this might work (maybe that >> means I'm insufficiently aware of these complexities; but my superiors had >> the same problems: how to mask all the data while also being able to prove >> that any given sproc delivered the required result-set). I call this >> "working in handcuffs"; I appreciate the need for secrecy and privacy in >> certain domains, and in this particular example can fully appreciate why us >> developers were not granted access to the specific data in the rows >> returned (without giving too much away, think "rows containing HIV-positive >> persons, their health records, their history of physicians, etc.). >> >> All this pretty much describes why I prefer to work for SMBs than giant >> federal or even provincial ministries. I have worked for both, at length, >> and I prefer the smaller and more achievable projects. >> >> Just IME and my $0.02. >> >> A. >> _______________________________________________ >> dba-SQLServer mailing list >> dba-SQLServer at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Dec 4 21:03:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 22:03:40 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <1126424970034065031@unknownmsgid> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> Message-ID: <4EDC348C.1090400@colbyconsulting.com> > You're right, but I shake my head because you don't care to learn LOL of course you do. And of course you have taken the time and effort to become as close to an expert in Access as they come, plus getting there in C# plus build and maintain Virtual Machines in Hyper-V plus build and maintain two server systems to host those SQL Servers and VMs plus build and maintain an UnRaid server to provide near-line backup plus build and maintain a half dozen Hamachi VPNs coming in to your servers plus maintain SQL Server Express backends on each of those networks plus write custom Access FEs to come in over those networks to hit those SQL Servers, and give away (pro-bono) those Access FEs and the networks and the SQL Server Express instances to four different non-profits plus build and maintain Windows Media Center machines for the home plus maintain a total of 11 total machines in your home / office plus ... Oh yea, take the time to become an expert in SQL Server arcane asininities... Blame who for what shortcomings? I mean it isn't like I don't have any shortcomings of course. I don't do well in medicine or nuclear physics or ... hell about a billion things including hmmm... arcane SQL Server asininities... So do you feel like I am I blaming you for some of my shortcomings? The closest I come is grousing about SQL Server arcane asininities which Microsoft doesn't bother to address... > You're right, but I shake my head because you don't care to learn LOL Of course you do. Actually I don't care to learn what I don't absolutely have to learn because I am just a little busy. I didn't mention that I also spend about 6 hours a week volunteering in the prison near my home, or that in 2003 I adopted two babies so I am now a dad of two elementary school kids. Or that my daughter has many different moderate disabilities caused by 7q11.23 Duplication syndrome: http://louisville.edu/psychology/mervis/research/dup.html And yes we took Allie to the University of Louiville to enroll her in this study, and as a result of her disabilities I spend many hours attending IEPs at the school making sure that she gets what she needs and deserves out of a school system which is geared towards shuffling people with disabilities off into a closet somewhere. I also didn't mention the weekend every month for eight months that my wife and I spent training to be advocates for people with disabilities: http://www.ncpartnersinpolicymaking.com/ So yea, I would much prefer a few more wizards to help me out, but given what I do in an average day I pretty much learn what I have to. For some reason arcane SQL Server asininities aren't real high on my list of things I want to spend my time on, though I do understand that there is nothing you would rather do. To each his own I suppose. > You're right, but I shake my head because you don't care to learn LOL Of course you do. And I shake my head because you think you have the right to decide what I should make a priority on my life. Thanks for the tip by the way. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 8:50 PM, Francisco Tapia wrote: > John, > You're right, but I shake my head because you don't care to learn, > and then blame everyone for your shortcomings and unwillingness to try > > Tip: sp_help_revlogin > > http://sqlthis.blogspot.com/2006/01/migrating-logins-from-one-sql-server.html?m=1 > > Sent from my mobile From michael at ddisolutions.com.au Sun Dec 4 23:55:26 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Mon, 5 Dec 2011 16:55:26 +1100 Subject: [dba-SQLServer] Users in SQL Server References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> Message-ID: <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> Hi JC, I think this is the sproc you need. sp_change_users_login You'll need to look it up in help for usage details. You can use it to fix orphaned logins with the same name. Which is what you get when you restore a db on another system. The names might be the same but the ID's underlying the names will be different. This sp fixes that issue. *Tip - you can save useful sprocs as a template and reuse them when needed. There should be a tab on the right hand side of SSM Studio. If this doesn't solve your problem then I have misunderstood! Cheers Michael M >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not > have a pair of users I use for my Access application called DiscoAdmin > and DiscoApp. The problem is that one of the the databases that I am > picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an > explanation of why it won't allow me to set these rights even though > the user exists and the check boxes are enabled when I select that > database. I just discovered that if I delete the user out in that > database and then set the rights through the user back in the server > security stuff it happily accepts my changes and re-adds the user to > the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. From jwcolby at colbyconsulting.com Mon Dec 5 06:27:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 07:27:13 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> Message-ID: <4EDCB8A1.5050406@colbyconsulting.com> Thanks Michael. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:55 AM, Michael Maddison wrote: > Hi JC, > > I think this is the sproc you need. > sp_change_users_login > You'll need to look it up in help for usage details. > > You can use it to fix orphaned logins with the same name. > Which is what you get when you restore a db on another system. The > names might be the same but the ID's underlying the names will be > different. > This sp fixes that issue. > > *Tip - you can save useful sprocs as a template and reuse them when > needed. There should be a tab on the right hand side of SSM Studio. > > If this doesn't solve your problem then I have misunderstood! > > Cheers > > Michael M > > > >I just discovered that if I delete the user out in that database and > then set the rights through the user back in the server security stuff > it happily accepts my changes and re-adds the user to the database. > > Unfortunately after I did this delete / re-add rigamarole I discovered > that all of the rights to objects in the database were removed. For > example I had rights to execute stored procedures assigned to these > users but after deleting the users the rights to execute were lost. > > Sigh. > > This SQL Server Users stuff is really developer unfriendly. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it From fhtapia at gmail.com Mon Dec 5 10:08:14 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 5 Dec 2011 08:08:14 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDC348C.1090400@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> Message-ID: Glad the tip worked, I do love SQL in all its variants, its' the language I'm most comfortable in; these days however I don't get to spend much time working on new projects for Sql Server as I've trained a Jr developers to take over that role, and a set of DBAs to handle the day to day. I work on other projects now, but I do like returning to Sql to see whats new and what's changed. I know you think your the only one fighting this fight against MS, but many of us get frustrated. Not all the documentation is out in the open in plain english, but that goes with any language. I can make the same type of outlandish arguments against mobile development which is what I am working on right now. The problem I think rises that when you are a n00b, you tend to ask / query for things in one manner, and become frustrated, after some acclimation to the language you begin querying differently, thus your search results match your expectation. Jumping around the way you do is your choice, (glad you have one). All things take time, and I don't say it to discourage you but, that's why they say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta your misery :) LOL. -Francisco http://bit.ly/sqlthis | Tsql and More... On Sun, Dec 4, 2011 at 19:03, jwcolby wrote: > So yea, I would much prefer a few more wizards to help me out, but given > what I do in an average day I pretty much learn what I have to. For some > reason arcane SQL Server asininities aren't real high on my list of things > I want to spend my time on, though I do understand that there is nothing > you would rather do. > > To each his own I suppose. > > > > You're right, but I shake my head because you don't care to learn > > LOL Of course you do. And I shake my head because you think you have the > right to decide what I should make a priority on my life. > > Thanks for the tip by the way. > > > From jwcolby at colbyconsulting.com Mon Dec 5 11:21:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 12:21:36 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> Message-ID: <4EDCFDA0.5080608@colbyconsulting.com> Our (or at least my) problem is that MS is not spending enough time on the GUI. When I realized I needed to get the users and their rights out of the database into the server, I tried to click / hold / drag and drop the user from the database security area into the server security area. Makes sense right? We have been dragging and dropping for 15 years now in Windows, longer than that in the MAC world. Visual Studio and C# uses drag and drop, Access uses drag and drop. But no, in SQL Server we have to go figure out how this stuff even works, then how to use command line or query crap to type in arcane syntax into a dev environment that basically gives you a "didn't work, try again" error message if anything goes wrong. Microsoft is trying to position SQL Server Express as the data store of choice for programmers in DotNet as well as Access. Well I got news for somebody, making me learn to be a DBA and type in command line crap on top of that just so that I can use their SQL Server Express is pretty much a non-starter. Some of it is drag and drop of course, in terms of building tables and views. However even there I have to go to a query window and haul out the books (memorized now) to drop or add a column from a table with very much data. Done from the gui it times out. This kind of stuff just drives me crazy. And of course this has nothing whatsoever to do with any individual on this list, except to say that trying to tell a noob to RTFM just adds to the frustration. I have built a very sophisticated system in C# which is used to process literally 300 million records a month, BCP out to CSV, through a 3rd party system and back in to SQL Server. In order to build this system I had to learn and integrate together many different systems from Windows Server 2008 and SQL Server 2008 to virtual machines to the third party software, learn C# and SQL Server, actually architect the thing, write C# and oversee a developer writing the code and get it all working. I have learned an enormous amount about SQL Server but I am not even close to DBA level and I don't want to be, I don't have time to be and I shouldn't have to be. And if MS would make it a priority to make SQL Server more GUI for more things I would not need to be. > Jumping around the way you do is your choice, (glad you have one). Well... sometimes we slide sideways into stuff. I got this client when I was desperate for work, the economy was in the tank and this work was there. I took it, and I actually quite enjoy it but it is hardly a "choice" to do all this jumping around. The volunteer work is a choice of course but the work is what I found and what I needed to do to get the work done. I actually quite enjoy the whole thing. I needed to learn C# and I have / am. Learning about SQL Server, even as little as I know is a god send from a career perspective. I work for small businesses where they need SQL Server but cannot afford a DBA, and wouldn't have enough work to keep one busy. Being able to "do the basics" allows me to do things in my career that otherwise wouldn't be possible, and provide my clients with SQL Server where they otherwise wouldn't be able to have that. I love what I do and the freedom of being a consultant, and if MS would just make some things gui I'd be an even happier camper. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 11:08 AM, Francisco Tapia wrote: > Glad the tip worked, > I do love SQL in all its variants, its' the language I'm most comfortable > in; these days however I don't get to spend much time working on new > projects for Sql Server as I've trained a Jr developers to take over that > role, and a set of DBAs to handle the day to day. I work on other projects > now, but I do like returning to Sql to see whats new and what's changed. I > know you think your the only one fighting this fight against MS, but many > of us get frustrated. Not all the documentation is out in the open in > plain english, but that goes with any language. I can make the same type > of outlandish arguments against mobile development which is what I am > working on right now. The problem I think rises that when you are a n00b, > you tend to ask / query for things in one manner, and become frustrated, > after some acclimation to the language you begin querying differently, thus > your search results match your expectation. > > Jumping around the way you do is your choice, (glad you have one). All > things take time, and I don't say it to discourage you but, that's why they > say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta > your misery :) LOL. > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... From davidmcafee at gmail.com Mon Dec 5 11:33:51 2011 From: davidmcafee at gmail.com (David McAfee) Date: Mon, 5 Dec 2011 09:33:51 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDCFDA0.5080608@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: >From the SSMS Object Explorer, you can click on Management ->Activity Monitor You can see all active users/processes. You can filter by database or user, right click on a process and Kill it if you need. All done via the GUI, with nothing typed except a user or database name if you chose to filter by one. D On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > Our (or at least my) problem is that MS is not spending enough time on the > GUI. When I realized I needed to get the users and their rights out of the > database into the server, I tried to click / hold / drag and drop the user > from the database security area into the server security area. > > Makes sense right? > > We have been dragging and dropping for 15 years now in Windows, longer > than that in the MAC world. Visual Studio and C# uses drag and drop, Access > uses drag and drop. But no, in SQL Server we have to go figure out how > this stuff even works, then how to use command line or query crap to type > in arcane syntax into a dev environment that basically gives you a "didn't > work, try again" error message if anything goes wrong. > > From jwcolby at colbyconsulting.com Mon Dec 5 11:47:12 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 12:47:12 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: <4EDD03A0.8080105@colbyconsulting.com> Cool, except that my management folder does not have Activity Monitor as an object under it. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:33 PM, David McAfee wrote: >> From the SSMS Object Explorer, you can click on Management ->Activity > Monitor > > You can see all active users/processes. > > You can filter by database or user, right click on a process and Kill it if > you need. > > All done via the GUI, with nothing typed except a user or database name if > you chose to filter by one. > > D > > > > > > On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > >> Our (or at least my) problem is that MS is not spending enough time on the >> GUI. When I realized I needed to get the users and their rights out of the >> database into the server, I tried to click / hold / drag and drop the user >> from the database security area into the server security area. >> >> Makes sense right? >> >> We have been dragging and dropping for 15 years now in Windows, longer >> than that in the MAC world. Visual Studio and C# uses drag and drop, Access >> uses drag and drop. But no, in SQL Server we have to go figure out how >> this stuff even works, then how to use command line or query crap to type >> in arcane syntax into a dev environment that basically gives you a "didn't >> work, try again" error message if anything goes wrong. >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From df.waters at comcast.net Mon Dec 5 12:37:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 5 Dec 2011 12:37:08 -0600 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDD03A0.8080105@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> <4EDD03A0.8080105@colbyconsulting.com> Message-ID: <004601ccb37c$e506da90$af148fb0$@comcast.net> I wondered about this myself. I'm using SS 2008 R2 Express. I found: Right-click on the SQL Server Instance name is SSMS. Activity Monitor is the 5th item on the list. Look at Recent Expensive Queries. Good Info. Then right-click one of the queries and select Show Execution Plan - and you get a diagram! You can also select Edit Query Text to see what the actual SQL statement is. Thanks! Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, December 05, 2011 11:47 AM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Users in SQL Server Cool, except that my management folder does not have Activity Monitor as an object under it. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:33 PM, David McAfee wrote: >> From the SSMS Object Explorer, you can click on Management ->Activity > Monitor > > You can see all active users/processes. > > You can filter by database or user, right click on a process and Kill > it if you need. > > All done via the GUI, with nothing typed except a user or database > name if you chose to filter by one. > > D > > > > > > On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > >> Our (or at least my) problem is that MS is not spending enough time >> on the GUI. When I realized I needed to get the users and their >> rights out of the database into the server, I tried to click / hold / >> drag and drop the user from the database security area into the server security area. >> >> Makes sense right? >> >> We have been dragging and dropping for 15 years now in Windows, >> longer than that in the MAC world. Visual Studio and C# uses drag and >> drop, Access uses drag and drop. But no, in SQL Server we have to go >> figure out how this stuff even works, then how to use command line or >> query crap to type in arcane syntax into a dev environment that >> basically gives you a "didn't work, try again" error message if anything goes wrong. >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Mon Dec 5 18:33:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 5 Dec 2011 16:33:51 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDCFDA0.5080608@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: That's understood, but it seems the community has been pushing for more command like interfaces. I read about it all the time, and some of our own sysadmins seem to prefer it. Some things are easier as you can script out more commands and easily make your 100's of servers be similar in configuration... in fact I personnally love that I can script out any window of the actions im about to perform. I learn something new and can hand over usable "working code" to my development and dba teams and ensure system consistency. On Dec 5, 2011 9:25 AM, "jwcolby" wrote: > Our (or at least my) problem is that MS is not spending enough time on the > GUI. When I realized I needed to get the users and their rights out of the > database into the server, I tried to click / hold / drag and drop the user > from the database security area into the server security area. > > Makes sense right? > > We have been dragging and dropping for 15 years now in Windows, longer > than that in the MAC world. Visual Studio and C# uses drag and drop, Access > uses drag and drop. But no, in SQL Server we have to go figure out how > this stuff even works, then how to use command line or query crap to type > in arcane syntax into a dev environment that basically gives you a "didn't > work, try again" error message if anything goes wrong. > > Microsoft is trying to position SQL Server Express as the data store of > choice for programmers in DotNet as well as Access. Well I got news for > somebody, making me learn to be a DBA and type in command line crap on top > of that just so that I can use their SQL Server Express is pretty much a > non-starter. > > Some of it is drag and drop of course, in terms of building tables and > views. However even there I have to go to a query window and haul out the > books (memorized now) to drop or add a column from a table with very much > data. Done from the gui it times out. This kind of stuff just drives me > crazy. > > And of course this has nothing whatsoever to do with any individual on > this list, except to say that trying to tell a noob to RTFM just adds to > the frustration. > > I have built a very sophisticated system in C# which is used to process > literally 300 million records a month, BCP out to CSV, through a 3rd party > system and back in to SQL Server. In order to build this system I had to > learn and integrate together many different systems from Windows Server > 2008 and SQL Server 2008 to virtual machines to the third party software, > learn C# and SQL Server, actually architect the thing, write C# and oversee > a developer writing the code and get it all working. > > I have learned an enormous amount about SQL Server but I am not even close > to DBA level and I don't want to be, I don't have time to be and I > shouldn't have to be. And if MS would make it a priority to make SQL > Server more GUI for more things I would not need to be. > > > Jumping around the way you do is your choice, (glad you have one). > > Well... sometimes we slide sideways into stuff. I got this client when I > was desperate for work, the economy was in the tank and this work was > there. I took it, and I actually quite enjoy it but it is hardly a > "choice" to do all this jumping around. The volunteer work is a choice of > course but the work is what I found and what I needed to do to get the work > done. > > I actually quite enjoy the whole thing. I needed to learn C# and I have / > am. Learning about SQL Server, even as little as I know is a god send from > a career perspective. I work for small businesses where they need SQL > Server but cannot afford a DBA, and wouldn't have enough work to keep one > busy. Being able to "do the basics" allows me to do things in my career > that otherwise wouldn't be possible, and provide my clients with SQL Server > where they otherwise wouldn't be able to have that. > > I love what I do and the freedom of being a consultant, and if MS would > just make some things gui I'd be an even happier camper. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/5/2011 11:08 AM, Francisco Tapia wrote: > >> Glad the tip worked, >> I do love SQL in all its variants, its' the language I'm most >> comfortable >> in; these days however I don't get to spend much time working on new >> projects for Sql Server as I've trained a Jr developers to take over that >> role, and a set of DBAs to handle the day to day. I work on other >> projects >> now, but I do like returning to Sql to see whats new and what's changed. >> I >> know you think your the only one fighting this fight against MS, but many >> of us get frustrated. Not all the documentation is out in the open in >> plain english, but that goes with any language. I can make the same type >> of outlandish arguments against mobile development which is what I am >> working on right now. The problem I think rises that when you are a n00b, >> you tend to ask / query for things in one manner, and become frustrated, >> after some acclimation to the language you begin querying differently, >> thus >> your search results match your expectation. >> >> Jumping around the way you do is your choice, (glad you have one). All >> things take time, and I don't say it to discourage you but, that's why >> they >> say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta >> your misery :) LOL. >> >> >> -Francisco >> http://bit.ly/sqlthis | Tsql and More... >> > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From fhtapia at gmail.com Tue Dec 6 09:06:23 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 6 Dec 2011 07:06:23 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDD03A0.8080105@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> <4EDD03A0.8080105@colbyconsulting.com> Message-ID: In 2008 this has changed, to view your current activity you simply click on the GUI button for activity monitor on the toolbar ... or (hey John.. check it out, an arcane asininity) simply press CTRL+ALT+A on any of your Management Studio windows. I don't use the express management studio, however I suspect that if Activity Monitor is not available via ctrl+alt+a then you can always execute the query sp_who to gather your info that you need. -Francisco http://bit.ly/sqlthis | Tsql and More... On Mon, Dec 5, 2011 at 09:47, jwcolby wrote: > Cool, except that my management folder does not have Activity Monitor as > an object under it. > > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/5/2011 12:33 PM, David McAfee wrote: > >> From the SSMS Object Explorer, you can click on Management ->Activity >>> >> Monitor >> >> You can see all active users/processes. >> >> You can filter by database or user, right click on a process and Kill it >> if >> you need. >> >> All done via the GUI, with nothing typed except a user or database name if >> you chose to filter by one. >> >> D >> >> >> >> >> >> On Mon, Dec 5, 2011 at 9:21 AM, jwcolby> >> wrote: >> >> Our (or at least my) problem is that MS is not spending enough time on >>> the >>> GUI. When I realized I needed to get the users and their rights out of >>> the >>> database into the server, I tried to click / hold / drag and drop the >>> user >>> from the database security area into the server security area. >>> >>> Makes sense right? >>> >>> We have been dragging and dropping for 15 years now in Windows, longer >>> than that in the MAC world. Visual Studio and C# uses drag and drop, >>> Access >>> uses drag and drop. But no, in SQL Server we have to go figure out how >>> this stuff even works, then how to use command line or query crap to type >>> in arcane syntax into a dev environment that basically gives you a >>> "didn't >>> work, try again" error message if anything goes wrong. >>> >>> >>> ______________________________**_________________ >> dba-SQLServer mailing list >> dba-SQLServer@**databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.**com >> >> >> > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From jwcolby at colbyconsulting.com Wed Dec 7 10:00:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 07 Dec 2011 11:00:52 -0500 Subject: [dba-SQLServer] Does count(*) lock the table? Message-ID: <4EDF8DB4.2030500@colbyconsulting.com> I have a half dozen tables which I need to get counts of valid records for. Additionally I need to get counts where the two tables join on a common field - HashPerson, HashFamily and HashAddress. We have written a process in C# which dynamically generates these count SQL statements, passes it off to SQL Server, gets the results back and populates a spreadsheet with the answers. As it happens there is an entire "table" or square area of the spreadsheet for the intersection (as I call it) counts for each of those hashes, IOW an entire section for HashPerson counts, another for HashFamily and another for hashAddress. Since I am working in C# and each Hash area is a class instance, and since I have threads available in C#, and since it was taking about 5 hours to run all these counts, I decided to thread it and run each Hash on it's own thread, IOW try and get the counts for the HashPerson, HashFamily and HashAddress "simultaneously". I have 12 cores and about 50 gigs of memory assigned to SQL Server so I thought *maybe* it would work. Well... it appears that at some point very early on, something locks the process and only one of the hash classes proceeds. When that one finishes then the other two process together. We are checking whether we are having deadlock issues in C# but I need to know whether SQL Server itself would lock the tables that the count was processing. So the question is, does SQL Server apply locks to a table when doing a count of the records in the table. Likewise if I join two tables and do a count on that, does that cause a lock to be applied to either or both of the tables. If so is there a syntax I can use to prevent this lock? I am doing a join potentially on two tables with as many as 50 or 100 million records in each table. These counts take a long time so having table locks applied is not a good idea in general. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From fuller.artful at gmail.com Wed Dec 7 10:46:20 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Dec 2011 11:46:20 -0500 Subject: [dba-SQLServer] NoSQL etc. Message-ID: I have downloaded and installed a couple of these but not yet discovered any practical (from my POV) applications of this. From what I can gather from the ReadMes etc., they are basically a key-value collection, which it would seem is designed for web-apps whose principal task is to rapidly and scalably retrieve values from the db. It's not readily apparent how this might be applied to a relational database (say, Customers, Orders, OrderDetails and Products). Does anyone have any insight into actual use of these technologies? -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From davidmcafee at gmail.com Wed Dec 7 11:12:10 2011 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 7 Dec 2011 09:12:10 -0800 Subject: [dba-SQLServer] Does count(*) lock the table? In-Reply-To: <4EDF8DB4.2030500@colbyconsulting.com> References: <4EDF8DB4.2030500@colbyconsulting.com> Message-ID: Use: WITH (NOLOCK) like this: SELECT COUNT(SomeField) FROM SomeTable WITH (NOLOCK) On Wed, Dec 7, 2011 at 8:00 AM, jwcolby wrote: > I have a half dozen tables which I need to get counts of valid records > for. Additionally I need to get counts where the two tables join on a > common field - HashPerson, HashFamily and HashAddress. > > We have written a process in C# which dynamically generates these count > SQL statements, passes it off to SQL Server, gets the results back and > populates a spreadsheet with the answers. As it happens there is an entire > "table" or square area of the spreadsheet for the intersection (as I call > it) counts for each of those hashes, IOW an entire section for HashPerson > counts, another for HashFamily and another for hashAddress. > > Since I am working in C# and each Hash area is a class instance, and since > I have threads available in C#, and since it was taking about 5 hours to > run all these counts, I decided to thread it and run each Hash on it's own > thread, IOW try and get the counts for the HashPerson, HashFamily and > HashAddress "simultaneously". I have 12 cores and about 50 gigs of memory > assigned to SQL Server so I thought *maybe* it would work. > > Well... it appears that at some point very early on, something locks the > process and only one of the hash classes proceeds. When that one finishes > then the other two process together. > > We are checking whether we are having deadlock issues in C# but I need to > know whether SQL Server itself would lock the tables that the count was > processing. > > So the question is, does SQL Server apply locks to a table when doing a > count of the records in the table. Likewise if I join two tables and do a > count on that, does that cause a lock to be applied to either or both of > the tables. > > If so is there a syntax I can use to prevent this lock? I am doing a join > potentially on two tables with as many as 50 or 100 million records in each > table. These counts take a long time so having table locks applied is not > a good idea in general. > > -- > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From stuart at lexacorp.com.pg Wed Dec 7 14:30:42 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Dec 2011 06:30:42 +1000 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: Message-ID: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> I haven't actually tried any, but from everything I've read about them, that's my take on them too. They are very useful for quick retrieval of data atoms from huge datasets but don't do hierarchical structures well. I guess it would be good for a document storage/retreival system with full text indexing -- Stuart On 7 Dec 2011 at 11:46, Arthur Fuller wrote: > I have downloaded and installed a couple of these but not yet discovered > any practical (from my POV) applications of this. From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. It's not readily apparent how this > might be applied to a relational database (say, Customers, Orders, > OrderDetails and Products). > > Does anyone have any insight into actual use of these technologies? > > -- > Cell: 647.710.1314 > > Thirty spokes converge on a hub > but it's the emptiness > that makes a wheel work > -- from the Daodejing > _______________________________________________ > 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 Dec 7 15:24:22 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Dec 2011 16:24:22 -0500 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> References: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> Message-ID: Pleased as I am to receive your agreement, I remain open to the possibility that I am missing something here. To take one example, the Windows repository seems to do fairly well with key-value pairs plus a hierarchical arrangement, so let's grant those folks a + in the Advantages column, and also a - in the Disadvantages column. All that said and given, strengths and weaknesses admitted, the question remains: is this NoSQL technology useful for any transactional db/website? Frankly, I have no idea, and am seeking experience and insight. For the sake of argument, let us suppose a site offering 200K products, grouped in categories (say Motherboards, RAM, hard disks, SSDs, and even for the sake of nostalgia, 3.5 floppies). LOL: a very narrow product-niche: a USB 3.5+5.5 floppy,,, wow, I bet we could sell 100 of those units!). Forgive the aside. The salient point remains, does the NoSQL paradigm draw a line between retrieval-dbs and transactional-dbs? This is not all that different between drawing a line between OLAP and OLTP dbs, with which division I am familiar in both principle and practice. But I am not sure how that knowledge ports to Nowadays, in this allegedly new world of NoSQL dbs. A. From hans.andersen at phulse.com Wed Dec 7 15:57:59 2011 From: hans.andersen at phulse.com (Hans-Christian Andersen) Date: Wed, 7 Dec 2011 13:57:59 -0800 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: Message-ID: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Arthur, > From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, things have got a bit more complicated as some of the "NoSQL" options are doing different things. I've seen one or two which try to be a hybrid between a relational database and a NoSQL database, but I don't know how successful they have been (not personally played with them). It's not just for web apps, however. It is also very useful in super computing where you deal with a lot of data (often times unstructured), a highly scaled environment and then hadoop is then used in conjunction for data analysis. And, for instance, the Large Hadron Collider is using NoSQL to store their data as well and Rackspace is using it for backend cloud storage. Those are some use cases that come to mind and there are more, but you may find that it has very little use in whatever project and field of work you are in. It's not really meant to be a natural replacement of a traditional RDBMS. - Hans On 2011-12-07, at 8:46 AM, Arthur Fuller wrote: > I have downloaded and installed a couple of these but not yet discovered > any practical (from my POV) applications of this. From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. It's not readily apparent how this > might be applied to a relational database (say, Customers, Orders, > OrderDetails and Products). > > Does anyone have any insight into actual use of these technologies? > > -- > Cell: 647.710.1314 > > Thirty spokes converge on a hub > but it's the emptiness > that makes a wheel work > -- from the Daodejing > _______________________________________________ > 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 Dec 7 23:02:43 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 8 Dec 2011 00:02:43 -0500 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> References: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Message-ID: Thanks for the confirmation. Sometimes I get to feeling that I've missed the train :) A. On Wed, Dec 7, 2011 at 4:57 PM, Hans-Christian Andersen < hans.andersen at phulse.com> wrote: > > Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, > things have got a bit more complicated as some of the "NoSQL" options are > doing different things. I've seen one or two which try to be a hybrid > between a relational database and a NoSQL database, but I don't know how > successful they have been (not personally played with them). > > It's not just for web apps, however. It is also very useful in super > computing where you deal with a lot of data (often times unstructured), a > highly scaled environment and then hadoop is then used in conjunction for > data analysis. And, for instance, the Large Hadron Collider is using NoSQL > to store their data as well and Rackspace is using it for backend cloud > storage. Those are some use cases that come to mind and there are more, but > you may find that it has very little use in whatever project and field of > work you are in. It's not really meant to be a natural replacement of a > traditional RDBMS. > > - Hans > > > From hans.andersen at phulse.com Thu Dec 8 03:22:39 2011 From: hans.andersen at phulse.com (Hans-Christian Andersen) Date: Thu, 8 Dec 2011 01:22:39 -0800 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Message-ID: Well, I think it's always worth knowing about, since it is only going to become more relevant as everything goes to the cloud, but I can't speak for you on what the cost vs benefit for you would be and whether you ever expect to work in a relevant field of software engineering that would require it. Also, one never knows where & how technology evolves even 2-3 years from now. As for myself, as a web developer/architect, it is something I have worked on already and it is very relevant to my future career to have some familiarity. Best regards, Hans-Christian Andersen On 7 Dec 2011, at 21:02, Arthur Fuller wrote: > Thanks for the confirmation. Sometimes I get to feeling that I've missed > the train :) > A. > > On Wed, Dec 7, 2011 at 4:57 PM, Hans-Christian Andersen < > hans.andersen at phulse.com> wrote: > >> >> Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, >> things have got a bit more complicated as some of the "NoSQL" options are >> doing different things. I've seen one or two which try to be a hybrid >> between a relational database and a NoSQL database, but I don't know how >> successful they have been (not personally played with them). >> >> It's not just for web apps, however. It is also very useful in super >> computing where you deal with a lot of data (often times unstructured), a >> highly scaled environment and then hadoop is then used in conjunction for >> data analysis. And, for instance, the Large Hadron Collider is using NoSQL >> to store their data as well and Rackspace is using it for backend cloud >> storage. Those are some use cases that come to mind and there are more, but >> you may find that it has very little use in whatever project and field of >> work you are in. It's not really meant to be a natural replacement of a >> traditional RDBMS. >> >> - Hans >> >> >> > _______________________________________________ > 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 Dec 8 08:18:12 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Dec 2011 09:18:12 -0500 Subject: [dba-SQLServer] SQL Compression - interesting read Message-ID: <4EE0C724.1040604@colbyconsulting.com> http://blogs.msdn.com/b/sqlserverstorageengine/archive/2008/01/18/what-is-page-compression.aspx -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From jwcolby at colbyconsulting.com Thu Dec 8 08:29:32 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Dec 2011 09:29:32 -0500 Subject: [dba-SQLServer] Compression Interesting read - part 2 Message-ID: <4EE0C9CC.8090103@colbyconsulting.com> I had to go find this... http://blogs.msdn.com/b/sqlserverstorageengine/archive/2008/01/18/details-on-page-compression-page-dictionary.aspx -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From Gustav at cactus.dk Fri Dec 9 06:27:28 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Fri, 09 Dec 2011 13:27:28 +0100 Subject: [dba-SQLServer] Localizing SQL Server Reporting Services Reports Message-ID: Hi all http://www.codeproject.com/KB/reporting-services/SQLServer2008Reporting.aspx This is a step-by-step walk-through of how to implement localization for SQL Server Reporting Services (SQL 2008). .. An additional item this article covers .. is the ability to use the un-compiled resource files (*.resx) rather than a compiled DLL. /gustav From marklbreen at gmail.com Mon Dec 12 16:54:32 2011 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 12 Dec 2011 22:54:32 +0000 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE Message-ID: Hello All, I arrived into a customer today with the intention of preparing for a project to automate a process for placing orders in an online database. The process today is that the user sits for four hours and copy and pastes from Excel into a browser. I was hoping to use Selenium to automate that. However, I was disappointed to note that the website is actually an ActiveX control running in IE. That leaves me with options such as a) using other macro software, attempt to automate the process b) find out how to programatically manipulate an ActiveX c) some other option not thought of yet. I am asking the list whether you have any advice to give? If this ActiveX has been installed on the PC and runs well, how difficult would it be to execute all the functionality it offers? I may have no documentation. Does my question even make sense? Your advice, as always, is appreciated. thanks Mark PS, Happy Birthday to Rocky From stuart at lexacorp.com.pg Mon Dec 12 17:24:54 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 13 Dec 2011 09:24:54 +1000 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE In-Reply-To: References: Message-ID: <4EE68D46.17017.DD4A55B@stuart.lexacorp.com.pg> Two approaches which I would use in this situation: 1. Put Wireshark or similar on the PC and monitor the HTTP(S?) traffic when orders are being placed with the current system. Then you'll know exactly what needs to be sent to the online application and what responses it generates. Having done that, decide if it feasible to write another application to send and receive the same HTTP(S?) traffic. (Hint PowerBASIC is great for that sort of thing ) If that it is not feasible: - 2. Write an AutoIt application to extract the data from the spreadsheet and feed it to the ActiveX screen. -- Stuart On 12 Dec 2011 at 22:54, Mark Breen wrote: > Hello All, > > I arrived into a customer today with the intention of preparing for a > project to automate a process for placing orders in an online database. > > The process today is that the user sits for four hours and copy and pastes > from Excel into a browser. I was hoping to use Selenium to automate that. > > However, I was disappointed to note that the website is actually an ActiveX > control running in IE. > > That leaves me with options such as > > a) using other macro software, attempt to automate the process > b) find out how to programatically manipulate an ActiveX > c) some other option not thought of yet. > > I am asking the list whether you have any advice to give? If this ActiveX > has been installed on the PC and runs well, how difficult would it be to > execute all the functionality it offers? I may have no documentation. > > Does my question even make sense? > > Your advice, as always, is appreciated. > > thanks > > Mark > > PS, Happy Birthday to Rocky > _______________________________________________ > 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 Dec 14 12:58:06 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 14 Dec 2011 10:58:06 -0800 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE In-Reply-To: References: Message-ID: First, Happy belated birthday Rocky! Second, Does the customer have control of the online database? if so the automation could just be made at the Excel spreadsheet to push out to the online db. right? if it's a 3rd party database, then automation might just be key, take a look at http://www.autohotkey.com/ we use it here to help control our touchscreen kiosk. -Francisco http://bit.ly/sqlthis | Tsql and More... On Mon, Dec 12, 2011 at 14:54, Mark Breen wrote: > Hello All, > > I arrived into a customer today with the intention of preparing for a > project to automate a process for placing orders in an online database. > > The process today is that the user sits for four hours and copy and pastes > from Excel into a browser. I was hoping to use Selenium to automate that. > > However, I was disappointed to note that the website is actually an ActiveX > control running in IE. > > That leaves me with options such as > > a) using other macro software, attempt to automate the process > b) find out how to programatically manipulate an ActiveX > c) some other option not thought of yet. > > I am asking the list whether you have any advice to give? If this ActiveX > has been installed on the PC and runs well, how difficult would it be to > execute all the functionality it offers? I may have no documentation. > > Does my question even make sense? > > Your advice, as always, is appreciated. > > thanks > > Mark > > PS, Happy Birthday to Rocky > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fhtapia at gmail.com Thu Dec 15 13:48:34 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 15 Dec 2011 11:48:34 -0800 Subject: [dba-SQLServer] Sql Server 2008 VTF and SQL CLR Message-ID: have any of you worked with Table Valued Functions yet? I know how to create a SQL value table function in pure TSQL, but getting one to work that's built off of SQL CLR is something new entirely to me :phew: My sample here is simple, but the idea is that I'm going to be calling a webservice to collect some data. I'd like to have at least a two column table returned so that I can create labels or maybe a multi-column with the appropriate column name. here is my working code from c# and this does yield me a working returned table. As always your help is appreciated! [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", TableDefinition = "Field1 nvarchar(20)")] public static IEnumerable fngetTEST(string strSomeInput) { ArrayList myList = new ArrayList(); myList.Add("test1"); myList.Add("test2"); return new ArrayList(myList); } private static void getFillRow(object obj, out SqlString strField1 ) { strField1 = Convert.ToString(obj); } -Francisco http://bit.ly/sqlthis | Tsql and More... From fuller.artful at gmail.com Fri Dec 16 09:03:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 16 Dec 2011 10:03:12 -0500 Subject: [dba-SQLServer] Oracle sued Message-ID: >From slashdot: *"Montclair State University is suing Oracle in connection with a troubled ERP (enterprise resource planning) project. Montclair's complaint, filed Tuesday in U.S. District Court for the District of New Jersey, states that Oracle made an array of 'intentionally false statements' regarding the functionality of its base ERP system, the amount of customization that would be required, and the amount of 'time, resources, and personnel that the University would have to devote.' 'Ultimately, after missing a critical go-live deadline for the University's finance system, Oracle sought to extort millions of dollars from the University by advising the University that it would not complete the implementation of the ... project unless the University agreed to pay millions of dollars more than the fixed fee the University and Oracle had previously agreed to,' it adds."* Arthur -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From fhtapia at gmail.com Fri Dec 16 18:38:03 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Fri, 16 Dec 2011 16:38:03 -0800 Subject: [dba-SQLServer] Sql Server 2008 VTF and SQL CLR In-Reply-To: References: Message-ID: this works now... working demo code: private class myRows { public SqlInt32 PKID; public SqlString strValue; public myRows(SqlInt32 pkid, SqlString strvalue) { PKID = pkid; strValue = strvalue; } } [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", TableDefinition = "pkid int,Field1 nvarchar(20)")] public static IEnumerable fngetTEST(string strSomeInput) { ArrayList myArray = new ArrayList(); myArray.Add(new myRows(0, "Field1")); myArray.Add(new myRows(1, "Field2")); myArray.Add(new myRows(2, "Field3")); myArray.Add(new myRows(3, "Field4")); return new ArrayList(myArray); } private static void getFillRow( object arrayObj, out SqlInt32 intPKID, out SqlString strField1 ) { myRows MyRows = (myRows)arrayObj; intPKID = MyRows.PKID; strField1 = MyRows.strValue; } -Francisco http://bit.ly/sqlthis | Tsql and More... On Thu, Dec 15, 2011 at 11:48, Francisco Tapia wrote: > have any of you worked with Table Valued Functions yet? I know how to > create a SQL value table function in pure TSQL, but getting one to work > that's built off of SQL CLR is something new entirely to me :phew: My > sample here is simple, but the idea is that I'm going to be calling a > webservice to collect some data. I'd like to have at least a two column > table returned so that I can create labels or maybe a multi-column with the > appropriate column name. > > here is my working code from c# and this does yield me a working returned > table. > > As always your help is appreciated! > > [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", > TableDefinition = "Field1 nvarchar(20)")] > public static IEnumerable fngetTEST(string strSomeInput) > { > ArrayList myList = new ArrayList(); > myList.Add("test1"); > myList.Add("test2"); > return new ArrayList(myList); > } > private static void getFillRow(object obj, > out SqlString strField1 > > ) > { > strField1 = Convert.ToString(obj); > } > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > > > > From accessd at shaw.ca Wed Dec 28 14:42:55 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 28 Dec 2011 12:42:55 -0800 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: References: Message-ID: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> You have to look no further than the NoSQL super database called Hadoop. Development in this product has been drawing the best and the brightest from all over the computer world. With databases now exceeded 100 million records the SQL structured DBs no longer functions well in this new environment. http://tinyurl.com/d28d3r6 Jim From stuart at lexacorp.com.pg Wed Dec 28 15:55:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 29 Dec 2011 07:55:19 +1000 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> Message-ID: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Yada, yada, yada. Still evangelising I see :-) 100 million records is not per se a problem for a SQL structured DB. No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. You might just as well say: With images exceeding several megabytes in size, NoAccess is much better than Access for manipulating graphic data. Take for instance the NoAcess super application called PhotoShop. -- Stuart On 28 Dec 2011 at 12:42, Jim Lawrence wrote: > You have to look no further than the NoSQL super database called Hadoop. > Development in this product has been drawing the best and the brightest from > all over the computer world. > > With databases now exceeded 100 million records the SQL structured DBs no > longer functions well in this new environment. > > http://tinyurl.com/d28d3r6 > > Jim > > _______________________________________________ > dba-Tech mailing list > dba-Tech at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-tech > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Wed Dec 28 16:20:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 28 Dec 2011 14:20:38 -0800 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: It does not matter what you or I think, it what is important and real. That what is super hot in the computer business is Hadoop. I may never use the product other than to play with but we have to keep abreast on the market trends. The difference between NoSQL and SQL databases is like Mya and Photoshop...one processes thousands of images and one, just one image at a time. We may never need anything more than Photoshop but for those in the image and movie business, Mya is one of the products of choice. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, December 28, 2011 1:55 PM To: 'Discussion of Hardware and Software issues'; 'Discussion concerning Visual Basic and related programming issues.'; 'Discussion concerning MS SQL Server' Subject: Re: [dba-SQLServer] So what is super hot in the tech world? Yada, yada, yada. Still evangelising I see :-) 100 million records is not per se a problem for a SQL structured DB. No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. You might just as well say: With images exceeding several megabytes in size, NoAccess is much better than Access for manipulating graphic data. Take for instance the NoAcess super application called PhotoShop. -- Stuart On 28 Dec 2011 at 12:42, Jim Lawrence wrote: > You have to look no further than the NoSQL super database called Hadoop. > Development in this product has been drawing the best and the brightest from > all over the computer world. > > With databases now exceeded 100 million records the SQL structured DBs no > longer functions well in this new environment. > > http://tinyurl.com/d28d3r6 > > Jim > > _______________________________________________ > dba-Tech mailing list > dba-Tech at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-tech > Website: 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 Wed Dec 28 16:45:02 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Dec 2011 17:45:02 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: <4EFB9BEE.7040103@colbyconsulting.com> LOL. I like it. NoAccess... John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > Yada, yada, yada. > > Still evangelising I see :-) > > 100 million records is not per se a problem for a SQL structured DB. > > No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, > > NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. > > You might just as well say: > With images exceeding several megabytes in size, NoAccess is much better than Access for > manipulating graphic data. Take for instance the NoAcess super application called > PhotoShop. > > From fuller.artful at gmail.com Wed Dec 28 17:32:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Dec 2011 18:32:34 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9BEE.7040103@colbyconsulting.com> References: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> <4EFB9BEE.7040103@colbyconsulting.com> Message-ID: >From what I've read and what I've installed and cruised, the NoSQL solutions seem ideal for retrieval of non-hierarchical DB queries (e.g. web pages requiring lookup of either static pages or templates to be filled in), and totally wrong for transactional DBs. I am not making a judgement here, for or against; just saying that on my read these technologies serve different purposes. And while we're at it, let's also discuss the concept of partitioning: in most transactional cases, what occurred a year ago is History (i.e. not subject to updates), and what occurred more recently is potentially subject to updates. This leads to the concept of vertical partitioning, in which all data older than a year (or month, or whatever unit is deemed appropriate) is stored in a partition, while the Live data is stored in the Here and Now. This in turn requires at least a few queries that inspect and select from both partitions; not in itself problematic, but it ought to be recognized as a distinctly separate task than querying the live data, however that may be defined. I do love the concept of a SQL implementation entirely stored in RAM, and current technologies make most of this possible. For example, let us suppose, given the partitioning described above, that the current year's data resides entirely in RAM, and the previous years' data resides on disc. Then all the transactional events could occur at RAM-speed, with periodic writes to disc in user-defined periodicity. That in turn implies that the current stuff exists in one database and the historical stuff in another, and that scheduled jobs move the data out of Current and into History. The gains in such an approach increase in reverse-proportion to the timeline defined as Current, and this, IMO, is significant: suppose that the time-frontier shrinks to the past 30 days. That would easily enable most transactional DBs to store everything of interest in RAM, and on occasion reach deeper into the past (imagine a banking app that lets you print a statement dating back 30/60/90/120/all: the most frequent queries could be done from RAM, and the progressively more distant queries require an increasingly deep reach into disc storage). Architecturally, this approach is not a problem. However, I don't think that the NoSQL solutions are designed to solve this. I could be wrong on my read, but so far I think that NoSQL is designed for different problems. The up-side is, I also don't think that any vendor has approached this problem in precisely this way. Vertical partitioning goes 80% of what this demands, but not 100%, and therein lies an opportunity for some entrepreneur or major vendor to step up and provide it. I'll even supply the requirements: a) all the "current" transactional data resides in RAM (add as much RAM as you need) b) scheduled processes move older transactions from the RAM DB into the History DB c) queries designed to pull data from both Current and History should be easy to create d) History DB is itself partitioned, say by year, so that any given query wanting the Current and History (previous two years) need no rewriting as time goes on. First vendor to supply this in a wizard-like install/define UI owes me 1% of the revenue -- just a suggestion LOL. Arthur On Wed, Dec 28, 2011 at 5:45 PM, jwcolby wrote: > LOL. > > I like it. NoAccess... > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > > On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > >> Yada, yada, yada. >> >> Still evangelising I see :-) >> >> 100 million records is not per se a problem for a SQL structured DB. >> >> No matter how many times people claim that it is, NoSQL is NOT a >> replacement for SQL, >> >> NoSQL is just a group of solutions to manage types of data that SQL is >> not ideal for. >> >> You might just as well say: >> With images exceeding several megabytes in size, NoAccess is much better >> than Access for >> manipulating graphic data. Take for instance the NoAcess super >> application called >> PhotoShop. >> >> >> > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From jwcolby at colbyconsulting.com Wed Dec 28 19:22:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Dec 2011 20:22:24 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: <4EFBC0D0.2030800@colbyconsulting.com> Yes, and everything I have read, the big brains in that technology say "it isn't a replacement for SQL databases". So the folks really in the know about NoSQL are saying point blank that NoSQL solves different problems and you still need SQL for problems that SQL fits. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > Yada, yada, yada. > > Still evangelising I see :-) > > 100 million records is not per se a problem for a SQL structured DB. > > No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, > > NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. > > You might just as well say: > With images exceeding several megabytes in size, NoAccess is much better than Access for > manipulating graphic data. Take for instance the NoAcess super application called > PhotoShop. > > From bogus@does.not.exist.com Thu Dec 29 10:16:19 2011 From: bogus@does.not.exist.com () Date: Thu, 29 Dec 2011 16:16:19 -0000 Subject: No subject Message-ID: where all your users login and are now authenticated, and trusted, so if their login group is accepted to select/update whatever on the sqlserver, then it does so w/o any additional checks since the users is now trusted. But I may be wrong in my understanding.... -Francisco http://rcm.netfirms.com ----- Original Message ----- From: "Arthur Fuller" To: Sent: Monday, February 24, 2003 6:33 AM Subject: RE: [dba-SQLServer]ACCESS 2000 Run Time and Office XP - Can't print : At home I have a very small (4 boxes) network using a LinkSys router. All : the boxes run Windows XP. SQL 2000 is installed on Box 1. MSDE is installed : on Box 2. Enterprise Manager is installed on Box 1, and I have registered : the MSDE server on Box 2. (Boxes 3 and 4 have no SQL components installed.) : Currently, it is set up using integrated security. Prior to the demise of : ETS, I set up their system as separate security (i.e. a Windows login + a : SQL login). : Much of the MS material I have seen suggests that integrated security is the : way to go. That's why I set up my home network that way. Wouldn't you know : it, though? My very next client wants the separate security model. : So, my questions: : 1. What must I do to turn my home network back into the separate security : model? : 2. How easy will it be for me to switch back and forth between security : models? : 3. What exactly is a trusted server? How do you set one up? : : TIA, : Arthur From bogus@does.not.exist.com Thu Dec 29 10:16:19 2011 From: bogus@does.not.exist.com () Date: Thu, 29 Dec 2011 16:16:19 -0000 Subject: No subject Message-ID: [WHERE | ] ::= column_name { *= | =* } column_name Arguments Restricts the rows returned in the result set through the use of predicates. There is no limit to the number of predicates that can be included in a search condition. For more information about search conditions and predicates, see Search Condition. Specifies an outer join using the nonstandard product-specific syntax and the WHERE clause. The *= operator is used to specify a left outer join and the =* operator is used to specify a right outer join. This example specifies a left outer join in which the rows from Tab1 that do not meet the specified condition are included in the result set: SELECT Tab1.name, Tab2.idFROM Tab1, Tab2WHERE Tab1.id *=Tab2.id Note Using this syntax for outer joins is discouraged because of the potential for ambiguous interpretation and because it is nonstandard. Instead, specify joins in the FROM clause. It is possible to specify outer joins by using join operators in the FROM clause or by using the non-standard *= and =* operators in the WHERE clause. The two methods cannot both be used in the same statement." > No that's actually multiplying the value and setting it eqaal to the left > side of the equation. > > Var1 *= Var2 is the equivalent of Var1 = Var1 * Var2 > > Works in VB but not VBA (There are others like +=, /=, etc....) > > Chris Mackin > www.denverdb.com > Denver Database Consulting, LLC > > > -----Original Message----- > From: dba-sqlserver-admin at databaseadvisors.com > [mailto:dba-sqlserver-admin at databaseadvisors.com]On Behalf Of Susan > Harkins > Sent: Thursday, March 06, 2003 6:57 PM > To: SQLList > Subject: [dba-SQLServer]* in field name? > > > where bc.carrera=a.carrera > and bc.plan_estud=a.plan_estud > and a.boleta*=k.boleta > > =======Ran across what appears to be an unusual syntax -- the use of * in a > field name? Is that what this is? What does this mean or am I > misunderstanding what I'm seeing? > > Susan H. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. From bogus@does.not.exist.com Thu Dec 29 10:16:19 2011 From: bogus@does.not.exist.com () Date: Thu, 29 Dec 2011 16:16:19 -0000 Subject: No subject Message-ID: [WHERE | ] ::= column_name { *= | =* } column_name Arguments Restricts the rows returned in the result set through the use of predicates. There is no limit to the number of predicates that can be included in a search condition. For more information about search conditions and predicates, see Search Condition. Specifies an outer join using the nonstandard product-specific syntax and the WHERE clause. The *= operator is used to specify a left outer join and the =* operator is used to specify a right outer join. This example specifies a left outer join in which the rows from Tab1 that do not meet the specified condition are included in the result set: SELECT Tab1.name, Tab2.idFROM Tab1, Tab2WHERE Tab1.id *=Tab2.id Note Using this syntax for outer joins is discouraged because of the potential for ambiguous interpretation and because it is nonstandard. Instead, specify joins in the FROM clause. It is possible to specify outer joins by using join operators in the FROM clause or by using the non-standard *= and =* operators in the WHERE clause. The two methods cannot both be used in the same statement." > No that's actually multiplying the value and setting it eqaal to the > left side of the equation. > > Var1 *= Var2 is the equivalent of Var1 = Var1 * Var2 > > Works in VB but not VBA (There are others like +=, /=, etc....) > > Chris Mackin > www.denverdb.com > Denver Database Consulting, LLC > > > -----Original Message----- > From: dba-sqlserver-admin at databaseadvisors.com > [mailto:dba-sqlserver-admin at databaseadvisors.com]On Behalf Of Susan > Harkins > Sent: Thursday, March 06, 2003 6:57 PM > To: SQLList > Subject: [dba-SQLServer]* in field name? > > > where bc.carrera=a.carrera > and bc.plan_estud=a.plan_estud > and a.boleta*=k.boleta > > =======Ran across what appears to be an unusual syntax -- the use of * > in a field name? Is that what this is? What does this mean or am I > misunderstanding what I'm seeing? > > Susan H. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From bogus@does.not.exist.com Thu Dec 29 10:16:19 2011 From: bogus@does.not.exist.com () Date: Thu, 29 Dec 2011 16:16:19 -0000 Subject: No subject Message-ID: [WHERE | ] ::= column_name { *= | =* } column_name Arguments Restricts the rows returned in the result set through the use of predicates. There is no limit to the number of predicates that can be included in a search condition. For more information about search conditions and predicates, see Search Condition. Specifies an outer join using the nonstandard product-specific syntax and the WHERE clause. The *= operator is used to specify a left outer join and the =* operator is used to specify a right outer join. This example specifies a left outer join in which the rows from Tab1 that do not meet the specified condition are included in the result set: SELECT Tab1.name, Tab2.idFROM Tab1, Tab2WHERE Tab1.id *=Tab2.id Note Using this syntax for outer joins is discouraged because of the potential for ambiguous interpretation and because it is nonstandard. Instead, specify joins in the FROM clause. It is possible to specify outer joins by using join operators in the FROM clause or by using the non-standard *= and =* operators in the WHERE clause. The two methods cannot both be used in the same statement." > No that's actually multiplying the value and setting it eqaal to the > left side of the equation. > > Var1 *= Var2 is the equivalent of Var1 = Var1 * Var2 > > Works in VB but not VBA (There are others like +=, /=, etc....) > > Chris Mackin > www.denverdb.com > Denver Database Consulting, LLC > > > -----Original Message----- > From: dba-sqlserver-admin at databaseadvisors.com > [mailto:dba-sqlserver-admin at databaseadvisors.com]On Behalf Of Susan > Harkins > Sent: Thursday, March 06, 2003 6:57 PM > To: SQLList > Subject: [dba-SQLServer]* in field name? > > > where bc.carrera=a.carrera > and bc.plan_estud=a.plan_estud > and a.boleta*=k.boleta > > =======Ran across what appears to be an unusual syntax -- the use of * > in a field name? Is that what this is? What does this mean or am I > misunderstanding what I'm seeing? > > Susan H. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. _______________________________________________ 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 michael at ddisolutions.com.au Thu Dec 1 01:02:23 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 1 Dec 2011 18:02:23 +1100 Subject: [dba-SQLServer] MySQL question References: <99266C61B516644D9727F983FAFAB46511B8E4@remote.ddisolutions.com.au> Message-ID: <99266C61B516644D9727F983FAFAB46511B8F6@remote.ddisolutions.com.au> Thanks guys, I could login, and I found the show databases command. No database installed. I have referred the issue back to their support people. Show give me some time to get my head around it all. Cheers Michael M For starters, try to log in using the command line tool. If you make it that far, enter "show databases". You will get at least one ("test") and perhaps more. Assuming you get that far, try a Create Database command and see what happens. As far as copying the client's database, the specifics will pertain to which engine is in use. HTH, Arthur On Wed, Nov 30, 2011 at 2:56 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Hi Guys, > > I know this is slightly OT but... > > My client was supposed to install a 3rd party app and set it's database > up as SQL Server. > However events have occurred and now they have a MySQL database they > want me to use! > I've never used MySQL as a datasource but I'll assume it should be ok. I > only have to read, no writes, which is something I suppose. > > I'm downloading 5.5 and the Workbench for testing here. > > I only have access to the clients pc with MySQL installed using > TeamViewer, basically a remote desktop tool for those not on the domain. > When I look at the 3rd party apps options page the database stuff IS NOT > SETUP. > How can I tell if the database is in fact installed? Only the command > line client is installed. I REFUSE to do any installations of tools on > their PC... > > Is there a simple way to backup their database (if it exists) and then > load it here? > They only gave me the password to MySQL. Which does work in the command > line tool, not that I know what to do with it :-/ > > Sorry for the OT. > > Cheers > > Michael M > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1411 / Virus Database: 2092/4047 - Release Date: 11/29/11 From jwcolby at colbyconsulting.com Sun Dec 4 09:59:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 10:59:19 -0500 Subject: [dba-SQLServer] Users in SQL Server Message-ID: <4EDB98D7.30009@colbyconsulting.com> Several times now I have run into an issue where SQL Server does not have a pair of users I use for my Access application called DiscoAdmin and DiscoApp. The problem is that one of the the databases that I am picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. Basically I am able to create the user but not assign rights - db_reader, db_writer etc. I have always been fuzzy about how this stuff works and I just need an explanation of why it won't allow me to set these rights even though the user exists and the check boxes are enabled when I select that database. I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. Any assistance great fully accepted. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From jwcolby at colbyconsulting.com Sun Dec 4 10:13:31 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 11:13:31 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDB98D7.30009@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> Message-ID: <4EDB9C2B.1010201@colbyconsulting.com> >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not have a pair of users I use for > my Access application called DiscoAdmin and DiscoApp. The problem is that one of the the databases > that I am picking up on that server was already set up and has those users. When I try to set those > users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an explanation of why it won't > allow me to set these rights even though the user exists and the check boxes are enabled when I > select that database. I just discovered that if I delete the user out in that database and then set > the rights through the user back in the server security stuff it happily accepts my changes and > re-adds the user to the database. This just seems strange. If I don't do this rigamarole then I have > a DiscoApp in the database with a set of rights for that database but when I look at it back at the > server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. From df.waters at comcast.net Sun Dec 4 10:47:12 2011 From: df.waters at comcast.net (Dan Waters) Date: Sun, 4 Dec 2011 10:47:12 -0600 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDB9C2B.1010201@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> Message-ID: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> I was working with a customer and needed to get a database copy for myself. For some reason backup wasn't working (an IT issue), so I decided to detach the database, copy it, and then reattach it. However, I couldn't reattach it because all my rights were associated with that database - once the database was gone so was my right to attach a database! Gotcha! Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, December 04, 2011 10:14 AM To: Discussion concerning MS SQL Server; Access Developers discussion and problem solving Subject: Re: [dba-SQLServer] Users in SQL Server >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not > have a pair of users I use for my Access application called DiscoAdmin > and DiscoApp. The problem is that one of the the databases that I am > picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an > explanation of why it won't allow me to set these rights even though > the user exists and the check boxes are enabled when I select that > database. I just discovered that if I delete the user out in that > database and then set the rights through the user back in the server > security stuff it happily accepts my changes and re-adds the user to > the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. _______________________________________________ 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 Dec 4 12:11:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 13:11:09 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: <4EDBB7BD.6060308@colbyconsulting.com> Yea, this stuff is a mess like I've seldom seen. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 11:47 AM, Dan Waters wrote: > I was working with a customer and needed to get a database copy for myself. > For some reason backup wasn't working (an IT issue), so I decided to detach > the database, copy it, and then reattach it. However, I couldn't reattach > it because all my rights were associated with that database - once the > database was gone so was my right to attach a database! Gotcha! > > Dan > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, December 04, 2011 10:14 AM > To: Discussion concerning MS SQL Server; Access Developers discussion and > problem solving > Subject: Re: [dba-SQLServer] Users in SQL Server > > >I just discovered that if I delete the user out in that database and then > set the rights through the user back in the server security stuff it happily > accepts my changes and re-adds the user to the database. > > Unfortunately after I did this delete / re-add rigamarole I discovered that > all of the rights to objects in the database were removed. For example I > had rights to execute stored procedures assigned to these users but after > deleting the users the rights to execute were lost. > > Sigh. > > This SQL Server Users stuff is really developer unfriendly. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/4/2011 10:59 AM, jwcolby wrote: >> >> Several times now I have run into an issue where SQL Server does not >> have a pair of users I use for my Access application called DiscoAdmin >> and DiscoApp. The problem is that one of the the databases that I am >> picking up on that server was already set up and has those users. When I > try to set those users up in the server's security it tells me that "the > server principal 'DiscoApp' already exists. >> Basically I am able to create the user but not assign rights - db_reader, > db_writer etc. >> >> I have always been fuzzy about how this stuff works and I just need an >> explanation of why it won't allow me to set these rights even though >> the user exists and the check boxes are enabled when I select that >> database. I just discovered that if I delete the user out in that >> database and then set the rights through the user back in the server >> security stuff it happily accepts my changes and re-adds the user to >> the database. This just seems strange. If I don't do this rigamarole then > I have a DiscoApp in the database with a set of rights for that database but > when I look at it back at the server level it does not reflect those rights > for that user for that database. >> >> Any assistance great fully accepted. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fuller.artful at gmail.com Sun Dec 4 12:13:43 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 4 Dec 2011 13:13:43 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: For over five years I worked (full-time but contract, gradually lessening to part-time contract, as more and more got put in place). But pretty much at the outset, I told the owners of the firm that I was the super-user, at least insofar as the database was concerned, and that I would suggest db-inherited permission levels according to SQL Server. This (at the db level) meant four levels of permission: sales, department manager, senior manager, and God (me). the only one with absolute control over the db. I told them flat-out that I didn't trust their modest skills to fork with their essential data. Now, obviously this approach wouldn't have worked in a larger organization, but the underlying point remains similar, IMO. Either you trust me, as the designer and developer of your core asset (the bricks and mortar, in comparison, are trivial -- the Big Asset is the db), to serve and protect and revise and re-design as exigencies and business priorities emerge, or you don't. And if the latter, then I'm off to work for someone who understands and respects boundaries. To this admittedly authoritarian attitude, I also provided the means, passwords, etc. that would be needed in the event of a bus rolling over me, or similar unforeseen events. On the other hand, I spent a while on a multi-million dollar project managed (allegedly) by a very large consulting firm, owned in half by MS, which dictated the use of MS products entirely throughout the solution. Numerous problems that could have been solved almost instantly by switching to Oracle or PostGres were off the table due to the heavy participation of MS. The information was very confidential, and the first thing the DB designer did was isolate virtually everyone from accessing the actual data. When creating a sproc or view, we got back rows of asterisks, so as not to violate privacty restrictions. We were held down to verifying accuracy by the number of rows returned by any given sproc or view or query. On this project, to further complicate matters, there were 8 servers, each with a DB of a TB or more, and some of the joins required grabbing data from more than one server, and occasionally more than one DB on some of the servers. It took a couple of years to figure out how all this might work (maybe that means I'm insufficiently aware of these complexities; but my superiors had the same problems: how to mask all the data while also being able to prove that any given sproc delivered the required result-set). I call this "working in handcuffs"; I appreciate the need for secrecy and privacy in certain domains, and in this particular example can fully appreciate why us developers were not granted access to the specific data in the rows returned (without giving too much away, think "rows containing HIV-positive persons, their health records, their history of physicians, etc.). All this pretty much describes why I prefer to work for SMBs than giant federal or even provincial ministries. I have worked for both, at length, and I prefer the smaller and more achievable projects. Just IME and my $0.02. A. From jwcolby at colbyconsulting.com Sun Dec 4 12:50:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 13:50:07 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> Message-ID: <4EDBC0DF.6070300@colbyconsulting.com> I understand and agree but that really isn't the point in this case. I have total access and nobody else understands anything, never mind the tiny amount that I understand. My problem really is that I don't understand the whole SQL Server users / roles thing and I keep screwing stuff up. I had SQL Server 2005 express set up and functioning. I had set up users at the server level to allow specific limited functionality to a couple of "users". These weren't really users as in the domain, but rather a DiscopApp user, in other words my disco (Access) application. That user was set up as a user at the server level, without which (AFAICT) the application could not even log on to the server. Then the database(s) had to have that user as well or the application couldn't execute stored procedures and stuff. 1) Log on to sql server 2) Do stuff in the database. But... the users in the server security system are NOT the same user as the same user with the same name in the database security system. New physical server, new installation of SQL Server. I disconnected the database and reconnected it in the new machine. The database still had the users I set up but... those user's aren't the SQL Server security. When I tried to add the users in SQL Server side I could do that but I couldn't add their permissions in the database because... THEY ALREADY EXISTED (in the database). What an abortion. I go Google this mess and yep... it's an abortion! This is really one of those places where our full time SQL Server admins are shaking their heads and telling me (or at least thinking) that since I don't have the time to learn all of the arcane asininities required to be a knowledgable SQL Server admin I have no business using SQL Server. Sadly, I have no choice. Sadly SQL Server makes no apparent effort to provide wizards to help me out. It seems like a no brainer to have a little wizard that would move the user stuff stored in a database up to the server level so that the user could be used to log in to SQL Server. Sadly I have to learn the arcane asininities required to do this from the command prompt. Apparently it can be done from the command line (some how). Or tell my client they need to hire a SQL Server admin and put him to work doing office installs in the 95% of his time that will be free to do things other than SQL Server. SQL Server is insanely powerful when it is not beating you over the head with arcane asininities. ;) John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 1:13 PM, Arthur Fuller wrote: > For over five years I worked (full-time but contract, gradually lessening > to part-time contract, as more and more got put in place). But pretty much > at the outset, I told the owners of the firm that I was the super-user, at > least insofar as the database was concerned, and that I would suggest > db-inherited permission levels according to SQL Server. This (at the db > level) meant four levels of permission: sales, department manager, senior > manager, and God (me). the only one with absolute control over the db. I > told them flat-out that I didn't trust their modest skills to fork with > their essential data. > > Now, obviously this approach wouldn't have worked in a larger organization, > but the underlying point remains similar, IMO. Either you trust me, as the > designer and developer of your core asset (the bricks and mortar, in > comparison, are trivial -- the Big Asset is the db), to serve and protect > and revise and re-design as exigencies and business priorities emerge, or > you don't. And if the latter, then I'm off to work for someone who > understands and respects boundaries. > > To this admittedly authoritarian attitude, I also provided the means, > passwords, etc. that would be needed in the event of a bus rolling over me, > or similar unforeseen events. > > On the other hand, I spent a while on a multi-million dollar project > managed (allegedly) by a very large consulting firm, owned in half by MS, > which dictated the use of MS products entirely throughout the solution. > Numerous problems that could have been solved almost instantly by switching > to Oracle or PostGres were off the table due to the heavy participation of > MS. > > The information was very confidential, and the first thing the DB designer > did was isolate virtually everyone from accessing the actual data. When > creating a sproc or view, we got back rows of asterisks, so as not to > violate privacty restrictions. We were held down to verifying accuracy by > the number of rows returned by any given sproc or view or query. On this > project, to further complicate matters, there were 8 servers, each with a > DB of a TB or more, and some of the joins required grabbing data from more > than one server, and occasionally more than one DB on some of the servers. > > It took a couple of years to figure out how all this might work (maybe that > means I'm insufficiently aware of these complexities; but my superiors had > the same problems: how to mask all the data while also being able to prove > that any given sproc delivered the required result-set). I call this > "working in handcuffs"; I appreciate the need for secrecy and privacy in > certain domains, and in this particular example can fully appreciate why us > developers were not granted access to the specific data in the rows > returned (without giving too much away, think "rows containing HIV-positive > persons, their health records, their history of physicians, etc.). > > All this pretty much describes why I prefer to work for SMBs than giant > federal or even provincial ministries. I have worked for both, at length, > and I prefer the smaller and more achievable projects. > > Just IME and my $0.02. > > A. > _______________________________________________ > 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 Sun Dec 4 19:50:26 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Sun, 4 Dec 2011 17:50:26 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDBC0DF.6070300@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> Message-ID: <1126424970034065031@unknownmsgid> John, You're right, but I shake my head because you don't care to learn, and then blame everyone for your shortcomings and unwillingness to try Tip: sp_help_revlogin http://sqlthis.blogspot.com/2006/01/migrating-logins-from-one-sql-server.html?m=1 Sent from my mobile On Dec 4, 2011, at 10:51 AM, jwcolby wrote: > I understand and agree but that really isn't the point in this case. I have total access and nobody else understands anything, never mind the tiny amount that I understand. My problem really is that I don't understand the whole SQL Server users / roles thing and I keep screwing stuff up. > > I had SQL Server 2005 express set up and functioning. I had set up users at the server level to allow specific limited functionality to a couple of "users". These weren't really users as in the domain, but rather a DiscopApp user, in other words my disco (Access) application. That user was set up as a user at the server level, without which (AFAICT) the application could not even log on to the server. Then the database(s) had to have that user as well or the application couldn't execute stored procedures and stuff. > > 1) Log on to sql server > 2) Do stuff in the database. > > But... the users in the server security system are NOT the same user as the same user with the same name in the database security system. New physical server, new installation of SQL Server. I disconnected the database and reconnected it in the new machine. The database still had the users I set up but... those user's aren't the SQL Server security. When I tried to add the users in SQL Server side I could do that but I couldn't add their permissions in the database because... THEY ALREADY EXISTED (in the database). > > What an abortion. > > I go Google this mess and yep... it's an abortion! > > This is really one of those places where our full time SQL Server admins are shaking their heads and telling me (or at least thinking) that since I don't have the time to learn all of the arcane asininities required to be a knowledgable SQL Server admin I have no business using SQL Server. Sadly, I have no choice. Sadly SQL Server makes no apparent effort to provide wizards to help me out. It seems like a no brainer to have a little wizard that would move the user stuff stored in a database up to the server level so that the user could be used to log in to SQL Server. > > Sadly I have to learn the arcane asininities required to do this from the command prompt. Apparently it can be done from the command line (some how). Or tell my client they need to hire a SQL Server admin and put him to work doing office installs in the 95% of his time that will be free to do things other than SQL Server. > > SQL Server is insanely powerful when it is not beating you over the head with arcane asininities. > > ;) > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/4/2011 1:13 PM, Arthur Fuller wrote: >> For over five years I worked (full-time but contract, gradually lessening >> to part-time contract, as more and more got put in place). But pretty much >> at the outset, I told the owners of the firm that I was the super-user, at >> least insofar as the database was concerned, and that I would suggest >> db-inherited permission levels according to SQL Server. This (at the db >> level) meant four levels of permission: sales, department manager, senior >> manager, and God (me). the only one with absolute control over the db. I >> told them flat-out that I didn't trust their modest skills to fork with >> their essential data. >> >> Now, obviously this approach wouldn't have worked in a larger organization, >> but the underlying point remains similar, IMO. Either you trust me, as the >> designer and developer of your core asset (the bricks and mortar, in >> comparison, are trivial -- the Big Asset is the db), to serve and protect >> and revise and re-design as exigencies and business priorities emerge, or >> you don't. And if the latter, then I'm off to work for someone who >> understands and respects boundaries. >> >> To this admittedly authoritarian attitude, I also provided the means, >> passwords, etc. that would be needed in the event of a bus rolling over me, >> or similar unforeseen events. >> >> On the other hand, I spent a while on a multi-million dollar project >> managed (allegedly) by a very large consulting firm, owned in half by MS, >> which dictated the use of MS products entirely throughout the solution. >> Numerous problems that could have been solved almost instantly by switching >> to Oracle or PostGres were off the table due to the heavy participation of >> MS. >> >> The information was very confidential, and the first thing the DB designer >> did was isolate virtually everyone from accessing the actual data. When >> creating a sproc or view, we got back rows of asterisks, so as not to >> violate privacty restrictions. We were held down to verifying accuracy by >> the number of rows returned by any given sproc or view or query. On this >> project, to further complicate matters, there were 8 servers, each with a >> DB of a TB or more, and some of the joins required grabbing data from more >> than one server, and occasionally more than one DB on some of the servers. >> >> It took a couple of years to figure out how all this might work (maybe that >> means I'm insufficiently aware of these complexities; but my superiors had >> the same problems: how to mask all the data while also being able to prove >> that any given sproc delivered the required result-set). I call this >> "working in handcuffs"; I appreciate the need for secrecy and privacy in >> certain domains, and in this particular example can fully appreciate why us >> developers were not granted access to the specific data in the rows >> returned (without giving too much away, think "rows containing HIV-positive >> persons, their health records, their history of physicians, etc.). >> >> All this pretty much describes why I prefer to work for SMBs than giant >> federal or even provincial ministries. I have worked for both, at length, >> and I prefer the smaller and more achievable projects. >> >> Just IME and my $0.02. >> >> A. >> _______________________________________________ >> dba-SQLServer mailing list >> dba-SQLServer at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Dec 4 21:03:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 04 Dec 2011 22:03:40 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <1126424970034065031@unknownmsgid> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> Message-ID: <4EDC348C.1090400@colbyconsulting.com> > You're right, but I shake my head because you don't care to learn LOL of course you do. And of course you have taken the time and effort to become as close to an expert in Access as they come, plus getting there in C# plus build and maintain Virtual Machines in Hyper-V plus build and maintain two server systems to host those SQL Servers and VMs plus build and maintain an UnRaid server to provide near-line backup plus build and maintain a half dozen Hamachi VPNs coming in to your servers plus maintain SQL Server Express backends on each of those networks plus write custom Access FEs to come in over those networks to hit those SQL Servers, and give away (pro-bono) those Access FEs and the networks and the SQL Server Express instances to four different non-profits plus build and maintain Windows Media Center machines for the home plus maintain a total of 11 total machines in your home / office plus ... Oh yea, take the time to become an expert in SQL Server arcane asininities... Blame who for what shortcomings? I mean it isn't like I don't have any shortcomings of course. I don't do well in medicine or nuclear physics or ... hell about a billion things including hmmm... arcane SQL Server asininities... So do you feel like I am I blaming you for some of my shortcomings? The closest I come is grousing about SQL Server arcane asininities which Microsoft doesn't bother to address... > You're right, but I shake my head because you don't care to learn LOL Of course you do. Actually I don't care to learn what I don't absolutely have to learn because I am just a little busy. I didn't mention that I also spend about 6 hours a week volunteering in the prison near my home, or that in 2003 I adopted two babies so I am now a dad of two elementary school kids. Or that my daughter has many different moderate disabilities caused by 7q11.23 Duplication syndrome: http://louisville.edu/psychology/mervis/research/dup.html And yes we took Allie to the University of Louiville to enroll her in this study, and as a result of her disabilities I spend many hours attending IEPs at the school making sure that she gets what she needs and deserves out of a school system which is geared towards shuffling people with disabilities off into a closet somewhere. I also didn't mention the weekend every month for eight months that my wife and I spent training to be advocates for people with disabilities: http://www.ncpartnersinpolicymaking.com/ So yea, I would much prefer a few more wizards to help me out, but given what I do in an average day I pretty much learn what I have to. For some reason arcane SQL Server asininities aren't real high on my list of things I want to spend my time on, though I do understand that there is nothing you would rather do. To each his own I suppose. > You're right, but I shake my head because you don't care to learn LOL Of course you do. And I shake my head because you think you have the right to decide what I should make a priority on my life. Thanks for the tip by the way. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 8:50 PM, Francisco Tapia wrote: > John, > You're right, but I shake my head because you don't care to learn, > and then blame everyone for your shortcomings and unwillingness to try > > Tip: sp_help_revlogin > > http://sqlthis.blogspot.com/2006/01/migrating-logins-from-one-sql-server.html?m=1 > > Sent from my mobile From michael at ddisolutions.com.au Sun Dec 4 23:55:26 2011 From: michael at ddisolutions.com.au (Michael Maddison) Date: Mon, 5 Dec 2011 16:55:26 +1100 Subject: [dba-SQLServer] Users in SQL Server References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> Message-ID: <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> Hi JC, I think this is the sproc you need. sp_change_users_login You'll need to look it up in help for usage details. You can use it to fix orphaned logins with the same name. Which is what you get when you restore a db on another system. The names might be the same but the ID's underlying the names will be different. This sp fixes that issue. *Tip - you can save useful sprocs as a template and reuse them when needed. There should be a tab on the right hand side of SSM Studio. If this doesn't solve your problem then I have misunderstood! Cheers Michael M >I just discovered that if I delete the user out in that database and then set the rights through the user back in the server security stuff it happily accepts my changes and re-adds the user to the database. Unfortunately after I did this delete / re-add rigamarole I discovered that all of the rights to objects in the database were removed. For example I had rights to execute stored procedures assigned to these users but after deleting the users the rights to execute were lost. Sigh. This SQL Server Users stuff is really developer unfriendly. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/4/2011 10:59 AM, jwcolby wrote: > > Several times now I have run into an issue where SQL Server does not > have a pair of users I use for my Access application called DiscoAdmin > and DiscoApp. The problem is that one of the the databases that I am > picking up on that server was already set up and has those users. When I try to set those users up in the server's security it tells me that "the server principal 'DiscoApp' already exists. > Basically I am able to create the user but not assign rights - db_reader, db_writer etc. > > I have always been fuzzy about how this stuff works and I just need an > explanation of why it won't allow me to set these rights even though > the user exists and the check boxes are enabled when I select that > database. I just discovered that if I delete the user out in that > database and then set the rights through the user back in the server > security stuff it happily accepts my changes and re-adds the user to > the database. This just seems strange. If I don't do this rigamarole then I have a DiscoApp in the database with a set of rights for that database but when I look at it back at the server level it does not reflect those rights for that user for that database. > > Any assistance great fully accepted. From jwcolby at colbyconsulting.com Mon Dec 5 06:27:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 07:27:13 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <99266C61B516644D9727F983FAFAB46511B927@remote.ddisolutions.com.au> Message-ID: <4EDCB8A1.5050406@colbyconsulting.com> Thanks Michael. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:55 AM, Michael Maddison wrote: > Hi JC, > > I think this is the sproc you need. > sp_change_users_login > You'll need to look it up in help for usage details. > > You can use it to fix orphaned logins with the same name. > Which is what you get when you restore a db on another system. The > names might be the same but the ID's underlying the names will be > different. > This sp fixes that issue. > > *Tip - you can save useful sprocs as a template and reuse them when > needed. There should be a tab on the right hand side of SSM Studio. > > If this doesn't solve your problem then I have misunderstood! > > Cheers > > Michael M > > > >I just discovered that if I delete the user out in that database and > then set the rights through the user back in the server security stuff > it happily accepts my changes and re-adds the user to the database. > > Unfortunately after I did this delete / re-add rigamarole I discovered > that all of the rights to objects in the database were removed. For > example I had rights to execute stored procedures assigned to these > users but after deleting the users the rights to execute were lost. > > Sigh. > > This SQL Server Users stuff is really developer unfriendly. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it From fhtapia at gmail.com Mon Dec 5 10:08:14 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 5 Dec 2011 08:08:14 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDC348C.1090400@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> Message-ID: Glad the tip worked, I do love SQL in all its variants, its' the language I'm most comfortable in; these days however I don't get to spend much time working on new projects for Sql Server as I've trained a Jr developers to take over that role, and a set of DBAs to handle the day to day. I work on other projects now, but I do like returning to Sql to see whats new and what's changed. I know you think your the only one fighting this fight against MS, but many of us get frustrated. Not all the documentation is out in the open in plain english, but that goes with any language. I can make the same type of outlandish arguments against mobile development which is what I am working on right now. The problem I think rises that when you are a n00b, you tend to ask / query for things in one manner, and become frustrated, after some acclimation to the language you begin querying differently, thus your search results match your expectation. Jumping around the way you do is your choice, (glad you have one). All things take time, and I don't say it to discourage you but, that's why they say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta your misery :) LOL. -Francisco http://bit.ly/sqlthis | Tsql and More... On Sun, Dec 4, 2011 at 19:03, jwcolby wrote: > So yea, I would much prefer a few more wizards to help me out, but given > what I do in an average day I pretty much learn what I have to. For some > reason arcane SQL Server asininities aren't real high on my list of things > I want to spend my time on, though I do understand that there is nothing > you would rather do. > > To each his own I suppose. > > > > You're right, but I shake my head because you don't care to learn > > LOL Of course you do. And I shake my head because you think you have the > right to decide what I should make a priority on my life. > > Thanks for the tip by the way. > > > From jwcolby at colbyconsulting.com Mon Dec 5 11:21:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 12:21:36 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> Message-ID: <4EDCFDA0.5080608@colbyconsulting.com> Our (or at least my) problem is that MS is not spending enough time on the GUI. When I realized I needed to get the users and their rights out of the database into the server, I tried to click / hold / drag and drop the user from the database security area into the server security area. Makes sense right? We have been dragging and dropping for 15 years now in Windows, longer than that in the MAC world. Visual Studio and C# uses drag and drop, Access uses drag and drop. But no, in SQL Server we have to go figure out how this stuff even works, then how to use command line or query crap to type in arcane syntax into a dev environment that basically gives you a "didn't work, try again" error message if anything goes wrong. Microsoft is trying to position SQL Server Express as the data store of choice for programmers in DotNet as well as Access. Well I got news for somebody, making me learn to be a DBA and type in command line crap on top of that just so that I can use their SQL Server Express is pretty much a non-starter. Some of it is drag and drop of course, in terms of building tables and views. However even there I have to go to a query window and haul out the books (memorized now) to drop or add a column from a table with very much data. Done from the gui it times out. This kind of stuff just drives me crazy. And of course this has nothing whatsoever to do with any individual on this list, except to say that trying to tell a noob to RTFM just adds to the frustration. I have built a very sophisticated system in C# which is used to process literally 300 million records a month, BCP out to CSV, through a 3rd party system and back in to SQL Server. In order to build this system I had to learn and integrate together many different systems from Windows Server 2008 and SQL Server 2008 to virtual machines to the third party software, learn C# and SQL Server, actually architect the thing, write C# and oversee a developer writing the code and get it all working. I have learned an enormous amount about SQL Server but I am not even close to DBA level and I don't want to be, I don't have time to be and I shouldn't have to be. And if MS would make it a priority to make SQL Server more GUI for more things I would not need to be. > Jumping around the way you do is your choice, (glad you have one). Well... sometimes we slide sideways into stuff. I got this client when I was desperate for work, the economy was in the tank and this work was there. I took it, and I actually quite enjoy it but it is hardly a "choice" to do all this jumping around. The volunteer work is a choice of course but the work is what I found and what I needed to do to get the work done. I actually quite enjoy the whole thing. I needed to learn C# and I have / am. Learning about SQL Server, even as little as I know is a god send from a career perspective. I work for small businesses where they need SQL Server but cannot afford a DBA, and wouldn't have enough work to keep one busy. Being able to "do the basics" allows me to do things in my career that otherwise wouldn't be possible, and provide my clients with SQL Server where they otherwise wouldn't be able to have that. I love what I do and the freedom of being a consultant, and if MS would just make some things gui I'd be an even happier camper. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 11:08 AM, Francisco Tapia wrote: > Glad the tip worked, > I do love SQL in all its variants, its' the language I'm most comfortable > in; these days however I don't get to spend much time working on new > projects for Sql Server as I've trained a Jr developers to take over that > role, and a set of DBAs to handle the day to day. I work on other projects > now, but I do like returning to Sql to see whats new and what's changed. I > know you think your the only one fighting this fight against MS, but many > of us get frustrated. Not all the documentation is out in the open in > plain english, but that goes with any language. I can make the same type > of outlandish arguments against mobile development which is what I am > working on right now. The problem I think rises that when you are a n00b, > you tend to ask / query for things in one manner, and become frustrated, > after some acclimation to the language you begin querying differently, thus > your search results match your expectation. > > Jumping around the way you do is your choice, (glad you have one). All > things take time, and I don't say it to discourage you but, that's why they > say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta > your misery :) LOL. > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... From davidmcafee at gmail.com Mon Dec 5 11:33:51 2011 From: davidmcafee at gmail.com (David McAfee) Date: Mon, 5 Dec 2011 09:33:51 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDCFDA0.5080608@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: >From the SSMS Object Explorer, you can click on Management ->Activity Monitor You can see all active users/processes. You can filter by database or user, right click on a process and Kill it if you need. All done via the GUI, with nothing typed except a user or database name if you chose to filter by one. D On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > Our (or at least my) problem is that MS is not spending enough time on the > GUI. When I realized I needed to get the users and their rights out of the > database into the server, I tried to click / hold / drag and drop the user > from the database security area into the server security area. > > Makes sense right? > > We have been dragging and dropping for 15 years now in Windows, longer > than that in the MAC world. Visual Studio and C# uses drag and drop, Access > uses drag and drop. But no, in SQL Server we have to go figure out how > this stuff even works, then how to use command line or query crap to type > in arcane syntax into a dev environment that basically gives you a "didn't > work, try again" error message if anything goes wrong. > > From jwcolby at colbyconsulting.com Mon Dec 5 11:47:12 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 05 Dec 2011 12:47:12 -0500 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: <4EDD03A0.8080105@colbyconsulting.com> Cool, except that my management folder does not have Activity Monitor as an object under it. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:33 PM, David McAfee wrote: >> From the SSMS Object Explorer, you can click on Management ->Activity > Monitor > > You can see all active users/processes. > > You can filter by database or user, right click on a process and Kill it if > you need. > > All done via the GUI, with nothing typed except a user or database name if > you chose to filter by one. > > D > > > > > > On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > >> Our (or at least my) problem is that MS is not spending enough time on the >> GUI. When I realized I needed to get the users and their rights out of the >> database into the server, I tried to click / hold / drag and drop the user >> from the database security area into the server security area. >> >> Makes sense right? >> >> We have been dragging and dropping for 15 years now in Windows, longer >> than that in the MAC world. Visual Studio and C# uses drag and drop, Access >> uses drag and drop. But no, in SQL Server we have to go figure out how >> this stuff even works, then how to use command line or query crap to type >> in arcane syntax into a dev environment that basically gives you a "didn't >> work, try again" error message if anything goes wrong. >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From df.waters at comcast.net Mon Dec 5 12:37:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 5 Dec 2011 12:37:08 -0600 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDD03A0.8080105@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> <4EDD03A0.8080105@colbyconsulting.com> Message-ID: <004601ccb37c$e506da90$af148fb0$@comcast.net> I wondered about this myself. I'm using SS 2008 R2 Express. I found: Right-click on the SQL Server Instance name is SSMS. Activity Monitor is the 5th item on the list. Look at Recent Expensive Queries. Good Info. Then right-click one of the queries and select Show Execution Plan - and you get a diagram! You can also select Edit Query Text to see what the actual SQL statement is. Thanks! Dan -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, December 05, 2011 11:47 AM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Users in SQL Server Cool, except that my management folder does not have Activity Monitor as an object under it. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/5/2011 12:33 PM, David McAfee wrote: >> From the SSMS Object Explorer, you can click on Management ->Activity > Monitor > > You can see all active users/processes. > > You can filter by database or user, right click on a process and Kill > it if you need. > > All done via the GUI, with nothing typed except a user or database > name if you chose to filter by one. > > D > > > > > > On Mon, Dec 5, 2011 at 9:21 AM, jwcolby wrote: > >> Our (or at least my) problem is that MS is not spending enough time >> on the GUI. When I realized I needed to get the users and their >> rights out of the database into the server, I tried to click / hold / >> drag and drop the user from the database security area into the server security area. >> >> Makes sense right? >> >> We have been dragging and dropping for 15 years now in Windows, >> longer than that in the MAC world. Visual Studio and C# uses drag and >> drop, Access uses drag and drop. But no, in SQL Server we have to go >> figure out how this stuff even works, then how to use command line or >> query crap to type in arcane syntax into a dev environment that >> basically gives you a "didn't work, try again" error message if anything goes wrong. >> >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Mon Dec 5 18:33:51 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 5 Dec 2011 16:33:51 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDCFDA0.5080608@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> Message-ID: That's understood, but it seems the community has been pushing for more command like interfaces. I read about it all the time, and some of our own sysadmins seem to prefer it. Some things are easier as you can script out more commands and easily make your 100's of servers be similar in configuration... in fact I personnally love that I can script out any window of the actions im about to perform. I learn something new and can hand over usable "working code" to my development and dba teams and ensure system consistency. On Dec 5, 2011 9:25 AM, "jwcolby" wrote: > Our (or at least my) problem is that MS is not spending enough time on the > GUI. When I realized I needed to get the users and their rights out of the > database into the server, I tried to click / hold / drag and drop the user > from the database security area into the server security area. > > Makes sense right? > > We have been dragging and dropping for 15 years now in Windows, longer > than that in the MAC world. Visual Studio and C# uses drag and drop, Access > uses drag and drop. But no, in SQL Server we have to go figure out how > this stuff even works, then how to use command line or query crap to type > in arcane syntax into a dev environment that basically gives you a "didn't > work, try again" error message if anything goes wrong. > > Microsoft is trying to position SQL Server Express as the data store of > choice for programmers in DotNet as well as Access. Well I got news for > somebody, making me learn to be a DBA and type in command line crap on top > of that just so that I can use their SQL Server Express is pretty much a > non-starter. > > Some of it is drag and drop of course, in terms of building tables and > views. However even there I have to go to a query window and haul out the > books (memorized now) to drop or add a column from a table with very much > data. Done from the gui it times out. This kind of stuff just drives me > crazy. > > And of course this has nothing whatsoever to do with any individual on > this list, except to say that trying to tell a noob to RTFM just adds to > the frustration. > > I have built a very sophisticated system in C# which is used to process > literally 300 million records a month, BCP out to CSV, through a 3rd party > system and back in to SQL Server. In order to build this system I had to > learn and integrate together many different systems from Windows Server > 2008 and SQL Server 2008 to virtual machines to the third party software, > learn C# and SQL Server, actually architect the thing, write C# and oversee > a developer writing the code and get it all working. > > I have learned an enormous amount about SQL Server but I am not even close > to DBA level and I don't want to be, I don't have time to be and I > shouldn't have to be. And if MS would make it a priority to make SQL > Server more GUI for more things I would not need to be. > > > Jumping around the way you do is your choice, (glad you have one). > > Well... sometimes we slide sideways into stuff. I got this client when I > was desperate for work, the economy was in the tank and this work was > there. I took it, and I actually quite enjoy it but it is hardly a > "choice" to do all this jumping around. The volunteer work is a choice of > course but the work is what I found and what I needed to do to get the work > done. > > I actually quite enjoy the whole thing. I needed to learn C# and I have / > am. Learning about SQL Server, even as little as I know is a god send from > a career perspective. I work for small businesses where they need SQL > Server but cannot afford a DBA, and wouldn't have enough work to keep one > busy. Being able to "do the basics" allows me to do things in my career > that otherwise wouldn't be possible, and provide my clients with SQL Server > where they otherwise wouldn't be able to have that. > > I love what I do and the freedom of being a consultant, and if MS would > just make some things gui I'd be an even happier camper. > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/5/2011 11:08 AM, Francisco Tapia wrote: > >> Glad the tip worked, >> I do love SQL in all its variants, its' the language I'm most >> comfortable >> in; these days however I don't get to spend much time working on new >> projects for Sql Server as I've trained a Jr developers to take over that >> role, and a set of DBAs to handle the day to day. I work on other >> projects >> now, but I do like returning to Sql to see whats new and what's changed. >> I >> know you think your the only one fighting this fight against MS, but many >> of us get frustrated. Not all the documentation is out in the open in >> plain english, but that goes with any language. I can make the same type >> of outlandish arguments against mobile development which is what I am >> working on right now. The problem I think rises that when you are a n00b, >> you tend to ask / query for things in one manner, and become frustrated, >> after some acclimation to the language you begin querying differently, >> thus >> your search results match your expectation. >> >> Jumping around the way you do is your choice, (glad you have one). All >> things take time, and I don't say it to discourage you but, that's why >> they >> say Rome wasn't built in a day. Keep on SQLing John, we'll put you outta >> your misery :) LOL. >> >> >> -Francisco >> http://bit.ly/sqlthis | Tsql and More... >> > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From fhtapia at gmail.com Tue Dec 6 09:06:23 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 6 Dec 2011 07:06:23 -0800 Subject: [dba-SQLServer] Users in SQL Server In-Reply-To: <4EDD03A0.8080105@colbyconsulting.com> References: <4EDB98D7.30009@colbyconsulting.com> <4EDB9C2B.1010201@colbyconsulting.com> <001b01ccb2a4$5ef18910$1cd49b30$@comcast.net> <4EDBC0DF.6070300@colbyconsulting.com> <1126424970034065031@unknownmsgid> <4EDC348C.1090400@colbyconsulting.com> <4EDCFDA0.5080608@colbyconsulting.com> <4EDD03A0.8080105@colbyconsulting.com> Message-ID: In 2008 this has changed, to view your current activity you simply click on the GUI button for activity monitor on the toolbar ... or (hey John.. check it out, an arcane asininity) simply press CTRL+ALT+A on any of your Management Studio windows. I don't use the express management studio, however I suspect that if Activity Monitor is not available via ctrl+alt+a then you can always execute the query sp_who to gather your info that you need. -Francisco http://bit.ly/sqlthis | Tsql and More... On Mon, Dec 5, 2011 at 09:47, jwcolby wrote: > Cool, except that my management folder does not have Activity Monitor as > an object under it. > > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 12/5/2011 12:33 PM, David McAfee wrote: > >> From the SSMS Object Explorer, you can click on Management ->Activity >>> >> Monitor >> >> You can see all active users/processes. >> >> You can filter by database or user, right click on a process and Kill it >> if >> you need. >> >> All done via the GUI, with nothing typed except a user or database name if >> you chose to filter by one. >> >> D >> >> >> >> >> >> On Mon, Dec 5, 2011 at 9:21 AM, jwcolby> >> wrote: >> >> Our (or at least my) problem is that MS is not spending enough time on >>> the >>> GUI. When I realized I needed to get the users and their rights out of >>> the >>> database into the server, I tried to click / hold / drag and drop the >>> user >>> from the database security area into the server security area. >>> >>> Makes sense right? >>> >>> We have been dragging and dropping for 15 years now in Windows, longer >>> than that in the MAC world. Visual Studio and C# uses drag and drop, >>> Access >>> uses drag and drop. But no, in SQL Server we have to go figure out how >>> this stuff even works, then how to use command line or query crap to type >>> in arcane syntax into a dev environment that basically gives you a >>> "didn't >>> work, try again" error message if anything goes wrong. >>> >>> >>> ______________________________**_________________ >> dba-SQLServer mailing list >> dba-SQLServer@**databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.**com >> >> >> > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From jwcolby at colbyconsulting.com Wed Dec 7 10:00:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 07 Dec 2011 11:00:52 -0500 Subject: [dba-SQLServer] Does count(*) lock the table? Message-ID: <4EDF8DB4.2030500@colbyconsulting.com> I have a half dozen tables which I need to get counts of valid records for. Additionally I need to get counts where the two tables join on a common field - HashPerson, HashFamily and HashAddress. We have written a process in C# which dynamically generates these count SQL statements, passes it off to SQL Server, gets the results back and populates a spreadsheet with the answers. As it happens there is an entire "table" or square area of the spreadsheet for the intersection (as I call it) counts for each of those hashes, IOW an entire section for HashPerson counts, another for HashFamily and another for hashAddress. Since I am working in C# and each Hash area is a class instance, and since I have threads available in C#, and since it was taking about 5 hours to run all these counts, I decided to thread it and run each Hash on it's own thread, IOW try and get the counts for the HashPerson, HashFamily and HashAddress "simultaneously". I have 12 cores and about 50 gigs of memory assigned to SQL Server so I thought *maybe* it would work. Well... it appears that at some point very early on, something locks the process and only one of the hash classes proceeds. When that one finishes then the other two process together. We are checking whether we are having deadlock issues in C# but I need to know whether SQL Server itself would lock the tables that the count was processing. So the question is, does SQL Server apply locks to a table when doing a count of the records in the table. Likewise if I join two tables and do a count on that, does that cause a lock to be applied to either or both of the tables. If so is there a syntax I can use to prevent this lock? I am doing a join potentially on two tables with as many as 50 or 100 million records in each table. These counts take a long time so having table locks applied is not a good idea in general. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From fuller.artful at gmail.com Wed Dec 7 10:46:20 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Dec 2011 11:46:20 -0500 Subject: [dba-SQLServer] NoSQL etc. Message-ID: I have downloaded and installed a couple of these but not yet discovered any practical (from my POV) applications of this. From what I can gather from the ReadMes etc., they are basically a key-value collection, which it would seem is designed for web-apps whose principal task is to rapidly and scalably retrieve values from the db. It's not readily apparent how this might be applied to a relational database (say, Customers, Orders, OrderDetails and Products). Does anyone have any insight into actual use of these technologies? -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From davidmcafee at gmail.com Wed Dec 7 11:12:10 2011 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 7 Dec 2011 09:12:10 -0800 Subject: [dba-SQLServer] Does count(*) lock the table? In-Reply-To: <4EDF8DB4.2030500@colbyconsulting.com> References: <4EDF8DB4.2030500@colbyconsulting.com> Message-ID: Use: WITH (NOLOCK) like this: SELECT COUNT(SomeField) FROM SomeTable WITH (NOLOCK) On Wed, Dec 7, 2011 at 8:00 AM, jwcolby wrote: > I have a half dozen tables which I need to get counts of valid records > for. Additionally I need to get counts where the two tables join on a > common field - HashPerson, HashFamily and HashAddress. > > We have written a process in C# which dynamically generates these count > SQL statements, passes it off to SQL Server, gets the results back and > populates a spreadsheet with the answers. As it happens there is an entire > "table" or square area of the spreadsheet for the intersection (as I call > it) counts for each of those hashes, IOW an entire section for HashPerson > counts, another for HashFamily and another for hashAddress. > > Since I am working in C# and each Hash area is a class instance, and since > I have threads available in C#, and since it was taking about 5 hours to > run all these counts, I decided to thread it and run each Hash on it's own > thread, IOW try and get the counts for the HashPerson, HashFamily and > HashAddress "simultaneously". I have 12 cores and about 50 gigs of memory > assigned to SQL Server so I thought *maybe* it would work. > > Well... it appears that at some point very early on, something locks the > process and only one of the hash classes proceeds. When that one finishes > then the other two process together. > > We are checking whether we are having deadlock issues in C# but I need to > know whether SQL Server itself would lock the tables that the count was > processing. > > So the question is, does SQL Server apply locks to a table when doing a > count of the records in the table. Likewise if I join two tables and do a > count on that, does that cause a lock to be applied to either or both of > the tables. > > If so is there a syntax I can use to prevent this lock? I am doing a join > potentially on two tables with as many as 50 or 100 million records in each > table. These counts take a long time so having table locks applied is not > a good idea in general. > > -- > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > From stuart at lexacorp.com.pg Wed Dec 7 14:30:42 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Dec 2011 06:30:42 +1000 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: Message-ID: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> I haven't actually tried any, but from everything I've read about them, that's my take on them too. They are very useful for quick retrieval of data atoms from huge datasets but don't do hierarchical structures well. I guess it would be good for a document storage/retreival system with full text indexing -- Stuart On 7 Dec 2011 at 11:46, Arthur Fuller wrote: > I have downloaded and installed a couple of these but not yet discovered > any practical (from my POV) applications of this. From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. It's not readily apparent how this > might be applied to a relational database (say, Customers, Orders, > OrderDetails and Products). > > Does anyone have any insight into actual use of these technologies? > > -- > Cell: 647.710.1314 > > Thirty spokes converge on a hub > but it's the emptiness > that makes a wheel work > -- from the Daodejing > _______________________________________________ > 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 Dec 7 15:24:22 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Dec 2011 16:24:22 -0500 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> References: <4EDFCCF2.18470.E56949C@stuart.lexacorp.com.pg> Message-ID: Pleased as I am to receive your agreement, I remain open to the possibility that I am missing something here. To take one example, the Windows repository seems to do fairly well with key-value pairs plus a hierarchical arrangement, so let's grant those folks a + in the Advantages column, and also a - in the Disadvantages column. All that said and given, strengths and weaknesses admitted, the question remains: is this NoSQL technology useful for any transactional db/website? Frankly, I have no idea, and am seeking experience and insight. For the sake of argument, let us suppose a site offering 200K products, grouped in categories (say Motherboards, RAM, hard disks, SSDs, and even for the sake of nostalgia, 3.5 floppies). LOL: a very narrow product-niche: a USB 3.5+5.5 floppy,,, wow, I bet we could sell 100 of those units!). Forgive the aside. The salient point remains, does the NoSQL paradigm draw a line between retrieval-dbs and transactional-dbs? This is not all that different between drawing a line between OLAP and OLTP dbs, with which division I am familiar in both principle and practice. But I am not sure how that knowledge ports to Nowadays, in this allegedly new world of NoSQL dbs. A. From hans.andersen at phulse.com Wed Dec 7 15:57:59 2011 From: hans.andersen at phulse.com (Hans-Christian Andersen) Date: Wed, 7 Dec 2011 13:57:59 -0800 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: Message-ID: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Arthur, > From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, things have got a bit more complicated as some of the "NoSQL" options are doing different things. I've seen one or two which try to be a hybrid between a relational database and a NoSQL database, but I don't know how successful they have been (not personally played with them). It's not just for web apps, however. It is also very useful in super computing where you deal with a lot of data (often times unstructured), a highly scaled environment and then hadoop is then used in conjunction for data analysis. And, for instance, the Large Hadron Collider is using NoSQL to store their data as well and Rackspace is using it for backend cloud storage. Those are some use cases that come to mind and there are more, but you may find that it has very little use in whatever project and field of work you are in. It's not really meant to be a natural replacement of a traditional RDBMS. - Hans On 2011-12-07, at 8:46 AM, Arthur Fuller wrote: > I have downloaded and installed a couple of these but not yet discovered > any practical (from my POV) applications of this. From what I can gather > from the ReadMes etc., they are basically a key-value collection, which it > would seem is designed for web-apps whose principal task is to rapidly and > scalably retrieve values from the db. It's not readily apparent how this > might be applied to a relational database (say, Customers, Orders, > OrderDetails and Products). > > Does anyone have any insight into actual use of these technologies? > > -- > Cell: 647.710.1314 > > Thirty spokes converge on a hub > but it's the emptiness > that makes a wheel work > -- from the Daodejing > _______________________________________________ > 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 Dec 7 23:02:43 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 8 Dec 2011 00:02:43 -0500 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> References: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Message-ID: Thanks for the confirmation. Sometimes I get to feeling that I've missed the train :) A. On Wed, Dec 7, 2011 at 4:57 PM, Hans-Christian Andersen < hans.andersen at phulse.com> wrote: > > Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, > things have got a bit more complicated as some of the "NoSQL" options are > doing different things. I've seen one or two which try to be a hybrid > between a relational database and a NoSQL database, but I don't know how > successful they have been (not personally played with them). > > It's not just for web apps, however. It is also very useful in super > computing where you deal with a lot of data (often times unstructured), a > highly scaled environment and then hadoop is then used in conjunction for > data analysis. And, for instance, the Large Hadron Collider is using NoSQL > to store their data as well and Rackspace is using it for backend cloud > storage. Those are some use cases that come to mind and there are more, but > you may find that it has very little use in whatever project and field of > work you are in. It's not really meant to be a natural replacement of a > traditional RDBMS. > > - Hans > > > From hans.andersen at phulse.com Thu Dec 8 03:22:39 2011 From: hans.andersen at phulse.com (Hans-Christian Andersen) Date: Thu, 8 Dec 2011 01:22:39 -0800 Subject: [dba-SQLServer] NoSQL etc. In-Reply-To: References: <24D9A3B9-2D3B-47F6-AEFB-9143F00B8F44@phulse.com> Message-ID: Well, I think it's always worth knowing about, since it is only going to become more relevant as everything goes to the cloud, but I can't speak for you on what the cost vs benefit for you would be and whether you ever expect to work in a relevant field of software engineering that would require it. Also, one never knows where & how technology evolves even 2-3 years from now. As for myself, as a web developer/architect, it is something I have worked on already and it is very relevant to my future career to have some familiarity. Best regards, Hans-Christian Andersen On 7 Dec 2011, at 21:02, Arthur Fuller wrote: > Thanks for the confirmation. Sometimes I get to feeling that I've missed > the train :) > A. > > On Wed, Dec 7, 2011 at 4:57 PM, Hans-Christian Andersen < > hans.andersen at phulse.com> wrote: > >> >> Exactly. This was the original "raison d'?tre" for NoSQL databases. Now, >> things have got a bit more complicated as some of the "NoSQL" options are >> doing different things. I've seen one or two which try to be a hybrid >> between a relational database and a NoSQL database, but I don't know how >> successful they have been (not personally played with them). >> >> It's not just for web apps, however. It is also very useful in super >> computing where you deal with a lot of data (often times unstructured), a >> highly scaled environment and then hadoop is then used in conjunction for >> data analysis. And, for instance, the Large Hadron Collider is using NoSQL >> to store their data as well and Rackspace is using it for backend cloud >> storage. Those are some use cases that come to mind and there are more, but >> you may find that it has very little use in whatever project and field of >> work you are in. It's not really meant to be a natural replacement of a >> traditional RDBMS. >> >> - Hans >> >> >> > _______________________________________________ > 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 Dec 8 08:18:12 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Dec 2011 09:18:12 -0500 Subject: [dba-SQLServer] SQL Compression - interesting read Message-ID: <4EE0C724.1040604@colbyconsulting.com> http://blogs.msdn.com/b/sqlserverstorageengine/archive/2008/01/18/what-is-page-compression.aspx -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From jwcolby at colbyconsulting.com Thu Dec 8 08:29:32 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Dec 2011 09:29:32 -0500 Subject: [dba-SQLServer] Compression Interesting read - part 2 Message-ID: <4EE0C9CC.8090103@colbyconsulting.com> I had to go find this... http://blogs.msdn.com/b/sqlserverstorageengine/archive/2008/01/18/details-on-page-compression-page-dictionary.aspx -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From Gustav at cactus.dk Fri Dec 9 06:27:28 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Fri, 09 Dec 2011 13:27:28 +0100 Subject: [dba-SQLServer] Localizing SQL Server Reporting Services Reports Message-ID: Hi all http://www.codeproject.com/KB/reporting-services/SQLServer2008Reporting.aspx This is a step-by-step walk-through of how to implement localization for SQL Server Reporting Services (SQL 2008). .. An additional item this article covers .. is the ability to use the un-compiled resource files (*.resx) rather than a compiled DLL. /gustav From marklbreen at gmail.com Mon Dec 12 16:54:32 2011 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 12 Dec 2011 22:54:32 +0000 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE Message-ID: Hello All, I arrived into a customer today with the intention of preparing for a project to automate a process for placing orders in an online database. The process today is that the user sits for four hours and copy and pastes from Excel into a browser. I was hoping to use Selenium to automate that. However, I was disappointed to note that the website is actually an ActiveX control running in IE. That leaves me with options such as a) using other macro software, attempt to automate the process b) find out how to programatically manipulate an ActiveX c) some other option not thought of yet. I am asking the list whether you have any advice to give? If this ActiveX has been installed on the PC and runs well, how difficult would it be to execute all the functionality it offers? I may have no documentation. Does my question even make sense? Your advice, as always, is appreciated. thanks Mark PS, Happy Birthday to Rocky From stuart at lexacorp.com.pg Mon Dec 12 17:24:54 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 13 Dec 2011 09:24:54 +1000 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE In-Reply-To: References: Message-ID: <4EE68D46.17017.DD4A55B@stuart.lexacorp.com.pg> Two approaches which I would use in this situation: 1. Put Wireshark or similar on the PC and monitor the HTTP(S?) traffic when orders are being placed with the current system. Then you'll know exactly what needs to be sent to the online application and what responses it generates. Having done that, decide if it feasible to write another application to send and receive the same HTTP(S?) traffic. (Hint PowerBASIC is great for that sort of thing ) If that it is not feasible: - 2. Write an AutoIt application to extract the data from the spreadsheet and feed it to the ActiveX screen. -- Stuart On 12 Dec 2011 at 22:54, Mark Breen wrote: > Hello All, > > I arrived into a customer today with the intention of preparing for a > project to automate a process for placing orders in an online database. > > The process today is that the user sits for four hours and copy and pastes > from Excel into a browser. I was hoping to use Selenium to automate that. > > However, I was disappointed to note that the website is actually an ActiveX > control running in IE. > > That leaves me with options such as > > a) using other macro software, attempt to automate the process > b) find out how to programatically manipulate an ActiveX > c) some other option not thought of yet. > > I am asking the list whether you have any advice to give? If this ActiveX > has been installed on the PC and runs well, how difficult would it be to > execute all the functionality it offers? I may have no documentation. > > Does my question even make sense? > > Your advice, as always, is appreciated. > > thanks > > Mark > > PS, Happy Birthday to Rocky > _______________________________________________ > 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 Dec 14 12:58:06 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 14 Dec 2011 10:58:06 -0800 Subject: [dba-SQLServer] How to problematically (or by other automation) control an ActiveX control in IE In-Reply-To: References: Message-ID: First, Happy belated birthday Rocky! Second, Does the customer have control of the online database? if so the automation could just be made at the Excel spreadsheet to push out to the online db. right? if it's a 3rd party database, then automation might just be key, take a look at http://www.autohotkey.com/ we use it here to help control our touchscreen kiosk. -Francisco http://bit.ly/sqlthis | Tsql and More... On Mon, Dec 12, 2011 at 14:54, Mark Breen wrote: > Hello All, > > I arrived into a customer today with the intention of preparing for a > project to automate a process for placing orders in an online database. > > The process today is that the user sits for four hours and copy and pastes > from Excel into a browser. I was hoping to use Selenium to automate that. > > However, I was disappointed to note that the website is actually an ActiveX > control running in IE. > > That leaves me with options such as > > a) using other macro software, attempt to automate the process > b) find out how to programatically manipulate an ActiveX > c) some other option not thought of yet. > > I am asking the list whether you have any advice to give? If this ActiveX > has been installed on the PC and runs well, how difficult would it be to > execute all the functionality it offers? I may have no documentation. > > Does my question even make sense? > > Your advice, as always, is appreciated. > > thanks > > Mark > > PS, Happy Birthday to Rocky > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fhtapia at gmail.com Thu Dec 15 13:48:34 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 15 Dec 2011 11:48:34 -0800 Subject: [dba-SQLServer] Sql Server 2008 VTF and SQL CLR Message-ID: have any of you worked with Table Valued Functions yet? I know how to create a SQL value table function in pure TSQL, but getting one to work that's built off of SQL CLR is something new entirely to me :phew: My sample here is simple, but the idea is that I'm going to be calling a webservice to collect some data. I'd like to have at least a two column table returned so that I can create labels or maybe a multi-column with the appropriate column name. here is my working code from c# and this does yield me a working returned table. As always your help is appreciated! [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", TableDefinition = "Field1 nvarchar(20)")] public static IEnumerable fngetTEST(string strSomeInput) { ArrayList myList = new ArrayList(); myList.Add("test1"); myList.Add("test2"); return new ArrayList(myList); } private static void getFillRow(object obj, out SqlString strField1 ) { strField1 = Convert.ToString(obj); } -Francisco http://bit.ly/sqlthis | Tsql and More... From fuller.artful at gmail.com Fri Dec 16 09:03:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 16 Dec 2011 10:03:12 -0500 Subject: [dba-SQLServer] Oracle sued Message-ID: >From slashdot: *"Montclair State University is suing Oracle in connection with a troubled ERP (enterprise resource planning) project. Montclair's complaint, filed Tuesday in U.S. District Court for the District of New Jersey, states that Oracle made an array of 'intentionally false statements' regarding the functionality of its base ERP system, the amount of customization that would be required, and the amount of 'time, resources, and personnel that the University would have to devote.' 'Ultimately, after missing a critical go-live deadline for the University's finance system, Oracle sought to extort millions of dollars from the University by advising the University that it would not complete the implementation of the ... project unless the University agreed to pay millions of dollars more than the fixed fee the University and Oracle had previously agreed to,' it adds."* Arthur -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From fhtapia at gmail.com Fri Dec 16 18:38:03 2011 From: fhtapia at gmail.com (Francisco Tapia) Date: Fri, 16 Dec 2011 16:38:03 -0800 Subject: [dba-SQLServer] Sql Server 2008 VTF and SQL CLR In-Reply-To: References: Message-ID: this works now... working demo code: private class myRows { public SqlInt32 PKID; public SqlString strValue; public myRows(SqlInt32 pkid, SqlString strvalue) { PKID = pkid; strValue = strvalue; } } [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", TableDefinition = "pkid int,Field1 nvarchar(20)")] public static IEnumerable fngetTEST(string strSomeInput) { ArrayList myArray = new ArrayList(); myArray.Add(new myRows(0, "Field1")); myArray.Add(new myRows(1, "Field2")); myArray.Add(new myRows(2, "Field3")); myArray.Add(new myRows(3, "Field4")); return new ArrayList(myArray); } private static void getFillRow( object arrayObj, out SqlInt32 intPKID, out SqlString strField1 ) { myRows MyRows = (myRows)arrayObj; intPKID = MyRows.PKID; strField1 = MyRows.strValue; } -Francisco http://bit.ly/sqlthis | Tsql and More... On Thu, Dec 15, 2011 at 11:48, Francisco Tapia wrote: > have any of you worked with Table Valued Functions yet? I know how to > create a SQL value table function in pure TSQL, but getting one to work > that's built off of SQL CLR is something new entirely to me :phew: My > sample here is simple, but the idea is that I'm going to be calling a > webservice to collect some data. I'd like to have at least a two column > table returned so that I can create labels or maybe a multi-column with the > appropriate column name. > > here is my working code from c# and this does yield me a working returned > table. > > As always your help is appreciated! > > [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "getFillRow", > TableDefinition = "Field1 nvarchar(20)")] > public static IEnumerable fngetTEST(string strSomeInput) > { > ArrayList myList = new ArrayList(); > myList.Add("test1"); > myList.Add("test2"); > return new ArrayList(myList); > } > private static void getFillRow(object obj, > out SqlString strField1 > > ) > { > strField1 = Convert.ToString(obj); > } > > > -Francisco > http://bit.ly/sqlthis | Tsql and More... > > > > From accessd at shaw.ca Wed Dec 28 14:42:55 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 28 Dec 2011 12:42:55 -0800 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: References: Message-ID: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> You have to look no further than the NoSQL super database called Hadoop. Development in this product has been drawing the best and the brightest from all over the computer world. With databases now exceeded 100 million records the SQL structured DBs no longer functions well in this new environment. http://tinyurl.com/d28d3r6 Jim From stuart at lexacorp.com.pg Wed Dec 28 15:55:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 29 Dec 2011 07:55:19 +1000 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> Message-ID: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Yada, yada, yada. Still evangelising I see :-) 100 million records is not per se a problem for a SQL structured DB. No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. You might just as well say: With images exceeding several megabytes in size, NoAccess is much better than Access for manipulating graphic data. Take for instance the NoAcess super application called PhotoShop. -- Stuart On 28 Dec 2011 at 12:42, Jim Lawrence wrote: > You have to look no further than the NoSQL super database called Hadoop. > Development in this product has been drawing the best and the brightest from > all over the computer world. > > With databases now exceeded 100 million records the SQL structured DBs no > longer functions well in this new environment. > > http://tinyurl.com/d28d3r6 > > Jim > > _______________________________________________ > dba-Tech mailing list > dba-Tech at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-tech > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Wed Dec 28 16:20:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 28 Dec 2011 14:20:38 -0800 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: It does not matter what you or I think, it what is important and real. That what is super hot in the computer business is Hadoop. I may never use the product other than to play with but we have to keep abreast on the market trends. The difference between NoSQL and SQL databases is like Mya and Photoshop...one processes thousands of images and one, just one image at a time. We may never need anything more than Photoshop but for those in the image and movie business, Mya is one of the products of choice. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, December 28, 2011 1:55 PM To: 'Discussion of Hardware and Software issues'; 'Discussion concerning Visual Basic and related programming issues.'; 'Discussion concerning MS SQL Server' Subject: Re: [dba-SQLServer] So what is super hot in the tech world? Yada, yada, yada. Still evangelising I see :-) 100 million records is not per se a problem for a SQL structured DB. No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. You might just as well say: With images exceeding several megabytes in size, NoAccess is much better than Access for manipulating graphic data. Take for instance the NoAcess super application called PhotoShop. -- Stuart On 28 Dec 2011 at 12:42, Jim Lawrence wrote: > You have to look no further than the NoSQL super database called Hadoop. > Development in this product has been drawing the best and the brightest from > all over the computer world. > > With databases now exceeded 100 million records the SQL structured DBs no > longer functions well in this new environment. > > http://tinyurl.com/d28d3r6 > > Jim > > _______________________________________________ > dba-Tech mailing list > dba-Tech at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-tech > Website: 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 Wed Dec 28 16:45:02 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Dec 2011 17:45:02 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: <4EFB9BEE.7040103@colbyconsulting.com> LOL. I like it. NoAccess... John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > Yada, yada, yada. > > Still evangelising I see :-) > > 100 million records is not per se a problem for a SQL structured DB. > > No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, > > NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. > > You might just as well say: > With images exceeding several megabytes in size, NoAccess is much better than Access for > manipulating graphic data. Take for instance the NoAcess super application called > PhotoShop. > > From fuller.artful at gmail.com Wed Dec 28 17:32:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Dec 2011 18:32:34 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9BEE.7040103@colbyconsulting.com> References: <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> <4EFB9BEE.7040103@colbyconsulting.com> Message-ID: >From what I've read and what I've installed and cruised, the NoSQL solutions seem ideal for retrieval of non-hierarchical DB queries (e.g. web pages requiring lookup of either static pages or templates to be filled in), and totally wrong for transactional DBs. I am not making a judgement here, for or against; just saying that on my read these technologies serve different purposes. And while we're at it, let's also discuss the concept of partitioning: in most transactional cases, what occurred a year ago is History (i.e. not subject to updates), and what occurred more recently is potentially subject to updates. This leads to the concept of vertical partitioning, in which all data older than a year (or month, or whatever unit is deemed appropriate) is stored in a partition, while the Live data is stored in the Here and Now. This in turn requires at least a few queries that inspect and select from both partitions; not in itself problematic, but it ought to be recognized as a distinctly separate task than querying the live data, however that may be defined. I do love the concept of a SQL implementation entirely stored in RAM, and current technologies make most of this possible. For example, let us suppose, given the partitioning described above, that the current year's data resides entirely in RAM, and the previous years' data resides on disc. Then all the transactional events could occur at RAM-speed, with periodic writes to disc in user-defined periodicity. That in turn implies that the current stuff exists in one database and the historical stuff in another, and that scheduled jobs move the data out of Current and into History. The gains in such an approach increase in reverse-proportion to the timeline defined as Current, and this, IMO, is significant: suppose that the time-frontier shrinks to the past 30 days. That would easily enable most transactional DBs to store everything of interest in RAM, and on occasion reach deeper into the past (imagine a banking app that lets you print a statement dating back 30/60/90/120/all: the most frequent queries could be done from RAM, and the progressively more distant queries require an increasingly deep reach into disc storage). Architecturally, this approach is not a problem. However, I don't think that the NoSQL solutions are designed to solve this. I could be wrong on my read, but so far I think that NoSQL is designed for different problems. The up-side is, I also don't think that any vendor has approached this problem in precisely this way. Vertical partitioning goes 80% of what this demands, but not 100%, and therein lies an opportunity for some entrepreneur or major vendor to step up and provide it. I'll even supply the requirements: a) all the "current" transactional data resides in RAM (add as much RAM as you need) b) scheduled processes move older transactions from the RAM DB into the History DB c) queries designed to pull data from both Current and History should be easy to create d) History DB is itself partitioned, say by year, so that any given query wanting the Current and History (previous two years) need no rewriting as time goes on. First vendor to supply this in a wizard-like install/define UI owes me 1% of the revenue -- just a suggestion LOL. Arthur On Wed, Dec 28, 2011 at 5:45 PM, jwcolby wrote: > LOL. > > I like it. NoAccess... > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > > On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > >> Yada, yada, yada. >> >> Still evangelising I see :-) >> >> 100 million records is not per se a problem for a SQL structured DB. >> >> No matter how many times people claim that it is, NoSQL is NOT a >> replacement for SQL, >> >> NoSQL is just a group of solutions to manage types of data that SQL is >> not ideal for. >> >> You might just as well say: >> With images exceeding several megabytes in size, NoAccess is much better >> than Access for >> manipulating graphic data. Take for instance the NoAcess super >> application called >> PhotoShop. >> >> >> > ______________________________**_________________ > dba-SQLServer mailing list > dba-SQLServer@**databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.**com > > -- Cell: 647.710.1314 Thirty spokes converge on a hub but it's the emptiness that makes a wheel work -- from the Daodejing From jwcolby at colbyconsulting.com Wed Dec 28 19:22:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Dec 2011 20:22:24 -0500 Subject: [dba-SQLServer] So what is super hot in the tech world? In-Reply-To: <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> References: , <049D77D9530A404F9C1B51EBD72D5BE5@creativesystemdesigns.com> <4EFB9047.14178.47C997D4@stuart.lexacorp.com.pg> Message-ID: <4EFBC0D0.2030800@colbyconsulting.com> Yes, and everything I have read, the big brains in that technology say "it isn't a replacement for SQL databases". So the folks really in the know about NoSQL are saying point blank that NoSQL solves different problems and you still need SQL for problems that SQL fits. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/28/2011 4:55 PM, Stuart McLachlan wrote: > Yada, yada, yada. > > Still evangelising I see :-) > > 100 million records is not per se a problem for a SQL structured DB. > > No matter how many times people claim that it is, NoSQL is NOT a replacement for SQL, > > NoSQL is just a group of solutions to manage types of data that SQL is not ideal for. > > You might just as well say: > With images exceeding several megabytes in size, NoAccess is much better than Access for > manipulating graphic data. Take for instance the NoAcess super application called > PhotoShop. > > From listmaster at databaseadvisors.com Thu Dec 29 10:32:09 2011 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Thu, 29 Dec 2011 11:32:09 -0500 Subject: [dba-SQLServer] Administrivia - List Archives Message-ID: Hi Everyone, I just wanted to let you all know that the archives are back online after a lengthy delay. If you notice ANYTHING unusual about the archives, PLEASE let me know, listmaster at databaseadvisors.com or carbonnb at gmail.com. The search functionality should be up and running again very shortly too. I want to apologize for having the archives off-line for such a long time, but, unfortunately, life got in the way. :( I hope you all have a wonderful and prosperous New Year! -- Bryan Carbonnell - listmaster at databaseadvisors.com Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "What a great ride!" From fuller.artful at gmail.com Sat Dec 31 14:40:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 31 Dec 2011 15:40:57 -0500 Subject: [dba-SQLServer] Backtracking installations Message-ID: I have no idea what is going on, or what is failing to go on. All I'm thinking about at this point is to un-install erverything concerning SQL Server (all versions included), and then reboot. clean the registry, and start again. Furthest I want to go back is SQL 2008 R2; atop that, SQL 2012 Express, then (hopefully) re-attach the dbs that I already have residing on a separate hard disk. Any guidelines before I attempt this radical surgery? All of this is Dev not Test nor Production. Just want to get the basics working again. TIA, Arthur -- Cell: 647.710.1314 Prediction is difficult, especially of the future. From jwcolby at colbyconsulting.com Sat Dec 31 14:52:22 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 31 Dec 2011 15:52:22 -0500 Subject: [dba-SQLServer] Backtracking installations In-Reply-To: References: Message-ID: <4EFF7606.4030501@colbyconsulting.com> > Any guidelines before I attempt this radical surgery? Uh... tell us what is going wrong? How it began? How long it has been happening? Which versions fail? John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 12/31/2011 3:40 PM, Arthur Fuller wrote: > I have no idea what is going on, or what is failing to go on. All I'm > thinking about at this point is to un-install erverything concerning SQL > Server (all versions included), and then reboot. clean the registry, and > start again. Furthest I want to go back is SQL 2008 R2; atop that, SQL 2012 > Express, then (hopefully) re-attach the dbs that I already have residing on > a separate hard disk. > > Any guidelines before I attempt this radical surgery? > > All of this is Dev not Test nor Production. Just want to get the basics > working again. > > TIA, > Arthur >