Slashdot Mirror


Keeping Customer From Accessing My Database?

cyteen02 writes "We run a data processing and tracking system for a customer in the UK. We provide a simple Web site where the customer can display the tracking data held in our Oracle database. From these screens they can query based on a combination of 15 different data fields, so it's pretty flexible. We also provide a csv report overnight of the previous day's data processing, which they can load into their own SQL Server database and produce whatever reports they want. Occasionally they also want one-off specific detailed reports, so we write the SQL for that and send them the results in an Excel format spreadsheet. This all ticks along happily. However they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without consulting us. As a DBA, my heart sinks at the thought of amateurs pawing through my database. Unfortunately, 'because you are stupid' is not considered a valid business reason to reject their request. So can any Slashdotters assist me in building my case to restrict access? Have you experienced a similar situation? Have you had to support this sort of end user access? How would you advice me to keep my customer away from my precious tables?"

567 comments

  1. A simple suggestion by suso · · Score: 4, Insightful

    Just say no and hope that it sticks. Seriously. I find that so many people in the workforce noadays don't know how to say that simple word. No.

    Sometimes its hard to make a case for it if management at your company thinks that you are being unreasonable. However if you are a reasonable person and skilled in your profession, management should trust you to do your job. I'm of the opinion that if management can't trust employees in their area of expertise and to give good advice, then it is not a good place to work. My first tech job became this way, the new management that came along had a distrust of us and it made everything sour. Anyways, that's getting away from your question.

    But being a sysadmin, I think you have to stand up for your opinion when the time is right to do so. People who aren't in the know always have requests like this to grant more access, make things easier, keep the customer's demands first. Its your job to draw a line in the sand that says you can't go past that point. Some people don't like that, but honestly it doesn't matter. Rules are there for a reason. They are guides to providing good service for all customers, not just one.

    1. Re:A simple suggestion by ShieldW0lf · · Score: 4, Informative

      You could always put together a demonstration, in which you illustrate how easily an unskilled user can issue the wrong query and bring the server to its knees.

      --
      -1 Uncomfortable Truth
    2. Re:A simple suggestion by jackharrer · · Score: 4, Insightful

      Better - show that they would be able to access other customers data and shout "Data Protection Act" as often as possible during demonstration. They'll understand...

      --

      "an experienced, industrious, ambitious, and often, quite often, picturesque liar" - Mark Twain
    3. Re:A simple suggestion by TheRealMindChild · · Score: 5, Insightful

      I will agree with this, but add one more note. You are selling them INFORMATION that you compile from YOUR data... you are not selling the data itself. I have had this conversations with clients many times.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    4. Re:A simple suggestion by stoolpigeon · · Score: 4, Informative

      It is not difficult to make this impossible- oracle allows for limiting resource consumption by user among other things.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    5. Re:A simple suggestion by suso · · Score: 1

      I will agree with this, but add one more note. You are selling them INFORMATION that you compile from YOUR data... you are not selling the data itself. I have had this conversations with clients many times. Hey that's a good way to put it. Thanks.
    6. Re:A simple suggestion by x00101010x · · Score: 5, Insightful

      You could scare management by explaining to them that allowing direct access will disclose your database schema to the customer which will allow them to reverse engineer some of your service's design and possibly allow them to make their own (eliminating their need to continue working with your company).

      --
      DONT PANIC
    7. Re:A simple suggestion by SanityInAnarchy · · Score: 1

      SELECT * FROM A_HUGE_TABLE;

      --
      Don't thank God, thank a doctor!
    8. Re:A simple suggestion by Just+Some+Guy · · Score: 1

      You are selling them INFORMATION that you compile from YOUR data... you are not selling the data itself.

      That's the kind of thing you have to establish well before this point, though. It might be awfully hard to make the case that their queries is fundamentally different from the output of your queries.

      --
      Dewey, what part of this looks like authorities should be involved?
    9. Re:A simple suggestion by CastrTroy · · Score: 5, Informative

      Well, you could always ship the information to another machine, and have them access it from there. You could easily do it so that it's only a couple minutes behind real time. If they really think they need the information that badly, they will pay for the cost of the extra machine. If the really can't wait for the CSV files to come in at night, then it must be pretty important for them to have the data right now, or it must be really difficult for them to manager their own copy based on the CSV files. Shipping it to another machine would allow them to do stupid queries without compromising the performance of the main system.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    10. Re:A simple suggestion by Giant+Electronic+Bra · · Score: 4, Insightful

      That's customer service! lol. Think about it, the data is probably required for the customer's business process. So saying 'no' is tantamount to 'you can't run your business', and the customer will become an ex-customer just like that.

      There are perfectly good technical solutions to the problem. As a DBA I would just point out to management what the issues are and suggest the obvious solution (data replication). If management really wants to tell the customer to take a hike, then that is up to them. But at the very least you the DBA don't end up being the nay sayer.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    11. Re:A simple suggestion by BitZtream · · Score: 5, Insightful

      With Oracle, all you would demo is that you aren't a very good oracle DBA.

      Oracle has plenty of security and control mechanisms to ensure that a user can't starve the system of resources if you know how to use them.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    12. Re:A simple suggestion by tinkerghost · · Score: 5, Informative

      too simple,
      select bt.* from big_table bt, bigger_table bbt, biggest_table bbbt where bt.id=bbt.bt_id order by non_indexed_column;
      Perhaps a good left outer join tossed in there to really thrash the drives.

    13. Re:A simple suggestion by osu-neko · · Score: 3, Insightful

      That's customer service! lol. Think about it, the data is probably required for the customer's business process. So saying 'no' is tantamount to 'you can't run your business', and the customer will become an ex-customer just like that.

      Um, no. Actually think about it. The customer is already in business and has been for some time without being able to do this. It is therefore an immediately obvious fact that it is not required for the customer's business process.

      --
      "Convictions are more dangerous enemies of truth than lies."
    14. Re:A simple suggestion by Eco-Mono · · Score: 3, Informative

      You've already got a cross-join (probably by mistake, given that you even bothered to mention left outer as useful). I think that'd be illustration enough :)

      --
      (rot13) rpbzbab@tznvy.pbz
    15. Re:A simple suggestion by an.echte.trilingue · · Score: 5, Insightful

      How you phrase it is everything. "No" will never stick, especially if the customer can easily migrate elsewhere. As a computer guy/dept, management/the customer sees you as somebody who just makes the mysterious boxes do what they want, no matter how asinine you know that request to be. Once you start throwing barriers between the manager/customer and what he thinks he wants, you will soon be replaced by somebody who who doesn't.

      The key is to try to steer the customer to another direction. Often they want silly things like this because they don't know the alternatives. Engage the customer and find out what they are doing, and toss out a better solution. In the end, you will both be happier.

      If you do end up having to give them RO access, I would be sure to write some method into their user interface that restricts wildcards. You don't want somebody doing the oracle equivalent of
      echo "select * from huge_table" | cat > querry.sql; mysql -u user -p huge_db < querry.sql | grep value

      Sounds silly but I saw a colleague write a script that did something about like that.

      --
      weirdest thing I ever saw: scientology advertising on slashdot.
    16. Re:A simple suggestion by brezel · · Score: 2, Funny

      too simple,

      select bt.* from big_table bt, bigger_table bbt, biggest_table bbbt where bt.id=bbt.bt_id order by non_indexed_column;

      Perhaps a good left outer join tossed in there to really thrash the drives. why join tables anyway? if you really want to fsck your server just SELECT * FROM HUGE_TABLE t1, HUGE_TABLE t2, HUGE_TABLE t3; :D

      if you want to make it less obvious feel free to throw in a few FIRST_ROWs, RANKs and DISTINCTs ;)
    17. Re:A simple suggestion by Pizentios · · Score: 1

      Having experience with managing a small enterprise level database, i can understand that many admins wouldn't allow (or want to) customer access to a mission critical database. With the wrong query they can really ruin a good day. That being said, the database is your company's asset, and with the proper precautions can be turned into a money generating asset. Since it's your asset, you dictate the terms on which customers access your data. You can require that the customer first submits the sql query that they wish to run to the database admin. You can also tell them who ever is writing the querys has to be certified by your company and trained. Keep in mind, you can charge for the extra certification and train that the customers employees would need, and charge on a monthly basis for database access. People will pay top dollar for top quality service and goods, people for some reason sometimes don't realize what the market is willing to pay. The fact is, with scheduled backups (remote and onsite) any customer damage could be undone and your customer contracts could have a clause in them that gives your company the right to sue for lost time and money.

      --
      -Pizentios
    18. Re:A simple suggestion by ADRA · · Score: 3, Informative

      If the poster is really anal about having access to 'the' data but not necessarily worried about schema browsing, etc.. your suggestion is really the way to go.

      Oracle supports standby databases that can be locked into read-only modes. You can even change how often the data is updated, releiving your main access system the burden of direct customer interaction.

      Worst case scenario is that the customer chokes the box to its knees and then THEY can't access your data, but it doesn't affect your operations at all.

      Since you should most certainly be charging for this service, the profits reaped should more than pay for the small investment in hardware.

      Plus, if your main DB does go down in flames, you may be able to requisition the read-only DB as a temporary main of down time becomes excessive.

      --
      Bye!
    19. Re:A simple suggestion by Anonymous Coward · · Score: 3, Insightful

      Um, no. Actually think about it. What you're saying is not factually correct - business can change.

      In any case, it is irrelevant whether the data is actually required for the customer's business process. The GP's point is valid because it is what the customer believes that matters.

      Besides, this is an opportunity to make more money from this customer. Why would you say no?

    20. Re:A simple suggestion by Em+Adespoton · · Score: 5, Insightful

      This is definitely something that should be stressed. What I provide my customers is a front end with standard queries, PLUS the ability to trigger a backup (either daily snapshot or cumulative snapshot... which takes some time to transfer; our databases are generally around 2-8GB of data) of the database that they can then access and manipulate to their heart's content. At no point do they gain access to live data, but they can take snapshots whenever they want.

      I have been toying with the idea of a shadow database that they can have live access to but which is only updated, never queried, by the main system. This is another possibility for your customer, and provides fresh income for you and your team as you develop this "new product".

    21. Re:A simple suggestion by hackstraw · · Score: 1


      Oracle also supports views which are very powerful for these kinds of things.

      And as others have said, No is sometimes a great answer to questions.

    22. Re:A simple suggestion by msuarezalvarez · · Score: 1

      Why do you cat into a file and the use that as input, while you might simply echo into mysql? I know spawning processes if fast nowadays, but things like

      someprocess | cat > somefile

      just saddens me!

    23. Re:A simple suggestion by Score+Whore · · Score: 2, Insightful

      If the information is what it sounds like, it's information about the customer's activity. There'd be a very difficult argument that you own that data instead of the customer owning it. If the customer did zero data entry, no batch loading, EDI, programmatic inserts and updates, or other data loads into the database would there be anything for this guy to provide his customer? Sounds like he's providing a IT support service not a data source.

      Unless there was a negotiation up front with specific line items to be delivered (certain types of off-line reports, certain types of web enabled reports, etc.) then just butch up and give them what they want. If you don't you're going to lose your customer. If you're a dick about it, you're going to lose your customer and get bad word of mouth.

      Think of it this way: if you believe you should have control of and access to your medical files, credit reports, and bank records; then this customer should have the same with their data. Just make sure they can only see their data.

    24. Re:A simple suggestion by phallstrom · · Score: 5, Insightful

      Additionally, your customer will now begin to rely on your schema and when you decide to change it they will be upset. In OO terms you just gave them access to all your private methods :(

      This happened to me. No choice in the matter. And when it came time to build version 2 and make some internal changes we couldn't because the customers had grown accustomed to the schema being a certain way.

    25. Re:A simple suggestion by tinkerghost · · Score: 4, Informative

      why join tables anyway? if you really want to fsck your server just SELECT * FROM HUGE_TABLE t1, HUGE_TABLE t2, HUGE_TABLE t3;
      Because the unbounded join on bbbt is the most likely type of problem you'll see in letting other people write their own sql statements, so it stands as a perfect example as to why they shouldn't be allowed to do it.
    26. Re:A simple suggestion by garyrich · · Score: 1

      As another poster said, Oracle makes this trivially easy to do with data replication or warehousing or just a hot standby database. Even in old versions you could run in archivelog mode, ftp the log files to the data warehouse and have that database roll forward the log files.

      The only reasons not to do this are business reasons and data security reasons. Concerns about this customer getting acces to other customer's data or getting access to info that may be about that customer but is company confidential to *your* company.

      Or if this is a multi-terrabyte database and this cusomter thinks they up to the second data. If they want that - they need to cough up some coin.

      --
      -- your Web browser is Ronald Reagan
    27. Re:A simple suggestion by Prof.Phreak · · Score: 4, Insightful

      Saying ``no'' for business reasons is great; saying ``no'' because there's no good way to handle it technically is a -bad- reason.

      From my experience, sysadmins who overuse the `no' response are a buncha pricks who can't do anything (you know something is wrong when seemingly simple requests meet a ``no'' response or take days to complete [something that would take you a minute with command line access to the server]---big corps are full of such folks).

      As for one possible solution: with read only access, they can't mess things up; most seasoned db admins can ensure that Oracle handles things gracefully---even from stupid read-only users.

      Another solution may be to setup a mirror box, and let'em have at it. Mirror the data every day or so. If they screw it up -somehow-, everything will be reset in 24 hours anyway.

      --

      "If anything can go wrong, it will." - Murphy

    28. Re:A simple suggestion by Qzukk · · Score: 1

      someprocess | cat > somefile

      just saddens me!
      ... Especially since it could have been done as someprocess > somefile without the cat in the first place, assuming you wanted to have record of the query in a file (and didn't know about tee).
      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    29. Re:A simple suggestion by stoolpigeon · · Score: 3, Insightful

      I think the big deal here is how they connect. Most databases I manage are not being accessed directly by anyone but me and the other dba team members. And we aren't mucking about with data.
       
      Users are reaching the database through applications across many layers of security.
       
      So my concern with the question hear would not be some ignorant user bringing down my system with a wayward query. Good database management will make that pretty much impossible. My concern would be - how do they gain this connectivity and how secure is that connection both ways?

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    30. Re:A simple suggestion by tinkerghost · · Score: 4, Funny

      no, the cross-join (or unbounded join) was deliberate, I think adding a nice left outer join on top of the cross-join would be just the icing on the cake, or sand in the bearings.

    31. Re:A simple suggestion by pfleming · · Score: 1

      Whose data is it? Is it yours or theirs? You wrote that you run the database for your customer which would tend to indicate that the data is theirs. How they want to access it should be limited to what is technologically feasible - don't pretend that you own the data.

    32. Re:A simple suggestion by cayenne8 · · Score: 5, Insightful
      "Better - show that they would be able to access other customers data and shout "Data Protection Act" as often as possible during demonstration. They'll understand..."

      I don't see what the problem is....just set up a role with select privs. only on that customer's table(s). If you have all the customers' data mixed in the same tables, then create a view on their data and grant select only on that. Or...maybe look into Oracle's granular level permissions you can set up?

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    33. Re:A simple suggestion by dannannan · · Score: 4, Insightful

      This is a classic example of what someone wants vs. what they are asking for.

      What they don't want is this:

      Someday, probably a Monday, you will get a page. The production website is timing out and they've traced it to the database. A look at the Oracle dashboard indicates that several "ad hoc" queries have been running for the past 4 hours, have blown the cache, and are churning up 99% of the read I/O on the database. You kill the queries. Some customer's ad hoc reports fail, they want to know why and they're especially irritated because they've been waiting 4 hours for the result. The other customers are upset that the main website is unavailable.

      What they do want is a sandbox to play in.

      The production database server is not a sandbox. It's a system of schema and queries there are all designed and QA'ed to meet an SLA. A certain amount of cache is required; a certain amount of logical I/O is possible; queries do their work within those boundaries. The tp99 is under 100ms because it was designed that way. And the schema is not even convenient for reporting. Maybe it happens to be convenient today, but that is a coincidence and things will soon change.

      Everyone would be much happier if the sandbox operation could be managed separately. OTOH, improvements to the reporting schema could be made without requiring a dev+QA iteration on the production website.

      Whatever you do, don't agree to support this feature without getting sign off on the additional hardware and software you need to run that sandbox. If you can't get that, get sign off on a new, weakened SLA for the main production application that will be impacted.

    34. Re:A simple suggestion by cayenne8 · · Score: 1
      "So my concern with the question hear would not be some ignorant user bringing down my system with a wayward query. Good database management will make that pretty much impossible. My concern would be - how do they gain this connectivity and how secure is that connection both ways?"

      Set up a VPN connection for them...and then they can SQLPlus through that...heck, I've done this on military systems in the past....secure enough for them...

      Set up the VPN connection....or even maybe ssh sessions for them, and set up views with select privs on them so they can look at their data.

      I gotta imagine a set up like this is big enough that simple queries are not gonna threaten to 'bring the system down'.....

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    35. Re:A simple suggestion by KevMar · · Score: 2, Insightful

      You honestly dont have the recources to provide that type of access. Tell them that the database was not structured in a way to keep customer data seperate. You would have to add staffing to manage the security and the seperation of the data. You also know what queries are demanding on the server, so you run them at a time that is low impact to the customers.

      You also dont have a license to grant them access to the schema. If they query the database directly, any back end changes would break the reports they run.

      You dont want to open that kind of access up to your database/network. It makes the entire structure that much less secure.

      And like everyone else said, just tell them no. You already know why you don't want them in. You also understand how the tables relate. It is very easy for someone to wrtie the wrong report because of an important relationship or flag that was forgotten.

      --
      Im a gamer, not a grammer major. This post is full of spelling and grammer mistakes.
    36. Re:A simple suggestion by Bill+Dog · · Score: 2, Insightful

      If the information is what it sounds like, it's information about the customer's activity. There'd be a very difficult argument that you own that data instead of the customer owning it.

      Who's collecting it? The customer could certainly track their own activity if a company's terms were not satisfactory.

      Think of it this way: if you believe you should have control of and access to your medical files, credit reports, and bank records; then this customer should have the same with their data.

      It's not about saying what a customer can do with their data, it's about saying what a customer can do with your particular copy of their data. I can get my credit report, and look at it 1000 times in a day if I want, but I can't get my credit report 1000 times a day.

      --
      Attention zealots and haters: 00100 00100
    37. Re:A simple suggestion by mwvdlee · · Score: 1

      Unless Oracle's SQL implementation is guarenteed without any (security) bugs, which nobody can guarentee, you have a valid case to limit customers' access to SQL.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    38. Re:A simple suggestion by pushf+popf · · Score: 1, Insightful

      That's easy.

      Tell them that their contract does not include direct access to the database.

      Once you give them access to the database, you're screwed. They can easily replicate it and dump you.

      They can still dump you if you say "No", however it's more difficult and may not be worth their time or money.

      You could also say "Yes" and make it very expensive.

    39. Re:A simple suggestion by InlawBiker · · Score: 1

      I was going to suggest this too. I've had clients ask for live access to production databases over the years. The answer is always "No." No no no no no no no no no. Never. In this case it's our data, not theirs.

      If direct access was a stipulation in the contract that'd be different. Then we could make arrangements to give them access to a reporting server, or to a set of pre-canned queries. There are many ways to structure this if you have time and resources.

      Sometimes they really do need to run all kinds of big reports on data, and sometimes there's no reason somebody should come between the customer and the reports, introducing delays and charging $200 an hour for something they could be doing themselves. Shipping them a snapshot is one workable solution.

    40. Re:A simple suggestion by PRMan · · Score: 5, Informative

      And when it came time to build version 2 and make some internal changes we couldn't because the customers had grown accustomed to the schema being a certain way.

      That's what Views are for. They keep using the "old table", which is now a view. You put the changes in the "new table". You don't need to change your code either, except in the instances that required you to change it in the first place.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    41. Re:A simple suggestion by Z00L00K · · Score: 4, Insightful

      What you can do is to create a replicated database where they can execute their queries and do their mistakes. So if they bring down that secondary server it won't affect the production system.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    42. Re:A simple suggestion by Ash+Vince · · Score: 5, Interesting

      Better - show that they would be able to access other customers data and shout "Data Protection Act" as often as possible during demonstration. The problem with this approach is that you come across as a rubbish DBA. Any DBA worth his salt can set permissions that only allow specific user accounts access to specific tables or views. I have never used Oracle but I do admin several MySQL databases (v4) and even they allow me to limit a particular user in this manner. If you are going to tell me Oracle does not support table level permissions I would be very surprised.

      Further down this thread people start mentioning the silly query overloading the server issue. Now this is a real issue but it can be made to work either way you want. We had a similar request from a customer several years ago but we were not so opposed to giving them read only access if it could be done safely. We choose to set up a separate replicated server that they could query directly. If they wipe out the server with a silly query, who cares since it only effects them. The work involved in setting this up, its maintenance and hosting were all chargeable thereby making us more profit. This keeps them happy, the management team happy and me happy since my company operates a profit sharing scheme.

      If you still are unable to see the benefit of giving them access then the best bet might be an intellectual property argument. Depending on whether you or they own the IP of the system you provide you may be able to argue that the database structure is a proprietary work and that exposing it would be against company policy in that regard.

      Somewhere I used to work had a less than optimal database structure we all inherited from the previous developers who build the system. We knew how bad the design was but changing it was a huge job that we could not make the time to do as we were busy on paid work for other clients. We successfully avoided letting the customer see how awful the design was until the contract ended (it was a fixed term job that could not be extended) by making the IP argument.
      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    43. Re:A simple suggestion by MrAnnoyanceToYou · · Score: 3, Insightful

      Personally, I think a better way to solve the problem would be to spec out exactly how much time it would take to implement what would be necessary to accomplish the task at hand. Mention how long the first pass of addressing what the task would require would take, and be open and honest with exactly how much money this will cost, as well as what kind of system resources it would consume.

      If your database isn't designed for separation of customer data, and your data structure needs to be somewhat reorganized, you are going to come up with a fairly large number. Mention that there will be downstream issues, and that it's partial system redesign.

      Present options; you know what they are, you know what they will cost as far as your time is concerned. Is this account worth bringing someone on to take over some of your duties, or paying you overtime at double time for the next two or three months? Saying, "No, I don't wanna," is fairly ineffective; showing people (in numbers) why you're uneasy about the issue might help.

    44. Re:A simple suggestion by jellomizer · · Score: 2, Insightful

      No that is wrong thinking... That is like saying modern farms can get by if they toss all their tractors and go back to ox pulled plows. The market is changing for the client having the data directly on the server for them to quary at will can give them them a competive advantage or at least to prevent competitors to have the advantage. So it could lead not having this data could kill the company.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    45. Re:A simple suggestion by quangdog · · Score: 1

      Just say no and hope that it sticks. Seriously. I find that so many people in the workforce noadays don't know how to say that simple word. No. I disagree. When I need to say "NO" to someone (which happens regularly) I always try to take time to come up with possible alternatives that will still fit the needs of the customer, but not interfere with our business needs as well. For this example, there are several suggestions elsewhere in the comments - setting up a replicating server that they can go to town on, limiting permissions at the table level, restricting processor usage, etc. It's much easier to hear "NO" when you immediately here "but here's what I can do for you, which will accomplis the same goal" (ie, give them the ability to formulate and process their own queries.)

      -- Kimball
      www.kimballlarsen.com
    46. Re:A simple suggestion by LordSnooty · · Score: 1

      You could always put together a demonstration, in which you illustrate how easily an unskilled user can issue the wrong query and bring the server to its knees.
      With read-only access? I think the developer is being unreasonable here, there's nothing wrong with requesting access to their own database. It happens with many other business systems I can think of. You can set effective permissions so there is no technical reason not to do so - the only thing I could think of is protecting the intellectual property within the database. But if you don't allow access, I'm afraid you may find that competitors will.
    47. Re:A simple suggestion by BUL2294 · · Score: 1

      Well, if you're in the mood to piss people off, why not do...
      while 1=1
      select bt.* from big_table bt, bigger_table bbt, biggest_table bbbt where bt.id=bbt.bt_id order by non_indexed_column;

      This way, you'll get under the skin of both the DBAs & the network guys.

      --
      Windows 3.1x calc: 3.11 - 3.10 = 0.00
    48. Re:A simple suggestion by Anonymous Coward · · Score: 0

      Agreed you can easily limit the number of blocks allowed to be retrieved with a profile. I use this at work to limit requests by internal users to 80K of getpages. Ideally set it so something really low and say that you have complied with the request. Of course I would insist that we could shut off access if they do something really stupid and make them jump through a series of painful security hoops and nasty contracts before granting access.

      CREATE PROFILE "80KGETPAGES"
              LIMIT CPU_PER_SESSION DEFAULT CPU_PER_CALL DEFAULT
              CONNECT_TIME DEFAULT IDLE_TIME DEFAULT SESSIONS_PER_USER
              DEFAULT LOGICAL_READS_PER_SESSION DEFAULT
              LOGICAL_READS_PER_CALL 80000 PRIVATE_SGA 102400K
              COMPOSITE_LIMIT DEFAULT FAILED_LOGIN_ATTEMPTS DEFAULT
      /

    49. Re:A simple suggestion by Anonymous Coward · · Score: 2, Informative

      What he said.

      The customer is giving you a chance to add value, but doing so will take some work on your part to prevent negative performance impact on the production database.

      So, you charge them for the work and create a data warehouse for them, perhaps including some analytical tools to help them query/ data mine effectively. The more they do this, the more they will probably want your help to do it better.

      Everybody is happy.

    50. Re:A simple suggestion by Anonymous Coward · · Score: 0

      And the customer's business needs never change, right? Any DBA who would simply say "No, you're stupid" to this kind of request is incompetent and doesn't belong in the industry.

    51. Re:A simple suggestion by Anonymous Coward · · Score: 0

      Um, no. Actually think about it. The customer is already in business and has been for some time without being able to do this. It is therefore an immediately obvious fact that it is not required for the customer's business process.

      The customer seems to think it is. They're obviously wrong though, because business processes never change and /. clearly knows their business better than they do.
    52. Re:A simple suggestion by Anonymous Coward · · Score: 0

      I'd make a minor addition to make this a tad worse

      select bt.* from big_table bt, bigger_table bbt, biggest_table bbbt where bt.id=bbt.bt_id order by sha256(sha256(non_indexed_column));

    53. Re:A simple suggestion by KUHurdler · · Score: 1

      or give them access. Then break it, and charge them to repair it.

      --
      Fix Your Own TV - RiddledTV.com Avoid the Landfill
    54. Re:A simple suggestion by Awptimus+Prime · · Score: 2, Insightful

      Well, the submitter is obviously not worth his salt if he can't make simple job decisions without "asking slashdot" and calling his paying clients stupid in a public forum. It probably wouldn't be terribly hard to put two and two together if a client happens to read this site and say to himself "I don't know, but I think this is the company we are dealing with" and looking for a provider of services that has their shit together a bit better.

    55. Re:A simple suggestion by Anonymous Coward · · Score: 1

      I think he's already prepared to do that, but "just say no" will only get you laughed out of the office. However, there are several valid reasons for refusing this request.

      1. Allowing access to the technical database structure is equivalent to freezing the database structure. If you ever change it you will need to keep ALL external clients uptodate on your intended changes, lest you break their precious queries. This will make any further development both a political nightmare AND an expensive communications effort.

      2. Userqueries won't be optimized. Ever. But they will blame you for the "slow database" and demand increased performance. On your budget. What they need is a datawarehouse, but they're not going to pay for it. In the end, you will be forced to pay up or get irate clients complaining to your management about your bad performance.

      3. Even worse: the transactional users will be facing trouble from the queries. This is currently happening to our SAP installation where some idiots managed to both undercut the datawarehouse group AND the transactional group by providing queries on customizable options on the main items we sell. Thats user-parameterized queries on tables with millions of rows, cross joined to a few other tables with millions of rows and users running them several times per hour just to see "if anything changed". We're running this on a computing grid and it STILL grinds to a halt when 10 users run the query.

      NEVER EVER let users run queries on a system that's not designed as a datawarehouse. You have systems designed for it, and systems that just aren't, and mixing the two is a recipe for disaster.

    56. Re:A simple suggestion by Debug0x2a · · Score: 2, Interesting

      As thinkgeek puts it.. SELECT * FROM USERS WHERE CLUE > 0 No rows returned.

      --
      First post = troll. Cleverly worded post designed to enrage others = flamebait.
    57. Re:A simple suggestion by Nutria · · Score: 1
      Better - show that they would be able to access other customers data and shout "Data Protection Act" as often as possible during demonstration. They'll understand...

      But then they'll ask you why (or worse, silently assume that) you aren't compentent to secure the system from attack.

      --
      "I don't know, therefore Aliens" Wafflebox1
    58. Re:A simple suggestion by outofoptions · · Score: 1

      Or, just say you will look into it, but you have other customers as well and there are always 'unknown' security holes. You simply must do what is best for ALL of your customers. Now, if you want to pay for your own server.......... And stall, stall, stall....

      It doesn't sound like they have any VALID reason given what you have stated above.

    59. Re:A simple suggestion by lakeland · · Score: 5, Insightful

      Of course Oracle has permissions. That area of Oracle is substantially more sophisticated than MySQL's, not that surprisingly really - large enterprise access is bread and butter for oracle. Oracle's permissions are so fine grained that most people haven't heard of half of them... has a very nice permission set called 'roles' which allows you to carefully work out a set of common permissions and easily grant them all to a bunch of users. One area Oracle is missing for some reason is grant permissions at a schema level (which MySQL would call a database) rather than the object level - it is something that comes up a lot in practice.

      However, when you start talking about load issues, that's where things that are feasible in MySQL just aren't in Oracle. Presuming this DBA is running Oracle EE, he'll be paying $40k/CPU (or technically, $40k/2 cores). That means for him to replicate onto another box for load issues will cost him an extra $40k just for a simple dual-core machine. Or $45k say, hardware isn't completely free.

      If he wants that load balancing to happen automatically rather than telling clients which machine to log into, then Oracle has a much better product than MySQL's cluster. Unfortunately, MySQL's cluster is virtually free, while Oracle RAC is over $500k. At the same price, I would have chosen RAC over Cluster, but with that kind of price difference...

      So, I think it basically comes down to load issues. Scaling up an Oracle install is unaffordable without a great business case and expecting random clients to not bring the server to its needs (granting them unlimited CPU) won't work - especially on a server which no doubt has limited cores - while not granting unlimited CPU will lead to all sorts of confused issues logged about queries failing.

      There are plenty of solutions. Replicate onto Postgres (it supports Oracle's syntax so would be a better choice then MySQL). Create some nice star schemas and export via Discover or similar, replicate onto a machine that the client supplies and pays for licencing of, etc. Ditching Oracle EE and going SE might be enough too, the EE features are nice but not when they prevent business growth. Writing a custom SQL Server integration and syncing daily is probably only a few hours work and good enough for a DB up to about a TB if daily sync is fresh enough. That's just off the top of my head, I'm sure there are more options.

    60. Re:A simple suggestion by cparker15 · · Score: 1

      Business process changes.

      --
      Have you driven a fnord... lately?

      You must wait a little bit before using this resource; please try again later.

    61. Re:A simple suggestion by Vellmont · · Score: 3, Insightful

      This is the first intelligent reply I've seen.

      There's too much of an instinct in IT to think of the systems as "yours", and protect your little kingdom. It's a computer, not your children.

      The only thing I'd like to add is, if the customer wants this kind of access (and I'd agree about the replication system), then it's going to cost something. This kind of thing isn't cheap, and it should be free. Estimate some reasonable setup costs, as well as maintenance costs, add some kind of profit margin to each, and present it to the customer. Let THEM decide if it's worth the price.

      This is a business decision. There's really no reason the technology can't provide you a level of protection from the customer access to the system. The difference is they have to be willing to pay for that access.

      We successfully avoided letting the customer see how awful the design was until the contract ended (it was a fixed term job that could not be extended) by making the IP argument.

      Heh. I'm sure you can fool a non-developer with a line like that, but anyone that knows anything about software development knows that schema is about worth nothing, and you're just trying to hide something.

      --
      AccountKiller
    62. Re:A simple suggestion by IdleTime · · Score: 2, Informative

      See Oracle Database Security Guide, http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/toc.htm If you have MetaLink access, see:
      Note 67977.1 Oracle Fine Grained Access Control - Working Examples
      Note 99250.1 Understanding Fine-Grained Access Control
      if that does not help, open a service request and select "SECURITY" as component and get some assistance.

      --
      If you mod me down, I *will* introduce you to my sister!
    63. Re:A simple suggestion by Anonymous Coward · · Score: 0

      I disagree.

      You should say yes, but then demonstrate how an unskilled customer query can bring the server to its knees AND use this as justification for additional data warehousing hardware.

      The ideal architecture here is that the read-only customer queries should happen on a seperate database machine, not the production read/write box. Sometimes these are called data-warehouses, sometimes "report servers".

      So, say yes, but make sure its clear that you intend to do this the "right way". If management still wants to do this make them pony up the cash to do it right.

    64. Re:A simple suggestion by stoolpigeon · · Score: 2, Insightful

      The added bonus is that if you have them using sql*plus - their love for ad hoc queries may be short lived. :)

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    65. Re:A simple suggestion by Firehand · · Score: 1

      This is the perfect response. I have seen too many DB's brought to a screeching halt by even properly written queries to trust 'outside' people to have such access.

      Our DBA at work told me once that at his previous employer you had to submit a request with the DBA indicating why and how often you wanted to run a given query before you could run any sort of query at all.

    66. Re:A simple suggestion by iamhigh · · Score: 1

      But eventually the customer might hire someone that actually knows how to use the system. This happened to me when I started a new job. The contracted company didn't want us to have access, for some reason. And I will grant them that nobody there before I started had a clue and probably would have screwed things up. But even when I came on board, the refused to give us access to our data. Within 6 months we were no longer their customer. It also didn't help that they were overcharging like crazy!

      --
      No comprende? Let me type that a little slower for you...
    67. Re:A simple suggestion by eck011219 · · Score: 1

      Great way to put it. I'm a graphic designer first and programmer only when necessary, so I was coming at it from a slightly different angle. But in the publishing industry, we sell our clients finished books. I design and typeset these books, and in the end they own a garage full of books. I still own my application files (all the digital images, InDesign or Quark files, and fonts). If they want the app files (in other words, if they want to reprint somewhere else without going through us), we sell them those files.

      The digital files, though, are a separate entity from the expression within them. In this case, I'd think it would be the difference between the collected data (John Smith, 123 Main Street, etc.) and the table structure, queries, and so on.

      Finally, when we sell my files, I take all indication of our involvement out of the book. Part of the agreement is that we no longer hold any responsibility for the files themselves. If the client wants to gum up the works and produce a crappy reprint, that's their business. But we want no connection to it if we are no longer in direct control of it.

      That last bit might be enough to scare your client in this case -- if you tell them that you can't be responsible for the integrity of the data or the reliability of the server anymore if they're going to start writing their own queries, they may decide to stick to the way you've been doing things all along.

      Of course, they may also walk away. And while I don't know how integral to your business life they are (and therefore wouldn't presume to tell you to just dump the bozos, as that kind of response comes far too often in the hallowed halls of Slashdot as it is), but I've often been happy to see people walk away during this kind of conflict. You learn a lot about people during negotiations like this, and I've been relieved to find out what a client is made of BEFORE begging them to stick with me/us. It just ends up in a nasty breakup later anyway, typically on a tighter timeframe with higher losses.

      --
      It is pitch black. You are likely to be eaten by a grue.
    68. Re:A simple suggestion by beckerist · · Score: 3, Interesting

      BTW: You are already better than 99% of all DBA's I've ever worked with. You at least ALLOW custom queries in the first place, and even take the time to write them yourself. Your co-workers don't know how lucky they have it...

    69. Re:A simple suggestion by RevDobbs · · Score: 1

      Exactly. Shout "Sawbones Awkwardly!", "It's for the children!", then grab a beer and ??? your way to profit.

    70. Re:A simple suggestion by Ciaran+Power · · Score: 1


      echo "select * from huge_table" | cat > querry.sql; mysql -u user -p huge_db < querry.sql | grep value
      argh!
      echo 'select * from huge_table' | mysql -u user -p huge_db | grep value

      much better
    71. Re:A simple suggestion by Lehk228 · · Score: 2, Funny

      never EVER show your privates to a customer.

      --
      Snowden and Manning are heroes.
    72. Re:A simple suggestion by BronsCon · · Score: 4, Funny

      Slashdot-reading paying clients, at that. I'll be discussing the option of switching providers with management after reading this thread.

      You hit the nail on the head.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    73. Re:A simple suggestion by ahsile · · Score: 1

      I've done this with MySQL, and it works quite well.

      Backstory:

      While setting up some ODBC connections for another app, someone who shouldn't have been got copied with the username/password for the read-only account. Needless to say, within a couple hours he had run a query that wasn't joining multiple tables correctly and ended asking the server for about a billion rows (after all the cross products were calculated). Needless to say, the server ground to a halt as it tried to run the request.

      We changed the ODBC username and password quite quickly, but the user took the case over our heads. Our VP demanded that he have access to the system in order to look for 'data inconsistencies'. To protect the production environment we set up a replicated slave on one of our testing servers, and let him go to town. To date, I don't think he's made quite the same mistake. On the other hand, it's a good lesson why those without database experience shouldn't be executing freehand SQL.

    74. Re:A simple suggestion by kboodu · · Score: 1

      > Just say No and hope it sticks.

      While we (the DBAs and worker-bes) often say "No," it is all too often that management, in order to "appease the customer" says "Yes."

      The biggest explanation is if it's a shared Oracle instance, they may be able to access data inadvertantly that they shouldn't have access to. If that fails, identify it as a risk allowing them to mine the data becuase mal-formed queries can drop the performance of the databaes engine so no users can effectively utilize it (think escalating locks).

      And, yes, I am a Database Administrator (DBA).

      Tim

    75. Re:A simple suggestion by sumdumass · · Score: 5, Insightful

      There's too much of an instinct in IT to think of the systems as "yours", and protect your little kingdom. It's a computer, not your children.
      The problem is that a lot of times, the buck stops with you and your reputation is on the line when someone else borks something.

      I had a system that was breaking about once a week and I was getting some real heat from the managment to keep it running. It was usually on a Saturday when it failed and sometimes on a Thursday night. I eventually started suspecting that someone was messing with it because there were no logs of anything and none of the usual "something isn't acting right" when it would bork. I even started replacing things that I knew couldn't be the cause of the problems but it was about the only thing I haven't done yet. I wiped and reloaded the system 3 times, each time holding off on all the updates in case one of them was causing the problems. After about a month, I changed the passwords and took an IP camera in and set it by the terminal. Turns out that one of the members of the cleaning crew was on site alone during those nights. He would get the password from the sticky note on the wall of the management's office (why it was there, I will never know) and run a counterstrike/half life server from the server. He would then turn all the services off that he thought nobody needed, half ass his work then pull a laptop out and spend the next 4-6 paid hours playing games over it.

      After this came to light, I found out that another client I had been attempting to get a contract with talked to the managment of this place and got a bad review specifically because of this server having repeated issues that I couldn't fix. After the real problem was known, the client called me up and gave me the contract I was looking for and specifically mentioned that he was worried because of all the trouble I was having with the servers at the other place.

      It isn't just that one time either. I have sites that we totally lock down and reimage the profiles each night so any unapproved changes to the systems is removed at the end of each shift. I find that I am having to look for reasons to show up to those sites and make sure everything it working right. I also have sites where power users are present without any restrictions and I am constantly being called in to fix something. In fact, If I can keep people away from IE and outlook (express), convince them to not install anything not directly related to their work, make sure an up to date anti virus scanner is present, I don't have too many problems outside of hardware failures and stuff outside our control.

      We protect the system like they are our children because our reputations are on the line. In many situations, our reputation determines out pay or potential pay. It stops us from doing productive things when we have to fix over people's mess up's that they attempt to hide so they don't look bad. Even if you can always blame it on someone else, you still end up looking bad because your always blaming someone else.
    76. Re:A simple suggestion by Ctrl+V · · Score: 4, Interesting

      creating views limited to their data is a great, easy solution for limiting rows within the same table.

      looking at it from a longer term perspective, if you think that this ability is something many of your customers would use, you can look in to what oracle calls Virtual Private Database (VPD). VPD allows you to set rules on tables that, on the server, adds a predicate to all SQL ran against that table. Essestially, it forces a WHERE clause of your choosing for all select, insert, update, delete statements.

      if you tie that to a lookup table, say of logged on user's CompanyID#, any statement they send can only ever affect that subset of rows.

      'delete * from orders' from Ted@Acme Inc (ComanyID#=5) would turn into: 'delete * from orders where companyid#=5'

      fun stuff

    77. Re:A simple suggestion by SanityInAnarchy · · Score: 1

      Thinkgeek must not have been using a database which supports boolean fields.

      --
      Don't thank God, thank a doctor!
    78. Re:A simple suggestion by pla · · Score: 0, Flamebait

      Think about it, the data is probably required for the customer's business process.

      Big difference between "we want to query inventory levels every 30 seconds for no good reason" and "we can't look up customer information to complete basic transactions".

      The former (which IMO sounds like basically what the FP has to deal with, micromanaging twits who wouldn't know what to do with the data if they had it) won't bring a business to its knees if you say "no". And The latter?


      So saying 'no' is tantamount to 'you can't run your business', and the customer will become an ex-customer just like that.

      If they can't do business without near-realtime access to that data, they made a damn poor choice in ever letting it out of their control in the first place, and someone (or a few people) need to lose their jobs over ever outsourcing such a vital task.

      Anyway, if you look just a bit beyond the superficial question here, why would the customer want the requested access?

      Simple: Because they already plan to stop using the FP author's services (at least, in his capacity as a custom report writer).


      That's customer service!

      Yes, actually, I'd call it pretty good customer service, once you accept a very important fact - "The customer is not always right". You don't sell guns to kids, you don't sell liquor to those already sloshed, and you don't give anyone raw (even RO) access to systems without a damned good reason. Sure, it sounds harmless on the surface... Until some wannabe DB guru brings the server to its knees. And when that happens, who do you think the customer will blame: The boss' nephew, or "those bastards holding our data hostage"?

      Anyway, in this case, depending on all the contractual details, the customer might not actually "own" their data, so what kind of idiot would give them far more access without charging through the nose for it, and then call it "customer service"?

    79. Re:A simple suggestion by Giant+Electronic+Bra · · Score: 3, Insightful

      Well, at the least you build your counterargument on top of a bunch of assumptions. All we're presented with here by the OP is the technical issue. We know he has a customer, and that the customer has access requirements to a database.

      It might well be reasonable for someone to ask "is this the best way to give them what they want", but I can pretty well see you haven't had to deal with the customer side of a business if your response is going to be "you are an idiot and you cannot have what you ask for".

      I work directly with my customers. I know what kinds of things piss them off. I can almost guarantee you the right thing to do is figure out a way to get them what they want, or at the very least to convince them you can give them something better.

      Truthfully it may not even be necessary to discuss it with the client. Depending on how they're billed or what the business relationship is you might well just give them access to a slave database and they don't even need to know a thing about what the solution was.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    80. Re:A simple suggestion by (H)elix1 · · Score: 1
      And... if this customer is really not dealing with 'enterprizy' sized data, the free as in beer version of Oracle XE is available for Linux (x86) and Windows, which seems very close to the 'standard edition' in terms of functionality.

      If the data can live in this box:

      Oracle Database XE can be installed on any size host machine with any number of CPUs (one database per machine), but XE will store up to 4GB of user data, use up to 1GB of memory, and use one CPU on the host machine.


      You are golden. If they can't, they can probably pony up for another CPU.
    81. Re:A simple suggestion by spuzzzzzzz · · Score: 1

      What we really need is some slashdot troll that goes around awarding UUOC awards.

      --

      Don't you hate meta-sigs?
    82. Re:A simple suggestion by GaryOlson · · Score: 2, Insightful

      Outstanding real examples. And very informative for those who question why system admins/DBAs distrust just about everyone.

      --
      Every mans' island needs an ocean; choose your ocean carefully.
    83. Re:A simple suggestion by pla · · Score: 1

      you build your counterargument on top of a bunch of assumptions

      True enough, and a fair criticism. But the right answer does depend on the specifics of the situation, so at best, we can hypothesize about what that might entail.



      I can pretty well see you haven't had to deal with the customer side of a business if your response is going to be "you are an idiot and you cannot have what you ask for".

      I didn't say I would go that far. I may beleive that, but I have discovered a far, far easier way to make customers (which yes, I do deal directly with them) think a bit harder about what they really need: Give them a price quote for the service. AMAZING how much less they need, than they will demand right up until you put a dollar figure on their whims.

    84. Re:A simple suggestion by Sloppy · · Score: 1

      He probably just likes cats. A lot. Too much. There was recently a story where someone had a pipeline of hundred cats ("cat|cat|cat|cat|cat|etc...") in their /home. I bet the smell was terrible.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    85. Re:A simple suggestion by Anonymous+Brave+Guy · · Score: 3, Insightful

      I don't think there's much doubt about why your typical sysadmin distrusts a lot of people. Whether it's a sensible policy is a different question. What happens when you start distrusting otherwise reasonable people and it hampers their ability to do their job is that those reasonable people will do whatever is necessary to circumvent your protections. Unless you are literally operating in something like a military base or a bank vault, there's always something.

      Or, you could just support the competent people in doing their jobs, and save the distrust for those who earn it.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    86. Re:A simple suggestion by Anonymous Coward · · Score: 0

      This is a crock. As the client, I'm paying you to maintain my data, not be a gatekeeper. If you won't give me access to my data, then I'll take my business somewhere else.

    87. Re:A simple suggestion by v(*_*)vvvv · · Score: 0, Redundant

      Ya. Why give the keys to your house, when you can *copy* it and throw one up accross town. Sync it during off-hours.

      We are working with data here. Copying it is easy. Why spend money adding security to a door they do not need to access.

    88. Re:A simple suggestion by YukiCuss · · Score: 1

      I think we're assuming that we not only have a `clue', but also are on varying gradients of cluelessness. In this case, just about any clue will do, but in other situations we may want the users with a higher calibre of clueity.

    89. Re:A simple suggestion by Anonymous Coward · · Score: 0

      I'd suggest that you allow it, in the UK we have a law stating that we can see any data that relates to your self or your company.

      If you're worried about them seeing other people's data, create a view which performs a where so it only shows their data.

    90. Re:A simple suggestion by magarity · · Score: 2, Insightful

      Depends on your line of business.

    91. Re:A simple suggestion by Anonymous Coward · · Score: 0

      You could accomplish this with a logical standby database. Just replicate the tables you need.

    92. Re:A simple suggestion by Hacksaw · · Score: 2, Insightful

      I don't know that it applies to this situation, but one of the problems of letting random people in a company produce their own queries and the reports thereafter is that one can write a query which looks okay, but actually skews the data to make the report writer (often a mid-level manager) look good.

      So, one reason to refuse direct access is reporting integrity.

      --

      All the technology in the world won't hide your lack of vision, talent, or understanding.

    93. Re:A simple suggestion by 9InchRails · · Score: 1

      Wrong! They're not computers, they're my flock.

    94. Re:A simple suggestion by Anonymous Coward · · Score: 0

      Anyone who thinks schema is worth nothing must be a shit schema developer. I would give away a million lines of PHP before I gave away my ERD's and stored procedures.

    95. Re:A simple suggestion by tacocat · · Score: 1

      Two options exist:

      Give them a replicated copy of the database.

      Have them submit SQL through a web interface and before anything runs, you have to pass an explain plan with a cost under X and a total bytes read under Y.

      And limit their user_resources accordingly.

      The point is, you can give them some access, but they probably won't like how it operates because of these limitations. I've been that kind of customer to my DBA's for about 6 years now. My solution has been to run only damn fine SQL. Every single time they have reviewed my SQL they have come back with a comment that they can't do it any better. After 20-30 cycles, they don't ask anymore.

      But first I had to prove them I could do it without blowing up anything.

    96. Re:A simple suggestion by afidel · · Score: 2, Interesting

      A well setup database CAN'T be brought down by any type of query, especially when you know ahead of time they might by running bad SQL. In Oracle you can rate limit I/O, cpu, temp, etc per user so just put in reasonable limits to what their user ID can do and put them in the lowest priority queue for each resource and unless your own work is already pushing your database server to its limit then they shouldn't be able to really affect production. We have run into this issue in our own environment where we have about 10% of our user base who have an Excel plugin that allows them to do completely unstructured queries, the user that they proxy through is simply thrown into the lowest priority queue and so while they might use 40% CPU if the box is idle they get almost nothing if it is hammered.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    97. Re:A simple suggestion by tom's+a-cold · · Score: 1

      What you can do is to create a replicated database where they can execute their queries and do their mistakes.
      I'm not entirely sure what they're using the DB for right now, but it it's anything transactional then this is the only sensible choice. And I like the idea of having a "dev" reporting server where they can try out their lame-ass SQL skills before promoting to the production reporting server. And as added value, you can denormalize a bit on the reporting server to make their lives easier.

      Might also be a good idea to start looking for other customers, these sound like a pain in the ass.

      --
      Get your teeth into a small slice: the cake of liberty
    98. Re:A simple suggestion by swabeui · · Score: 1

      To build on this a bit, companies usually have a breaking point on how much they are willing to spend on special projects. If no/excuses is not your style, billing them is a good alternate.

      In managing our software team, I get frequent requests for special features that, on paper, are not bad. Giving the customer excuses on why our schedule is more important than their feature never ends well. Instead, I give the customer a quote for every second of time it would take (at overtime rates as not to impact our own schedule). It is funny how fast the request goes away while maintaining the position you are doing all you can to accommodate them.

      At worst, if the customer really wants it, we profit and they get what they need.

    99. Re:A simple suggestion by geekymachoman · · Score: 1

      Whats wrong with asking question ? No matter how you'r good, or maybe you have some solutions and plans already, but asking a "slashdot" where majority of users are some kind of admins/programmers is not a bad thing, since you can learn something every day... Almost every admin has its own style/way of doing stuff. Some are better, some are not that good, but they are all productive, so nothing wrong with asking. Two heads are always smarter then one, no matter what your ego thinks about that.

    100. Re:A simple suggestion by SirSlud · · Score: 1

      Left joins are about the last thing an uneducated user is going to do. Personally, as long as the people accessing the database arn't "programmers" I'd be very comfortable permitting read access even if they could create monster statements that would hose the server.

      The only fucked up, wrong SQL statements I've ever seen came from programmers. And I'm sure you can limit performance usage and grant granular enough access to make it a non issue, even if the customer has some shitty programmer.

      I don't get the thrust of the article. You never need to say no to a client; you say yes, with provisions.

      --
      "Old man yells at systemd"
    101. Re:A simple suggestion by Craig+Ringer · · Score: 1

      How else would you do it?

      "Thou shalt use Hibernate"? Most DBAs hate automatic query generation. Understandably so, as when used by someone who doesn't understand the database it's almost as bad as hand-written queries by the same person.

      If you're faced with people who need database access but do not understand databases then the only sensible thing to do is help them use the existing simple interfaces (stored procs, views, etc) and add new ones if they need them.

    102. Re:A simple suggestion by Awptimus+Prime · · Score: 1

      The majority of users on here aren't admins and programmers they are just geeks. /. has changed over the years, and yes, in the beginning, it was. Now it's a hodge-podge of various types of users, mostly still running Windows and considering themselves 'power users'. It only takes a short time reading posts here to come to this conclusion.

      Regardless, this DBA is:

      a) calling the people that pay his bills stupid in a public forum. Just because he is in charge of the DB, doesn't mean he's smarter or a better person than the people paying for his company's services.

      b) Evidence given to 'a' since this DBA barely qualifies as a junior administrator if he doesn't understand the control measures in his DB to keep things from getting wonky if a user happens to type a bad query.

    103. Re:A simple suggestion by Anonymous Coward · · Score: 0

      Glad you managed to keep the password secure :/

      I wouldn't have "then given you the contract" if I'd heard the _Whole_ story...

      Would you?

    104. Re:A simple suggestion by ashley77 · · Score: 1

      Like I tell all my customers. Anything is possible if you're prepared to pay the premium.

      If you've looked at a middle to high end business intelligence reporting server this can give equivalent ad-hoc reporting access without directly accessing the backend database. You may need to explain to all stakeholders that you need a form of middleware to manage what data is seen by users of various levels of permission.

      One that springs to mind is JasperSoft's Jasper Server (http://www.jaspersoft.com), which I have seen their commercial version can offer Ad Hoc reporting via a nice Web 2.0/drag-drop interface.

      I'm sure other Business Intelligence tools can do the same - JasperSoft is just one that I know and use.

    105. Re:A simple suggestion by Anonymous Coward · · Score: 0

      You never say "No" - no shows that you are not a thinker, that you are obstrutive.

      I am not a DBA, but I'm going to make some suggestions

      Why are they asking? From the little you've said I think their throught process is this "We need X custom SQL, their DBA does it by having full read access to the data, we want full read access."

      So really, maybe what they actually want is "To be able to create custom SQL on live data without having to wait" Does that mean that they "need" read access to the live server?

      So, the solution could be - "New server that repicates from the main server in real time/x minutes, x hours"

      But, do we have others data, that they could be able to see?

      Well, do we now make a third database, that provides views into the replicated database.

      After you've gone through all the options you then give them to management with Negatives/Positives for each.

      Benefits!

      1) You are seen as the solutions man
      2) You may have created a new revenue stream for your company - how may other clients would like the same!
      3) The customer doesn't take his ball elsewhere.
      4) The customer recommends your company to others.
      5) see 1

    106. Re:A simple suggestion by owlstead · · Score: 1

      If the schema's would be a problem you could write your own deamon to update the customers (simplified) database. Although due to testing and timing issues and such, this might be infinitely more difficult than entering a standardized Oracle command.

      But I'm wondering if people that use the database on regular basis wouldn't be able to guess the schema's no matter what. IMHO, most database schema's are pretty easy to guess looking at a screen with an interface to the DB. Then again, I'm not experienced in using very complicated databases.

    107. Re:A simple suggestion by Vellmont · · Score: 1


      The problem is that a lot of times, the buck stops with you and your reputation is on the line when someone else borks something.

      I agree. But my point is that Sysadmins often will just want to say NO ACCESS NO ACCESS!! without considering any alternatives. This case is a good example of that.

      In the "client wants SQL access" case, the sysadmin immediately has the "NO WAY!" reaction, and doesn't consider any alternative, and the larger business picture. Obviously you don't want to compromise the systems (and thus the business), but you also want to address the customers desires. It's good to take responsibility for the systems. Just don't think the ONLY way to protect a system is to lock it down.

      --
      AccountKiller
    108. Re:A simple suggestion by SirGeek · · Score: 1

      Just say no and hope that it sticks. Seriously. I find that so many people in the workforce noadays don't know how to say that simple word. No.

      Are you for real ? Management doesn't know that word when it comes to customers.

      Sometimes its hard to make a case for it if management at your company thinks that you are being unreasonable. However if you are a reasonable person and skilled in your profession, management should trust you to do your job. I'm of the opinion that if management can't trust employees in their area of expertise and to give good advice, then it is not a good place to work. My first tech job became this way, the new management that came along had a distrust of us and it made everything sour. Anyways, that's getting away from your question.

      Reason doesn't apply to mangagement, didn't you know that ? And before you say that, I'm almost 41 and have been an IT professional for 20+ years.

      But being a sysadmin, I think you have to stand up for your opinion when the time is right to do so. People who aren't in the know always have requests like this to grant more access, make things easier, keep the customer's demands first. Its your job to draw a line in the sand that says you can't go past that point. Some people don't like that, but honestly it doesn't matter. Rules are there for a reason. They are guides to providing good service for all customers, not just one.

      If you are lucky and do have semi-clued in mangement. Explain that there is the potential for the one customer who is analizing your data to figure out things (or SELL that data to someone else) that could allow them to perform your company's job better than you). That is something they "might" understand.

    109. Re:A simple suggestion by Kreigaffe · · Score: 3, Insightful

      Except in the business world, NOT assuming your paying client is a complete fucking idiot is a big mistake.

      Most people are complete fucking idiots. And frighteningly, many of them THINK they know what they're doing.. and if you go ahead and let them, and they fuck things up, they'll tend to fall back on the one thing they ARE good at.

      Blaming someone else.

      (and if they're management, that's about the time you're forced to promote them so they have less opportunity to create huge fuckups)

      --
      ... still waiting for this free-as-in-beer free beer I keep hearing about. :|
    110. Re:A simple suggestion by jdray · · Score: 3, Insightful

      How else would you do it? Create a replicated reporting database that the users can tie up with poorly-written SQL all they want?
      --
      The Spoon
      Updated 6/28/2011
    111. Re:A simple suggestion by Giant+Electronic+Bra · · Score: 1

      Yeah. Fair enough, lol. I agree with you customers often ask for X and really need Y, or would be better served by having Y. You do have to be pretty careful though. It is one thing to project the aura of 'we are super confident and can always get the job done' and another to project the 'we are wise and you know nothing' aura.

      Exactly how to deal with an individual customer is a matter of knowing the customer. Some of mine are quite sophisticated and they'll tell you exactly what they need, and amazingly they're right most of the time. Or at least they aren't asking for something idiotic. So you can usually tell them exactly what the score is like 'OK, you want database access, here's why I'd rather do it this way.'

      Some are mostly ignorant of technical issues and often ask for random things when they need something. There are a few ways to handle them depending on their personalities. Some you can just give something that works and they don't need to know what they've gotten, it just does what they need. Others you can sell on 'this is a better way for you.' etc. You do have to be careful though. If you don't find out exactly what the client is asking for and why he may not get what he needs. Then he may feel cheated, etc.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    112. Re:A simple suggestion by fedos · · Score: 1

      But you -should- be able to get your credit report 1000 times a day: it's your data.

    113. Re:A simple suggestion by sumdumass · · Score: 1

      I agree. But my point is that Sysadmins often will just want to say NO ACCESS NO ACCESS!! without considering any alternatives. This case is a good example of that.

      Lol.. No, This isn't a good example of that. First, there are certain truths in IT that you need to follow. One of them is the guy you just met in the Chat room that is wanting to help you if you give them root access, is likely going to help more then just you if you don't change the root password after the session. Another is that you don't mess around in a working, production system for the sake of doing it. Especially in an oracle database that is part of your companies bread and butter. You write the code, review it, have someone else who is competent review it then run it. Sometimes you skip a few steps when you know what your doing and the company has enough confidence in your abilities. Why, because you can crash the system making it no good to anyone, you can tax the load so heavily that you have effectively constructed a denial of service to others needing access to it, or finally, no matter what the permissions set or roles are, you can expose confidential or somehow otherwise protected information. So no, you don't give someone outside of your control direct access to the system just because they think it is a good idea or reasonable. You just don't do it. Almost all Sys admins have learned this the hard way either with a minor DB implementation of something more powerful and more depended upon.

      I'm willing to bet that what you consider reasonable is something that is either not reasonable, cost prohibitive, dangerous to the data, unnecessary, and that your not the first person to ask about it. In fact, the no access is probably a rule from the last time someone thought of a good idea and borked things. Experoence is usually a pretty efficient teacher. If you need something and can write the code, write it, submit it to an admin or the managment and ask if they can run it giving you the results. Note, you still have no access but the admins have the ability to make sure it doesn't blow pig brains all over the wall, rape your job, and take your wife out to dinner instead of faithfully doing the tasks it was designed to do. In other words, there are ways to get what you need without having unfettered access if you can demonstrate the need is there. Chances are that whatever your wanting to do can be put into an existing program your using and the admins don't have to worry about you doing something wrong because your in a hurry, pissed off at the managment, or attempting to crash the system to hide the fact that your project is behind.

      In the "client wants SQL access" case, the sysadmin immediately has the "NO WAY!" reaction, and doesn't consider any alternative, and the larger business picture. Obviously you don't want to compromise the systems (and thus the business), but you also want to address the customers desires. It's good to take responsibility for the systems. Just don't think the ONLY way to protect a system is to lock it down.

      The no way reaction is because there are certain things that you just don't do. It's like creating a publicly exposed website to store all your company passwords and expecting to protect it with a .htaccess file. If you know anything about your job, you just don't do it unless some manager makes you or there is no other way. It would be a different story if they were internal and you have approved of their skill levels and all but you simply don't have that option or ability when a third party gets access. What happens if they hire some VB programmer who has experience querying a MS access DB or just out of their "your going to make a bunch of money" school and they tell him to write something for this. What happens when the inexperienced programmer overloads the system and locks others out, it fails to update properly and the regular admins have to fix it? Who is at fault when a disgruntled employ

    114. Re:A simple suggestion by v(*_*)vvvv · · Score: 1

      Since when were analogies redundant.

    115. Re:A simple suggestion by sumdumass · · Score: 1

      I don't care who you are, you can't keep the passwords a secrete from the person who owns the machines. They pay you to work for "them" on "their" equipment. It is that simple.

      Now, when I set up a machine, there is a file with the passwords, machines specs and all placed in a folder in which the customer is given. What the owner does with it is up to them but they are given instructions to keep it safe and all. We had a vendor get access to the machines when attempting to trouble shoot the problems. The password was changed and the file containing it had been changed. The sticky note was dome by the managment of the company that owned the machines. I have no ability to inspect their offices just as I couldn't goto your home and look to see if the you wrote the passwords down somewhere and took it home. I mean get real, the problem turned out to be a trust issue with an employee who had more access then they should of had.

      You can't seriously be suggesting that you can locked the owners of the machine out by not even giving them the passwords. I suspect that is why you posted AC. The owner has every right to replace you without having to break any passwords or begging you for them. This could happen because your not doing your job correctly, internal politics and budgeting, or even if something happens to you and you cannot perform the service anymore. Most sane people understand this.

    116. Re:A simple suggestion by Golthar · · Score: 1

      Wow, you should send this story in to the TheDailyWtF.com

    117. Re:A simple suggestion by plague3106 · · Score: 1

      That only shows you're incompetent for not setting their security rights and timeouts appropriately.

    118. Re:A simple suggestion by Anonymous Coward · · Score: 0

      since it only effects them

      "affects".

    119. Re:A simple suggestion by Anonymous Coward · · Score: 0

      If you won't give me access to my data, then I'll take my business somewhere else.
      Just without your data *snicker*
  2. Reporting Database by WreckDiver · · Score: 5, Insightful

    The last thing you want is users writing ad-hoc queries against your live data. Replicate the data to a reporting database and let them abuse that.

    1. Re:Reporting Database by hellsDisciple · · Score: 3, Interesting

      Presumably apart from server load it wouldn't be a big deal assuming the users are working on a read-only login?

    2. Re:Reporting Database by djones101 · · Score: 3, Interesting

      Exactly like WreckDiver said. Create a data warehouse that is populated on a regular basis (nightly seems a good idea), and let them touch the warehouse only. Keeps their paws off of your live database, and keeps your security in place, while giving them what they requested (just in a modified form).

    3. Re:Reporting Database by Anonymous Coward · · Score: 0

      Exactly.

      Sell them on the "Data Mart" idea. A good buzzword will help them accept the proposal.

      Promise them read-only access to the Data Mart, which will sync up with your transactional DB every n hours/days/weeks, etc.

    4. Re:Reporting Database by getto+man+d · · Score: 1

      Right. An account without any write-access and a quick script that will take their shell history log and pipe it to you should do the trick. Try something first, limiting absolutely everything you think is critical, but if this fails then you may have to deny them. Hope this helps and good luck.

    5. Re:Reporting Database by Bryansix · · Score: 1

      Eaxctly. This is what they teach in beginning database classes in college. Always use a data warehouse for data mining that is separate from the live database and never writes back to the live database.

    6. Re:Reporting Database by The+Blue+Meanie · · Score: 1

      Another vote for this one. Replicate the database and give them R/O access to the replicated DB. They can't overload the primary database, and if they manage to screw it up (shouldn't happen with R/O, but you never know), you can just refresh from the master.

      --
      "I feel that if a person can't communicate, the very least he can do is to shut up." -- Tom Lehrer
    7. Re:Reporting Database by Builder · · Score: 4, Informative

      Actually, it can be a huge deal - badly written read queries can bring a database to its knees, slowing it down for the critical business writes.

    8. Re:Reporting Database by CharlieHedlin · · Score: 3, Insightful

      Read Only access can still create locks. I haven't worked with Oracle enough (I assume it is MUCH better), but a simple read query can bring our MS Sql database to a grinding halt if it touches tables that are actively updated.

    9. Re:Reporting Database by notorious+ninja · · Score: 1

      This is the best solution. Since there's no good reason not to give them access (other than cost?), querying a replication db should be fine. It's not going to mess up your data.

    10. Re:Reporting Database by jedidiah · · Score: 5, Informative

      ...although this is pretty trivial to avoid in Oracle. You just need to make sure
      that the adhoc query account has limited access and limited resource priveleges.
      However, the customer is bound to complain when Oracle will refuse to run their
      heinous query.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    11. Re:Reporting Database by samwhite_y · · Score: 4, Interesting

      I would second this notion. This is the classic way to solve this problem. Modern databases provide many mechanisms to periodically push over changes to another cloned copy of the database. The advantage of doing this is you can do interesting things to the cloned data that you would be unwilling to do to a live database. For example, you can create temporary reports that get stored in another temporary database table and which in turn allow other reports to be created from this derived table. Oracle lets you do this pretty easily by creating "views". There is a whole industry built around this approach called "data cubing" with specialized tools to let you construct more involved data mining types of queries based on massaging the data in interesting ways.

    12. Re:Reporting Database by sdeering · · Score: 1

      Right, replication is the way to go. Second issue.. make sure they can't see any data they shouldn't, perhaps you have more than one customer in that database.. You may need to put filters on your repl to ensure this.

    13. Re:Reporting Database by Musrum · · Score: 5, Interesting

      Oracle has a different concurrency model to older versions of MS-SQL. There are no read locks.

      --
      In Soviet Amerika the ballot boxes YOU!
    14. Re:Reporting Database by Anonymous Coward · · Score: 0, Insightful

      You are correct. Oracle is MUCH better than MS SQL.

    15. Re:Reporting Database by Anonymous Coward · · Score: 0

      Um. You need a reason for a NO. You need to justify it. Create a query that does just that. Bring the database to its knees. Then tell them, its best if they run their own server. Actually had a client buy a box, and start to set it up. Got to the part about liscensing the entiprise version of Oracle, which when they did the math, almost doubled the expenses. So, they shut up, and never asked again. About two years after that, we had migrated almost all of it to a MySQL server, except for some critical accounting aspects. They wanted to run ad-hoc queries, on both databases. well, we could prevent the MySQL stuff from causing havoc, but it came down to the Oracle accounting, and again, they priced it out, and found it prohibitly expensive. ( We even told them, we would source them an OracleDBA...for $190/Hr. Again... murmer...click click click.. Umm.. better to have us handle it, ( and cheaper ). Funny how people follow that carrot.

    16. Re:Reporting Database by doon · · Score: 1

      select .... with no lock ?

      --
      To E-mail me, replace the first period in my domain with an @
    17. Re:Reporting Database by nova.alpha · · Score: 1, Interesting

      Some privilege escalation exploits require "just" a read-only login to server, and who knows what kind of vulnerability would black-hat guys discover tomorrow? So I'd recommend author to say NO to his customers.

    18. Re:Reporting Database by hackstraw · · Score: 5, Funny

      Oracle has a different concurrency model to older versions of MS-SQL. There are no read locks.

      You just violated the MS-SQL license.

    19. Re:Reporting Database by Anonymous Coward · · Score: 5, Informative

      That kind of locking issues does not happen in Oracle due to its multi-version concurrency control strategy and locking implementation. MS SQL place locks on every row a SQL statement touches for the duration of that particular statement in order to prevent changes to those rows while the statement is running. Oracle avoid this by making "backups" (rollback/undo) of any changed rows and reads from those backups instead if needed. Locks are still used but they don't block writers. Also, MS SQL uses a "lock manager" process which keeps track of every lock in the entire database. Statements and transactions touching many rows will therfore cause the lock manager to allocate a lot of memory in order to keep track of all locks. Then it uses lock escalation techniques, i.e. changing the granularity of the locks so fewer locks are used at the expense of larger locked areas, to keep the memory usage down. Oracle does not have a lock manager (except when dealing with distributed transactions and two phase commits (2PC) across multiple databases. Oracle store the lock information in the header of the rows themselves.

    20. Re:Reporting Database by DamnStupidElf · · Score: 1

      select .... with no lock ?

      MVCC

    21. Re:Reporting Database by kiehlster · · Score: 1

      I'd definitely agree with this concept. Even as a system admin, you can accidentally bring a production database to its knees with a select query. Giving that power to end-users will more than triple potential downtime.

      Complete or partial replication is the simplest solution, but it may cost you extra money if you're setting up a second server for that purpose. Consider a data export. If they want to run queries on raw data, make a sql dump, an excel spreadsheet, an access database (I assume these customers may be Windows users) or some other format that would allow them to query the data on their own terms. Just make sure they're not dumping the database every 5 minutes and your production server will be sitting happy.

      If they absolutely without a doubt need live access, think about making a middle-man daemon to pre-parse queries or that accepts a custom query language that will prevent them from hosing the server.

    22. Re:Reporting Database by glop · · Score: 1

      This is so funny. I can't believe I had moderation points just yesterday and I did not even use them.
      And now I wish I could moderate this post funny.

      Well, let's hope somebody will do it!

    23. Re:Reporting Database by marxmarv · · Score: 1

      http://en.wikipedia.org/wiki/Isolation_(computer_science)

      So the customer must, as a condition of getting this access, run all queries with READ COMMITTED or READ UNCOMMITTED isolation level -- or, as many have suggested, replicate and let 'em do their worst to their own reserved box.

      --
      /. -- the Free Republic of technology.
    24. Re:Reporting Database by Builder · · Score: 1

      At which the original poster wouldn't really have provided the access he was supposed to :D

    25. Re:Reporting Database by jedidiah · · Score: 1

      Ah no...

      Timesharing systems in general don't come with the expectations that you can run amok and take over the whole system.

      RDBMS products have been traditionally pisspoor at enforcing the same sorts of
      limitations you might see in VMS and Unix. That doesn't mean that the free ride
      for abusive end users should continue in perpetuity.

      --
      A Pirate and a Puritan look the same on a balance sheet.
  3. Why? by iElucidate · · Score: 5, Insightful

    You don't want them "pawing" through your database, but you don't give any reasons why that is a bad idea. If you can't come up with any, you're not going to get very far in your argument. If it is a read-only view of only the data they should be able to see, what is the harm?

    No, seriously. Answer that question, and you have a basis for your argument. If you don't have an answer besides "it makes me feel dirty," you've lost.

    1. Re:Why? by Bill,+Shooter+of+Bul · · Score: 4, Interesting

      So can any Slashdotters assist me in building my case to restrict access?
      I think he was asking us to help him flesh out his argument, ie give him some reasons to back up his intuition. Well intentioned or not, your response is like telling someone who's asking for directions that they are lost.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    2. Re:Why? by ZeroConcept · · Score: 5, Informative

      1) Who is responsible to change the customer queries when the schema changes and their reports no longer work?
      2) Who is liable if the customer queries affect the performance of other processes/services (lack of index usage, expensive queries, etc)?

    3. Re:Why? by Culture20 · · Score: 2, Informative

      The worst thing you can do with your first "no" is provide a reason. Then they will focus on this reason until they find a chink in your armor, and you'll come up with another reason and they'll get angry.

      First, just say "no".
      Only if they demand an answer, give them as many reasonable reasons as you can think of, all at once, saying "no external connections; security policy" (only if true; and it should be... just because your DB has passwords doesn't mean it doesn't have vulnerabilities) and/or "potentially random queries against the production database can degrade performance" (again, only if true). Both are strong enough but vague enough that the client should be quiet about it.
      Always attempt to couch reasons as near to what the client wants as possible. They want their DB safe from prying eyes, they want their website to run well. Try not to say something like "for the security of our servers" unless you put it at the bottom of the list because they don't care about that, and if they're like most clients, they won't grasp that (yourserver.owned == theirdata.compromised)
      If they're still persistent, get another job; sounds like your management doesn't have a backbone

    4. Re:Why? by stoolpigeon · · Score: 1

      I would think that the primary concern would be the mode of access. A database should sit behind multiple levels of security. Can a secure connection be built between the client and the db? If not - then there is a problem.
       
      If they can access the database securely - then Oracle provides all the functionality necessary to ensure that they can't do any damage.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    5. Re:Why? by maxume · · Score: 1

      If you are in Miami and someone asks you for directions to Tokyo, telling them they are lost is probably a good place to start.

      I'm not saying that this is the case here...

      --
      Nerd rage is the funniest rage.
    6. Re:Why? by Anonymous Coward · · Score: 0

      No, seriously. Not a very productive comment. You shouldn't assume you know more than the person asking the question by replying with a condescending answer.

    7. Re:Why? by Oligonicella · · Score: 1

      Not really. All he's said so far is "my heart sinks at the thought". There's nothing there to flesh out. What are his basic reasons is not an untoward question to ask.

    8. Re:Why? by vanyel · · Score: 4, Insightful

      It may very well be that the original question was a well intentioned response to a gut feel about the resource usage issues, but it comes across as a BOFH "it's mine and you just stay away!", like the "gut feel response" is "NO! now what was the question?". I much prefer "I can, but this is what will happen", or in this case, "A customer wants read only access to a database; I'm nervous about this, but not sure what actual harm they could cause" as opposed to "I don't want to give them access, give me some reasons why I can say no". There is a big difference between the two.

    9. Re:Why? by DuckDodgers · · Score: 1

      select survey_taker.last_name,
      survey_taker.first_name,
      survey_taker.dob,
      survey.survey_name,
      ans1.val as "val1",
      ans2.val as "val2",
      ...
      ans143.val as "val143"
      from survey_taker
      left join survey_event on survey_taker.id = survey_event.survey_taker_id
      left join survey on survey_event.survey_id = survey.id
      left join answer ans1 on ans1.survey_event_id = survey_event.survey_event_id and ans1.question_code = 'ques1'
      left join answer ans2 on ans2.survey_event_id = survey_event.survey_event_id and ans2.question_code = 'ques2'
      ...
      left join answer ans143 on ans2.survey_event_id = survey_event.survey_event_id and ans143.question_code = 'ques143'
      Order by....

      That was an almost word for word first stab at SQL for me as a database newbie. I tested it against a relatively small copy of our database, and it ate half the processing power and 100% of the disk IO on our test server for an hour and a half before spitting out the results I wanted. If you ran that or something like it on a production server, system performance will slow to a crawl. Picture needing 5 minutes to add an item to your cart at an online store, or similar.

      cyteen02 is probably quite happy to give these people access to his data. But access on a production server, by people not very good at minimizing the impact of their queries, is dangerous. I wholeheartedly agree with everyone who recommends that he give the client access to a second copy of the database running on a separate server, or use a tool (like the one in Oracle) to limit their slice of the CPU and disk access.

      P.S. Instead of the query above, I figured out how to dump the three tables to text files and use Gnu sort, sed, and regular expressions in Perl to give me the data I wanted in CSV files. Whole process takes less than 10 minutes for 350 MB of answers on antique hardware.

    10. Re:Why? by orzetto · · Score: 0, Redundant

      I am (not the only) responsible for a database-driven Web site for KDE translators to Italian. We use the database to keep track of statistics and generate some meaningful numbers such as what has a certain translator to do and how much work is left to the next release.

      According to my experience, read-only access cannot trash the data, but can trash the server. Once I tested a non-trivial query, and it seemed it would take forever to complete. So I Ctrl-C'ed and went away. Next thing I know, the admin contacts me a few hours later and tells me that the query was still running and brought the server (which is very graciously hosted by the Pisan LUG) to a halt. I would guess this is the main problem the original poster was thinking of.

      --
      Victims of 9/11: <3000. Traffic in the US: >30,000/y
    11. Re:Why? by Lord+Apathy · · Score: 1

      I'm against just saying "no." I'm more in favor of not saying no but just quoting them a price that no one in their right mind would pay.

      --

      Supporting World Peace Through Nuclear Pacification

    12. Re:Why? by amRadioHed · · Score: 1

      Giving them directions to MIA would probably be a better place to start.

      --
      We hope your rules and wisdom choke you / Now we are one in everlasting peace
    13. Re:Why? by moderatorrater · · Score: 1

      Well intentioned or not, your response is like telling someone who's asking for directions that they are lost It's more like telling them that you need to know where they're going.
    14. Re:Why? by geekoid · · Score: 1

      No, you say know and give them the longest possible list of reasons. Overwhelm them.

      If they still want it and you can't get backing from your boss, leave^H^H^H^H^H be sure they know that are liable.

      When you say "no" the very next thing out of their mouth is "Why not?" You had better have some reason waiting.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    15. Re:Why? by maxume · · Score: 1

      That depends a great deal on whether they think they are in Japan or not.

      --
      Nerd rage is the funniest rage.
    16. Re:Why? by Belial6 · · Score: 1

      Just make sure that the crazy price can actually make you money if they still say yes. I have seen obscene amounts of money spent on projects that had no hope of succeeding. Of course simply replicating to a system that they can safely destroy makes it pretty easy to make the crazy price profitable.

    17. Re:Why? by Lord+Apathy · · Score: 1

      Oh yeah, make sure of that. I've quoted some people offensive prices on some shit only to have them not even bat an eye and accept it. Found out what is worth to them then triple it. Then tack on another 500% just even thinking about it +20% just because you might have to do something.

      --

      Supporting World Peace Through Nuclear Pacification

    18. Re:Why? by Anonymous Coward · · Score: 0

      Well said, and I'd add that if you don't have an answer besides "it makes me feel dirty", you DESERVE to lose, too - that's just unnecessary BOFHery.

    19. Re:Why? by Unordained · · Score: 4, Insightful

      3) Who is responsible when they make decisions based on the results of queries that were incorrectly written, because they had an incomplete understanding of the tables?

      You currently have a choke point where you can make sure this is well-defined: up-front before they use canned reports, or ad-hoc when they request new ones; when they start writing their own, it needs to be clear that they're on their own, and that they should *probably* at least ask for help along the way to make sure they get what they want (get the right answer), and that what they want makes sense for what they need (ask the right question), and that they understand the limitations of the data (missing data, small sample sizes, small list of codes, known-dirty data...)

    20. Re:Why? by Anonymous Coward · · Score: 2, Insightful

      Well intentioned or not, your response is like telling someone who's asking for directions that they are lost. I disagree. Grandparent post made an excellent point, which was more like finding someone who is asking for directions and suggesting a better destination.

      The original poster is asking us to dream up business reasons to justify his emotional preferences. Sure, there will be costs and problems associated with opening up database access, but there may also be significant benefits to his company. He shouldn't be asking for help building a case against open access. He should be asking for help understanding both sides of the equation.

      If impartial judgment really shows that the disadvantages outweigh the advantages then he needs to be prepared to make that case without letting his emotional issues clutter the discussion. If it looks like he's whining, he may lose, even if he is right.

    21. Re:Why? by Anonymous Coward · · Score: 0

      Because one select query that is poorly formed, or utilizing improper structures (such as searching for strings in a numeric field and then comparing that value to another field) causes Oracle to freak out, a lot. It's pretty obvious what the main problem is, but explaining to managers that you cannot account for the unknown or saying you don't get paid enough to deal with that responsibility aren't acceptable options, which is why he's here. Wow. You lost.

    22. Re:Why? by rosn8or · · Score: 1

      You don't want them "pawing" through your database, but you don't give any reasons why that is a bad idea. If you can't come up with any, you're not going to get very far in your argument. If it is a read-only view of only the data they should be able to see, what is the harm?

      No, seriously. Answer that question, and you have a basis for your argument. If you don't have an answer besides "it makes me feel dirty," you've lost. You have asked the essential questions. kudos!
    23. Re:Why? by Aladrin · · Score: 1

      You can't give directions to someone that doesn't know where they are going. It's like he said 'I want to go to a restaurant' but refused to give you any further information. You can tell him about the area restaurants until you're blue in the face without any guarantee you'll talk about one that he'll like.

      If he doesn't know what's wrong with giving access to the database, he -is- lost. He's looking for logic to back up his gut feeling.

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    24. Re:Why? by jeremyp · · Score: 1

      Absolutely the wrong thing to do. If you give them a huge list of reasons, they'll know you are doing it just to spite them.

      You just need one really good reason and some sort of reasonable alternative.

      e.g.

      "Sorry I can't do that Dave, it would put us in breach of the Data Protection Act with respect to our other customers. How about we give you a daily dump of your part of the database (or replicate it, or provide a set of views).

      If you can't think of a one really good reason why your customer shouldn't be allowed read only access to your database, why are you even contemplating saying no?

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    25. Re:Why? by fm6 · · Score: 1

      How can we help him flesh out his argument when he hasn't got one? "His intuition" is not an argument, and it's not at all obvious why giving somebody read-only access to a database is going to cause problems.

    26. Re:Why? by fm6 · · Score: 1

      The worst thing you can do with your first "no" is provide a reason. Then they will focus on this reason until they find a chink in your armor, and you'll come up with another reason and they'll get angry.

      First, just say "no".
      Only if they demand an answer, And precisely why would they not demand an answer? Do you really expect the customer to say, "Oh well, he must know what he's doing, never mind." Nobody responds that way to a blank refusal, this side of Stalinist Russia. All you've done is antagonized the customer, and you still have to provide the explanation.

      If you think it's an imposition to explain why you're imposing a policy on somebody, then maybe you need to be forced to come up with an explanation. If your policies don't stand up under critical examination, they need to change.
  4. You seem to be the problem by etymxris · · Score: 5, Insightful

    How are they going to mess up your database with read-only access? They could run intensive queries, I guess. But unless you've got million+ row tables that are being accessed concurrently by tens of clients, this shouldn't be much of a problem.

    Anyway, just enable logging and look through what they've been doing in case it's anything stupid. I used to work for a large insurance firm and we'd get a call minutes after doing against the database we shouldn't.

    1. Re:You seem to be the problem by kalirion · · Score: 2, Interesting

      Depends on the query. The right (or wrong) query could take hours to execute on a few hundred row tables.

    2. Re:You seem to be the problem by recoiledsnake · · Score: 5, Interesting

      How are they going to mess up your database with read-only access? They could run intensive queries, I guess. But unless you've got million+ row tables that are being accessed concurrently by tens of clients, this shouldn't be much of a problem. Anyway, just enable logging and look through what they've been doing in case it's anything stupid. I used to work for a large insurance firm and we'd get a call minutes after doing against the database we shouldn't. I think the only problem would be that changes to improve the schema design would be more difficult to make because there would be pressure from the client not to break their existing adhoc queries that they already wrote and now run for new data.
      --
      This space for rent.
    3. Re:You seem to be the problem by Rob+the+Bold · · Score: 1

      How are they going to mess up your database with read-only access? They could run intensive queries, I guess. But unless you've got million+ row tables that are being accessed concurrently by tens of clients, this shouldn't be much of a problem.
      I think a real problem, assuming you can limit their resource usage, is that you're going to have to support them. You may not have your entire DB documented well enough that "amateurs", dabblers and dilettantes will be able to use it without your help. Now you've gotta do your job and theirs. So I suppose you should calculate how much a help desk for this new functionality will cost your company, so they know how much extra to charge the customer.
      --
      I am not a crackpot.
    4. Re:You seem to be the problem by UnknowingFool · · Score: 1
      1. Even with read-only access they can screw up a database. Most of the users will just grab all the data first then do their data manipulation later in Excel. So their first query is "select * from table".
      2. Assuming that performance and security are solved, another factor is confidentiality. The DBA is most likely sending the customer data that only pertains to them. If you grant them even read-access, you have to devise mechanisms to prevent one customer from seeing other customer's data.

      Depending on the budget, the company might look at some sort of reporting tool that handles all these things. A number of business intelligence packages like Crystal Reports, Business Objects, Cognos, Microstrategy, Hyperion, etc. The downside is administration, complexity, and cost.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    5. Re:You seem to be the problem by moderatorrater · · Score: 1

      They could run intensive queries, I guess. But unless you've got million+ row tables that are being accessed concurrently by tens of clients, this shouldn't be much of a problem. Intensive queries using non-indexed columns joining three large tables (and million+ row tables weren't uncommon at some relatively small places I've worked at) would absolutely kill performance, especially if they're not careful to avoid locks, and who knows whether they're using a qualified developer or their son's friend who knows about comptuers. Add in the security issues and it's very reasonable to not want people going through the database. Depending on the data kept in the database, it could open up legal risks to let the customer into the database.
    6. Re:You seem to be the problem by PotatoFarmer · · Score: 1

      That's a(nother) good reason to push from your transactional database into a data warehouse for this sort of thing. Not only do you relieve your main database of the reporting load, but you can put the data into structures better suited for reports. Underlying transactional schema changes wouldn't be visible to the customer, and could be introduced into the data warehouse in a controlled manner that doesn't break existing queries.

      Reporting tools like Birt already do this at a level removed from the database via abstracted metamodels. No reason not to take care of it in the schema as well.

    7. Re:You seem to be the problem by Anonymous Coward · · Score: 0

      In Oracle, you can't do "dirty-reads" which means that any query your user does will use UNDO tablespace in order enforce a consistent read whenever they are reading while you are updating the data.

      This can cause a significant amount of storage space growth on your side, in addition to resource usage. If they do any ORDER BY, DISTINCT (very common with newbie users), etc, they will also use TEMP tablespace like crazy, and if they are really novices, they can use nearly infinite amounts of that.

      You *will* be supporting them if this happens!

  5. Data Protection Act by 91degrees · · Score: 1

    It doesn't matter if there's anything in the act that applies. Just lie. Say that uyour legal advisor is worried about breeaches of the act.

    1. Re:Data Protection Act by Anonymous Coward · · Score: 1, Insightful

      No need to lie. Giving direct access to the information *sets the company up* for such a violation to occur in the future when new tables/columns are added.

      As a DBA, you should express this concern to management IN WRITING as soon as possible, for two reasons:

      1. It's your professional responsibility.

      2. It's your career; cover your ass!

  6. Oracle Seat License by SirLanse · · Score: 3, Interesting

    Do they have a seat license to access the data?
    No discounts.
    You do not answer SQL questions.
    Provide 2yr old data dictionary (just like MS does)

    1. Re:Oracle Seat License by mooingyak · · Score: 1

      Had a similar situation once. We provided the access alongside the condition "if you can't make sense of the data, then you should be using the reports we already wrote."

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
  7. Partial data replication by netsavior · · Score: 5, Insightful

    For the love of science do not give them access to your production database, they WILL screw it up, even with just read access.
    Here is the psudocode from their SQL:
    Select * from everything join everything where non-indexed column like '%'

    you need to make them a COPY of the data that they are allowed to access on a seperate database (preferably a seperate server). Most reasonable replication suites allow you to do things like this.

    1. Re:Partial data replication by iwein · · Score: 1

      That is assuming that there is no reason not to give them access other than the fact that they will slow the database down. Maybe the data itself is valuable to the business case here as well?
      If you don't want to give them the data you should just tell them why: it is your livelihood. Otherwise, a copy would be a good idea...

      --
      Show a man some news, distract him for an hour. Show a man some mod points, distract him for the rest of his life.
    2. Re:Partial data replication by flynn23 · · Score: 1

      Not only that, but you can abstract the schema by using views. This will allow you to make changes to the underlying schema, protect the production database from malformed queries, and keep the schema proprietary. You can then populate the views tables any way that the customer would prefer. Problem solved.

    3. Re:Partial data replication by Anonymous Coward · · Score: 0

      Charge them a penny for every row touched, including intermediate tables.

      Million rows, cross join, &poundl10K Million.

  8. Export it by GWLlosa · · Score: 1

    Have some automated process periodically export the data to a disconnected data source (the exact one is up to you, something like MS Access or an Excel sheet depending on your exact needs) and give the user access to that.

  9. Replication by Anonymous Coward · · Score: 0

    If "No" doesn't work, which is my first choice, could you replicate the database and let them work from that? I would avoid letting them hit the live db at all costs.

  10. my solution by Coraon · · Score: 1

    create a one way mirror of the database, let them access the mirror, that way when they pooch it you can reload...but charge them through the nose to do so, claim is as "you have to recover the data" or some such nonsense.

    --
    -Ours is the wisdom of Solomon, the magic of Merlyn, the fall of Icaris.
    1. Re:my solution by Killjoy_NL · · Score: 1

      Fun part is, it's not even nonsense :)

      --
      This is the sig that says NI (again)
  11. Like Nancy Reagan Used To Spout; "Just Say No". by RCTrucker7 · · Score: 4, Insightful

    How about just a simple "No." The database, while containing data pertitnent to your customer, is still your\your companies property. Simply tell them that access to that level, or in fact any level beyond what is alreayd granted to them as a customer, is for you and\or your employees only. Just because he's a customer, doesn't grant him unfettered access to your company or it's property, whether that property is physical or electronic.

    1. Re:Like Nancy Reagan Used To Spout; "Just Say No". by Anonymous Coward · · Score: 0

      If you said that to me I would hire another processor. Actually if it is their data and they are *paying* you to build the database isn't still their data?

    2. Re:Like Nancy Reagan Used To Spout; "Just Say No". by Champ · · Score: 1

      Exactly: "No. The database contains our confidential and proprietary information."

      End of conversation.

    3. Re:Like Nancy Reagan Used To Spout; "Just Say No". by fm6 · · Score: 1

      Consider the irony of your comments. "Just say no", was NR's contribution to the War on Drugs, which was a disaster in the 80s, and is even more of a disaster now. And the sheer arrogance represented by the "Just say no" is a big reason why.

      Arrogance seems to work in politics (well, these days, not so much), but when you're in business, being arrogant towards your customers is not a good way to grow your business.

  12. Use a read only replica by Giant+Electronic+Bra · · Score: 5, Insightful

    Mirror the database to a 2nd server and provide them read access to that. It has several advantages.

    1) You don't have to worry about them causing problems in the production database.

    2) You can optimize the replica for read access. A read only database can generally perform MANY times better than one that has to be optimized to support read/write and especially if it is highly transactional.

    Granted, it costs you a bit in hardware and setup time, etc. But if you're really nervous about it, then it should do the trick. Given the limited load on the replica and its read only nature it should be able to live on limited hardware, like maybe an older server that you have hanging around. Plus you don't have to worry about reliability either. If the thing blows up no data is lost.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    1. Re:Use a read only replica by mcrbids · · Score: 4, Insightful


      Granted, it costs you a bit in hardware and setup time, etc. But if you're really nervous about it, then it should do the trick. Given the limited load on the replica and its read only nature it should be able to live on limited hardware, like maybe an older server that you have hanging around. Plus you don't have to worry about reliability either. If the thing blows up no data is lost.


      Cost? What cost? Oh, you mean the profit that you'll make from charging the end user for time and "overhead" in setting up the replication?

      That's only a cost to the requesting end user! It's all profit for you!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    2. Re:Use a read only replica by Apache · · Score: 3, Informative

      This is seriously the best option. Just write a detailed quote for set up of the server, OS installation, DB, replication, licenses, SSL tunnels required, and recurring rack space allocation and power costs that will be required.

      They will either decide not to due to costs (you win) or pony up the money (you win again).

      Remember your time is (or at least should be) billable.

    3. Re:Use a read only replica by Anonymous Coward · · Score: 0

      Granted, it costs you a bit in hardware and setup time, etc. Except that of course since the customer's asking for something new, you can charge them extra for it, and use that revenue to offset the cost of the extra server. If they're not prepared to pay for the extra cost, then they probably didn't really want to be able to run their own queries anyway.
    4. Re:Use a read only replica by poot_rootbeer · · Score: 1

      Mirror the database to a 2nd server and provide them read access to that.

      Before doing that, present them with a proposal that itemizes all the costs they'll be responsible for it you do this: $XXXX to purchase the hardware, XX hours at a rate of $XXX/hr to have an admin perform the software install and configuration, ongoing support costs of $XXXX/month, and so on.

      You'll find out how badly they want the level of access they've requested by how much they're willing to spend to have it.

    5. Re:Use a read only replica by dgriff · · Score: 1

      A read only database can generally perform MANY times better than one that has to be optimized to support read/write and especially if it is highly transactional.

      Do you have any references for that? The only thing I could find on a quick Google scan was this which claims that for SQL Server there was only an 8% speedup. The author found it hard to get real empirical data.

    6. Re:Use a read only replica by Giant+Electronic+Bra · · Score: 1

      SQL server... yeah.

      SQL server isn't Oracle. Microsoft would like you believe it is in the same league, but not really. There are all sorts of optimizations you can make with Oracle. Personally I don't maintain large Oracle databases, so it is mostly a general observation, but I have been involved with installations that did stuff along these lines. Also generalizing from other RDBMS products that I do work with every day, you can definitely get quite large improvements in performance on a database which you KNOW has one writer and one or more readers which do large slow queries.

      I admit, it is not possible to quantify that without getting into the details of how the database is structured, size, record types and access patterns, and what sort of replication technology is being used.

      Optimistically though if the data is batched into the replica and you're free to use the most appropriate database for the copy the read performance could be an order of magnitude or more better than querying the master. OTOH it could be you might get fairly minimal speedup in the worst case.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    7. Re:Use a read only replica by fm6 · · Score: 1

      Yes, that's a good answer to the question "how can the vendor best serve the customer?" But that's not the question the guy asked. Which was basically, "how can I tell the customer to fuck off without seeming rude?"

  13. Data Protection Act by Anonymous Coward · · Score: 1, Interesting

    Say no, it's not permissible under current UK legislation. If one customer accesses another's data, you will be in deep shit.

  14. Why not? by Hankapobe · · Score: 3, Insightful
    However they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without consulting us.

    Why not set up an account that has read only access? Why not create a view of the table that shows only the columns they need? It'll be good customer service and relations. Just remember, your company can be replaced and if you don't give them the service they want they'll get it somewhere else.

    1. Re:Why not? by phagstrom · · Score: 1

      Indeed! The view idea is the way to go. And if fear about queries that overload the system is the problem, then give them access to a replicated server only || limit the time a query can take.

      But using views and replication, you will box the users in and only give them access to the data that they need, without putting to much strain on the primary db server. Furthermore a view will allow you to "hide" future changes in your table specs. This can avoid a support nightmare, when suddenly the users sql no longer does what it's suppose to.

  15. Give them a trial period by glgraca · · Score: 0

    "My precious tables"?

    This is valid business mentality?

    Why don't you just give them read-only access, and if they do f**k up, then you have a perfectly valid argument. Otherwise, you're just being a jealous geek.

    1. Re:Give them a trial period by jedidiah · · Score: 2, Insightful

      No. You simply don't understand the problems here.

      --
      A Pirate and a Puritan look the same on a balance sheet.
  16. Play the performance card by BillBrasky · · Score: 2, Interesting

    Tell your bosses that allowing your customers SQL access to your database could allow them to input inefficient queries that could grind your whole system to a halt. Then none of your customers will have access to the DB.

    You could also say that if a security vulnerability is present in your DB vendor's product, it will be much more easily exploitable through direct SQL.

  17. Suggestion by ggvaidya · · Score: 5, Funny

    Don't use your work e-mail address when you call your clients "stupid" in a public forum?

    (It's two a.m. here, I bet somebody'll point out some completely idiotic assumption I made in about two seconds. Oh well, so it goes.)

    1. Re:Suggestion by markybob · · Score: 1

      Don't use your work e-mail address when you call your clients "stupid" in a public forum? no kidding. note to self: stay away from eds
    2. Re:Suggestion by Curmudgeonlyoldbloke · · Score: 1

      Excellent timing too, what with HP just having bought EDS.

    3. Re:Suggestion by Anonymous Coward · · Score: 0

      Your are correct, you use your co-workers e-mail while they are at lunch.

    4. Re:Suggestion by Falstius · · Score: 2, Funny

      <tinfoil hat>Who are the competitors to EDS in the UK?</tinfoil hat>

  18. Tell them it's not possible by darkfire5252 · · Score: 1

    A simple solution would be to tell them that you do not have the ability to do that. You could say that your database stores data for all of your customers and that it's not possible to give them direct access without compromising the security of the other customers' data.

    1. Re:Tell them it's not possible by Anonymous Coward · · Score: 0

      Of course, you then run the risk of them asking someone who actually knows something who will tell them you are incompetent and they ask that you get fired. Don't make things up. If it is performance issues you're worried about, are you sure there's no way to force their requests to run at low priority, for example?

      If you have real reasons, state them. If you're just worried they'll see how poorly you've set up the database, then fix it. With read-only, low priority, and a decent database server, what exactly are you worried about?

  19. Becasue you are stupid is a valid reason by geekoid · · Score: 5, Insightful

    just now when said like that.
    I am not sure why a DBA doesn't know this, but just create read only views

    Seriously - are you really a DBA, or just someone that got stuck DBAing? This situation is dealt with at every place I have ever worked, without exception.

    You could also create a Cube. This might be 24 hours old, but I don't know who many transactions we are talking about here.

    Be sure you can track all logins, and log what they do.

    They are not your tables, get that out of your mind. They are the companies. All you can do is write a report explaining the risks to management, and be sure the users know they are liable when they make a mistake. Then set up views.

    Yes, if they screw up you will be the one to fix it, that's your job. At least you can wave off any fault.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    1. Re:Becasue you are stupid is a valid reason by kannibal_klown · · Score: 1

      Well it is the company's server. If you get idiots writing queries they can bog down the server big time. I've heard horror stories of people doing running many concurrent queries every few minutes, and they were poorly written so they'd be constantly putting a drain on the server.

      Unfortunately, too many people think that just because they know a few SQL terms that they're DB experts.

    2. Re:Becasue you are stupid is a valid reason by sirket · · Score: 5, Insightful

      Did you even bother to read the original post? The person said their client wanted read-only access. The problem isn't the client messing up data- it's the client bringing the server to its knees with an abysmally inefficient query. Oracle has some features to limit the damage a user could do- but the only truly safe option is a read-only replica.

      The person also wrote that the customer did not want 24 hour old data (you really didn't bother to read the post did you?) so your cube is a useless idea.

      If you think it's a good idea to give clients direct access to your production database then please send me over your resume so I can make sure it goes on our "Never, ever hire this person" board.

    3. Re:Becasue you are stupid is a valid reason by Anonymous Coward · · Score: 0

      Exactly. Set up Oracle Views and be done with it. You can set resource limits to their queries and restrict their handling of the database. If they ask for more, point out that it is your companies data and "some information is sensitive to other clients." End of story.

      Here: http://www.dba-oracle.com/concepts/views.htm

      Just in case you don't know anything about views.

    4. Re:Becasue you are stupid is a valid reason by Anonymous Coward · · Score: 0

      Amen. Perhaps "cyteen02" (Cyberteen? WTF gay?) would like some cheese with his whine. I can't wait for Cyberteen03's Ask Slashdot question: "I'm a software developer. How can I stop my clients from changing requirements at the last minute? Man, this is hard work! WAAAAAAH!"

    5. Re:Becasue you are stupid is a valid reason by ahodgson · · Score: 1

      I have developers doing that every few days. I can't even imagine how bad it would be to have non-techies hitting my db direct.

  20. Liability by LuminaireX · · Score: 2, Informative

    First of all, I am not a lawyer. YMMV, etc...

    Not sure what sort of information they're requesting access to, but if any data at all is of a sensitive nature, by supplying a password to them even in a read-only capacity increases your liability if that information is stolen through unauthorized access. Basically, if a third-party somehow acquires that username/password to steal a dump of every firstName, lastName, DOB, and social security number from the database, you could expose yourself to legal trouble for enabling the access in the first place.

    I would err on the side of caution and explain you would rather third-party access not exist at all than open yourself up to the risks of unauthorized use of credentials.

  21. Oracle DBA by MyLongNickName · · Score: 2, Funny

    I thought Oracle DBA's were all uber-brilliant? Everyone I have met has told me so.

    Anyhow, you never give end users direct access to tables. Never. Users who create nice cross joined tables will bring your system down to a crawl Create data dumps to ancillary database -- one per company in this case. And that is if your management won't back you up in just saying "no". I know this much, and I am NOT a DBA.

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  22. Pay more money! by RalphTheWonderLlama · · Score: 2, Interesting

    You could give them a database user that is confined to whatever database or tables you wish and can only do SELECTs. Actually you should really say too bad and if you want custom queries, you should pay us to write a front-end for what you need. This solves the access problem and the possible server load problem from whatever cross product queries they might come up with.

    --
    simple, fast homepage with your links: http://www.ngumbi.com/
  23. Build a view? by Anonymous Coward · · Score: 0

    You can.. uh.. build them a view.

    Maybe you shouldn't be in that job if you are asking.

  24. Due to increased CPU by Greyfire · · Score: 1

    You could go with a denial due to the increased resources that the ADHOC queries will produce. Both CPU and memory used will increase as they do their (most likely) not optimized queries. They won't have access to the rest of the jobs being run on the server so they could be performing a query at a time where usually the resources are free for an existing complicated job. You could even appeal to paranoia with exposing the server odd sql attacks. I'm not sure of the licensing restrictions on Oracle, but maybe they would be violating that if their ADHOC queries were coming from dozens of different users.

    Basically they could break the server or increase the licensing costs.

    Unless you want an excuse for a beefier server... then this might be worth turning around.

    Good luck.

  25. You have some other problems... by teknopurge · · Score: 5, Insightful

    You are supporting them, so make it happen.

    Yes, bad queries can run amuck, which is why you give them access to a slaved reporting instance of the DB.

    Your tables are not precious, and they're not even yours, they are your customers. Let them run their queries on the reporting database, never the production DB.

    Regards,

    1. Re:You have some other problems... by Jeff+DeMaagd · · Score: 1

      I can't help but think that there isn't enough information. Most of the responses appear to be making significant assumptions about the relationship and who owns what. There apparently is even ambiguity of whether that database contains information belonging to yet another company.

    2. Re:You have some other problems... by nicklott · · Score: 1

      and I would add: if you think your customers are stupid and you can't deal with their reasonable requests, find another job.

    3. Re:You have some other problems... by bigstrat2003 · · Score: 1
      Exactly. I don't give my end-users admin access to their systems, because they will most likely completely mess things up if I do that. However, when one of them needs admin access, I don't whine about how they want to mess with my precious computers, I work to make sure that a) they're educated about how to not abuse this power, and b) the damage they can do is limited.


      Not to mention that calling your customers stupid is abysmally poor. This guy could be well-meaning, but his whole submission just comes off as whining egotism.

      --
      "16MB (fuck off, MiB fascists)" - The Mighty Buzzard
  26. Offer them what they want by ZeroConcept · · Score: 1

    Make a replica of the database available for this type of queries, you can argue that uncontrolled queries can impact your operations and that an isolated environment is required.

    Send them a Statement of Work with this costing scenario as your response.

  27. Don't do it! by Anonymous Coward · · Score: 0

    Giving the wrong people access to your database leads to unfortunate questions such as:

    "Did you intend to remove/change that data?" (which is never taken well) or "Why is the program/site/etc. no longer working?" and my personal favourite "Why am I still working here?"

    At the very least, CYA and say no. If your boss overrides you, then well, you might want to preemptively ask question #3.

  28. Before you give them access by netsavior · · Score: 2, Funny

    Be sure to refactor the tablenames. The customer will catch-on when the "Moron" flag in your users table is set to 1 for their login.

  29. Why not give them access? by vux984 · · Score: 1

    What do they really want it for? What sort of adhoc queries do they imagine they need to run?

    Odds are they only need access to a couple of tables... I'd consider creating a couple copies of those tables for them, and set it to update daily from the 'real' ones (with just their data of course), and then give them read only access to that. They are happy, and you are happy, hell if its small enough / simple enough, you could trhow up a mySQL or postgresql server somewhere to host 'their' data for them, and they won't even be able to touch your real server.

    Not saying this is a good idea or even feasible... but it may be possible to satisfy their request without opening up your database to them.

  30. Don't do it by dstates · · Score: 4, Insightful

    Agree, just say NO. If they absolutely insist, replicate the tables that they need to see to a second server.

    BTW have they offered to pay for all of the consulting time that they are going to request in understanding your schema and formulating their queries? Has management planned on the increase in personnel that your team is going to need to respond to these requests?

    Finally, if you expose the schema to outside users, you are effectively making this your API. If you want to change your schema in the future, you are going to be breaking all of the legacy queries that you customers have written.

    --
    Statesman
  31. This is a legitamate request by Anonymous Coward · · Score: 0

    ... and the proper setup can both satisfy the customer, and keep you happy. It does require work though, as well as investment. Create a datamart. Put it on separate hardware (depending on how much you want to spend, and since you use oracle, you have the option of implementing redundancy). If all the data within the given instance is specific to this one customer, then replication is an option. Otherwise, you'll probably have to create an ETL process (many platforms/apps available for this), unless their data is segragated to a specific set of tables. Create a read-only account on the datamart, punch a hole in your firewall for the specific IPs they'll be accessing it with (depending on how far you want to go, and how sensitive the data is, there are more secure/portable options here, such as VPN).

    I realize this is a lot of effort/$$$ to get done, not sure if you can convince the customer to offset, but it's what I would propose. Good luck.

  32. Unless its a question of privacy, just give it to by Anonymous Coward · · Score: 0

    I'm not quite sure what you mean by customer, but it shouldn't make too much difference. If there is data they don't need, the best bet is usually confidentiality.

    "Unfortunately, due to confidential information, we cannot give you full access to the database"

    Your role is probably to serve the customers, so if it's not a privacy concern I doubt there's much you can do (depending on your organization's structure). You can however say "We cannot provide technical support for ad hoc queries, nor can we ensure quality data. If you have any errors/trouble, you will have to submit a full request per current policies". For easy stuff, this will cut down on your workload, while still covering you and your concerns.

  33. Pre-process all data requests. by arthurpaliden · · Score: 2, Interesting

    Just create a pre-processor process that applies a set of rules to the incoming request prior to allowing it through to the database.

    1. Re:Pre-process all data requests. by tompaulco · · Score: 1

      At one company I worked for we actually created an open server that would take the SQL issued and add a where clause (if applicable) to restrict the results to only those rows applicable to their cost center, then pass it through to the real server (Sybase in this case).
      It worked well in our environment because all of the FACT tables had Cost Center information in them, and the Dimension tables could be queried without such a where clause because they didn't reveal anything about the other cost centers.
      It was like having many datamarts without having to maintain separate Databases.

      --
      If you are not allowed to question your government then the government has answered your question.
  34. Just say no by sirgoran · · Score: 4, Interesting

    I've run into this myself.

    I simply say that "Due to other client data being in the same database I am unable to allow you access. Since doing so would violate the privacy and security of their data, I sure that you would understand why I can't do that. I'm also sure how you would feel if the roles were reversed and how you would feel if another client asked for direct access and could see or read your data."

    Usually this takes care of the problem. If not, tell them how much it will cost to set up a stand alone database that only contains their data and then give them some unreasonable amount. If they agree, then you just made your company a nice chunk of change. You then set up the database, and the scripts to replicate the data to back it up (when the client hoses themselves) and move on. When the call comes in that they hosed their database, you charge them for the time to restore from the back-up times a factor of two or three, and again, you've set yourself as the goldenchild for your company by making them money.

    -Goran

    --
    Carpe Scrotum - The only way to deal with your competition.
    1. Re:Just say no by Just+Some+Guy · · Score: 1

      Due to other client data being in the same database I am unable to allow you access.

      Note that the story didn't mention anything about other clients, and if that was actually an issue, I think management would probably have nixed the idea already. As much as we tend to joke about PHBs, darn few are unable to grasp that concept.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Just say no by gblues · · Score: 2, Insightful

      Since when did there have to actually be other clients' data in the database to use that as an excuse?

    3. Re:Just say no by JeremyGNJ · · Score: 1

      Yea, you should say something just like this. Only using good grammar and proper english.

    4. Re:Just say no by Improv · · Score: 3, Interesting

      So you suggest lying to clients to satisfy "gut feelings" without any good reasons behind them?

      --
      For every problem, there is at least one solution that is simple, neat, and wrong.
    5. Re:Just say no by giuntag · · Score: 1

      way to go, bofh spirit. And what if the client is a better dba than you and has a very precise understanding of roles, grants and privilege separations in Oracle?

    6. Re:Just say no by Anonymous Coward · · Score: 0

      This is a good idea but sometimes your support contract with the customer precludes charging more than actual costs plus a small margin for such a service. Sometimes, depending on how the contract was structured and how much of a hard ass they want to be, they get it however they want it and you have no say. Remember if you charge too much when time to renew the service contract comes along they will remember getting shafted and expect a really good deal or they will leave. Basically, you need to give the idea to your management and let them work out the dollars angle. Your job is to implement whatever method they decide.

    7. Re:Just say no by Anonymous Coward · · Score: 0

      Exactly - premium access deserves a premium price!

    8. Re:Just say no by colinrichardday · · Score: 1

      Then wouldn't the client just run his/her own database? Although the price of Oracle licenses might be a problem.

    9. Re:Just say no by Anonymous Coward · · Score: 0

      Wouldn't customers immediately wonder why it is that their data is in the same schema as another customer's data and why they share permissions? I would certainly not say that. It amounts to the following: don't worry about SQL injection attacks in YOUR app, worry about SQL injection attacks in ANY app that interacts with our database because we didn't bother to break out users into separate accounts and give them their own schemas when we set up the database.

  35. Microsoft Reporting Services by wzinc · · Score: 1

    Microsoft Reporting Services' Report Designer Ad-Hoc report tool will allow them the access they need, without allowing them to write to the database. Also, you design the model with an Oracle back-end in visual studio, allowing you to have precise control over how they see the database.

    http://www.microsoft.com/sql/technologies/reporting/default.mspx

    http://visualstudiomagazine.com/features/article.aspx?editorialsid=1300

  36. Your precious tables? by ctdownunder · · Score: 2, Insightful

    Sounds like the data actually belongs to your customer.

    And apart from the replication to another server as mentioned, it sounds like you are being a tad childish. For example: "This is my ball, and I'm going home with it..."

    --
    The government has a defect: it's potentially democratic. Corporations have no defect: they're pure tyrannies. -Chomsky
  37. Try user profiles by blueeyedmick · · Score: 1

    Oracle provides user profiles to control virtually everything the user can do within the database, including CPU time and connect time. With it, you should be able to closely control what these ad-hoc queries can do, and avoid problems.

    1. Re:Try user profiles by Beezlebub33 · · Score: 1


      Managing profiles takes time (and therefore money). If they need access, charge them for it, and profit!! Or you can get yourself an assistance DBA (i.e. minion) who you can make do all of your work.

      --
      The more people I meet, the better I like my dog.
  38. Sheesh, have a reason, at least by Reality+Master+101 · · Score: 5, Insightful

    "I don't like them pawing through my database" makes me think that you're embarrassed by the database structure, and don't want people to see how screwed up it is. If that's the reason, then maybe it's time to fix things.

    If it's just some weird possessiveness thing, then get over it. It's not your data. It belongs to your company. It's their servers, their programs and their data. If they want to give access, it's their decision, not yours.

    Otherwise, a good reason not to allow direct access is performance. Amateurs doing queries against the "real" database can kill the server if they're not doing it correctly. My recommendation is to provision an entirely separate database server with a regularly-updated version of the data (perhaps even a "fixed" version if my first point is in play) and let them go wild on that.

    --
    Sometimes it's best to just let stupid people be stupid.
    1. Re:Sheesh, have a reason, at least by Fulcrum+of+Evil · · Score: 1

      Right, and it's just fine if some other team in my company wants access to the private variables on my classes. Really, what happens when you change the schema, or refactor to a multi-DB architecture? Never mind that oracle is chatty - much better to keep that traffic isolated.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    2. Re:Sheesh, have a reason, at least by surmak · · Score: 1

      "I don't like them pawing through my database" makes me think that you're embarrassed by the database structure, and don't want people to see how screwed up it is. If that's the reason, then maybe it's time to fix things.

      I do not know what the underlying issue is -- you may be right the asker does not want to provide access to the DB because s/he does not want the customer to see the schema. If could be due the an old, crufty schema which is an embarrassment; however it may the the exact opposite. There could be an elegant, efficient, normalized schema underlying the DB, which is quite not the easiest format to generate ad hoc queries against. Perhaps the fear is that the customer will insist that the schema be changes to something less elegant and more "user friendly"
    3. Re:Sheesh, have a reason, at least by Reality+Master+101 · · Score: 1

      Really, what happens when you change the schema, or refactor to a multi-DB architecture?

      That's what "views" are for.

      --
      Sometimes it's best to just let stupid people be stupid.
    4. Re:Sheesh, have a reason, at least by AnonymousRobin · · Score: 1

      I'm pretty clueless about databases, but from a design point of view, a major concern might be how this will limit what you can do in the future. As you can't control how your client chooses to access things, if they end up automating anything for some reason, doing so much as changing a column named 'foo' to 'bar' will blow up everything and they'll complain - despite the fact what you name your columns shouldn't be their business. If you get a new client that, for some reason, requires new information that should not be accessed by this company but still needs to be put in the same place, it's a lot more work which could have otherwise easily been solved if there was a layer between them and the database. And once you give an inch, you can't take it back.

    5. Re:Sheesh, have a reason, at least by Fulcrum+of+Evil · · Score: 1

      true enough, so long as the schema doesn't change too much. I still wouldn't want to just expose a schema that isn't designed for that.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  39. Been there, doing that and more... by Vrallis · · Score: 1

    My company provides SQL-backed software, and we have gone through similar problems. Normally we support Crystal Reports and have someone give them basic training in it. If they cause a problem, we'll cut the access, and they know it.

    Now the truly scary part is when they want WRITE access to their database. They are already restricted so they only have access to their own data, so confidentiality of other customers' data isn't an issue. However, they can massively destroy their database under bad circumstances. In one case a customer did a wide-open update to a very large table--they were fortunate that it filled the transaction log and it was rolled back, otherwise their only recovery would have been a database restore. Even then the rollback took hours...

    1. Re:Been there, doing that and more... by grassy_knoll · · Score: 2, Interesting

      Now the truly scary part is when they want WRITE access to their database.


      I've had customers like that as well. Honestly, since they're paying and it's their data I can see where they're coming from.

      On the other hand, I usually have someone sign off on a MOU that they understand writing to their database outside of the application is inherently risky, and that they understand there will be additional charges for recovery work.

      WHEN a customer mangles their data we get to test our recovery processes. So far, so good.

      Also good to have multiple backups using multiple methods. I've had customers mangle multiple tables, so a full database restore with point in time recovery was best while other customers munged up one table, so a restore from export worked out better.
    2. Re:Been there, doing that and more... by Vrallis · · Score: 1

      Also, in reference to "keep my customer away from my precious tables," these are not your tables--the customer is the one writing you a check, not your tables. That is something far too often forgotten in the non-mass-market software industry.

    3. Re:Been there, doing that and more... by dolmen.fr · · Score: 1

      Now the truly scary part is when they want WRITE access to their database. [...] However, they can massively destroy their database under bad circumstances. In one case a customer did a wide-open update to a very large table Write access must only be given through stored procedures, so you can exactly control access.
      If you give direct INSERT/UPDATE/DELETE access you can't control anything and the user will be able to do crazy queries that will overload your database.
  40. Just say yes by Anonymous Coward · · Score: 2, Funny

    What's the worst that could happen if you issue them full read access? I work at a major isp, and I just gave a customer full read access to our client database server (which I am typing this from). As you can see, everything is operating perfe

  41. Don't be a jerk by Just+Some+Guy · · Score: 1, Insightful

    As a DBA, my heart sinks at the thought of amateurs pawing through my database. Unfortunately, 'because you are stupid' is not considered a valid business reason to reject their request. So can any Slashdotters assist me in building my case to restrict access? Have you experienced a similar situation? Have you had to support this sort of end user access? How would you advice me to keep my customer away from my precious tables?

    Let me translate that into non-Oracle DBA terms:

    "Whine! Whine! Whine! I hold the key! Me! This is magic! Whine!"

    Another translation into Customerese:

    "It's my data AND I WANT TO SEE IT, NOW!"

    Seriously, what non-ego-driven reason do you possibly have from not allowing your customers to access their property, aka "their data"?

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Don't be a jerk by kamosa · · Score: 0, Insightful

      Seriously, this is the truth. DBA's can be the most pompus silo builders in any organization. The only weak arguement the lot of people on this thread can come up with is "bad cross joins"... Really? That's it. If so, send them to a querry construction class, stop whining and give them access. Here is a hint for free, not everyone besides you is stupid.

      On a side note: Perhaps you should look at why your "service" is so lacking that the customer is asking out of it. After all, if you were giving them exactly what they wanted, they wouldn't be asking to go around your "wonerderful" service.

    2. Re:Don't be a jerk by Anonymous Coward · · Score: 0

      There are valid reasons not to allow access to live data, so saying "bad idea" is the proper call from the point of the view of the DBA. That's not pompous, that's the job IT is supposed to do - support the technology and advise management on what is and isn't feasible.

      But as about a jillion +5 comments have stated you can give the customer their own little dump or view, and that would largely obviate the security, privacy and performance considerations. See, that's the other part of IT's job, saying "no, but how about..."

    3. Re:Don't be a jerk by Anonymous Coward · · Score: 0

      I began writing a novella-length post in support of you and the parent poster, but since your comments were deemed "flamebait" I won't bother finishing it. It suffices to say that there is often a rather large "culture gap" between DBAs and more general programmers. It's similar to the culture gap between programmers and "operations"/sysadmin folks, but more damaging because the DBAs' fundamental misunderstanding of the "big picture" role of a RDBMS can have negative consequences when the real programmers have to work with them in the course of system design.

      In fact, I have long believed that in small-medium sized companies with real progamming staff, the "professional DBA" positions should be eliminated and their work split between the programmers and the sysadmins, hiring more of the latter two if necessary. Simply put, most companies don't need specialized data warehousing support, and for those that do, the typical certificated "professional DBA" is unqualified. You're better off hiring people who can do more than support a single OTS application.

      I'll go even father: much like the majority of IT "systems analyst" positions, the "DBA" position is a farce intended to let cheapskate companies get by with fewer programmers. Even "average" programmers are expensive, so you attempt to free up their time by extracting 5% of their duties, like gathering requirements or playing with specialized OTS software, and turning said 5% into a full-time position for a lesser technologist. Not a bad idea at first appraisal, but in my experience, the programmers' "saved" time is then eaten up by the muddy documentation and sludge-like "process" that are the product of the systems analyst, and the parochial, inferiority-complex-driven fumblings of the DBA.

      Why, yes, I do bear some personal grudges! :-)

  42. build views by Anonymous Coward · · Score: 0

    that limit access to what is visible in the base tables according

  43. API by Anonymous Coward · · Score: 0

    Let them know that you can't support their scripts, and if you need to change something internal to the database, it may break what they've put together without your knowledge.

    If they're okay with that, then I second the notion of giving them a mirror they can play with - they *are* your customers, after all. Don't promise them anything you can't promise them, but do give them what they want.

  44. Mirror their tables to an external database by blackjackshellac · · Score: 0

    Give them access to that database.

    --
    Salut,

    Jacques

  45. I'd say the same thing by jd · · Score: 1

    Depending on just how heavy the queries are going to be, and how standards-compliant you can require things to get, you may be able to have the database replicated onto a lighter-weight server. This would have the bonus "selling point" of being faster than the main system, and have the "selling point" at your end that a read-only cache is both a standard and secure method of providing the required service.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  46. If it's their data... by Talsan · · Score: 1

    If it's their data, then why not give them what they want?

    If there's data for other customers in the same DB, you could always create a set of views and give them access to them.

    In the end, it's read only access that they're looking for. As long as there's an agreement whereby they accept liability if unauthorized access is made using the account you provide, you should be covered.

  47. Not to state the obvious, but... by Mike1024 · · Score: 3, Insightful

    However they have now asked for direct read-only access to our Oracle database, [...] my heart sinks at the thought of amateurs pawing through my database. Unfortunately, 'because you are stupid' is not considered a valid business reason to reject their request. So can any Slashdotters assist me in building my case to restrict access? Not to state the obvious, but perhaps your justification for refusing access could be based on your reasons for refusing access?

    If the only reason to refuse them access is that you "don't like the idea", you should come up with a proper reason you feel that way, and if you can't, you should change your opinion - or risk gaining a reputation as an arrogant, arbitrary obstructionist.
    --
    "Goodness me, how unlike the FBI to abuse the trust of the American public." -- The Onion
    1. Re:Not to state the obvious, but... by SlashV · · Score: 1

      If the only reason to refuse them access is that you "don't like the idea", you should come up with a proper reason you feel that way, and if you can't, you should change your opinion There's a good deal wrong with that statement. It supposes that you can always come up with a good reason for something that you feel is wrong. This totally ignores something that is called 'intuition'. And though intuition is unpopular in business because it is unpredictable and hard to grasp, it will help you with making good IT decisions more than you know -- with making any decision as a matter of fact --. The more experience you have, the more so.
  48. The customer can have anything... by borkus · · Score: 2, Insightful

    ...that they're willing to pay for.

    Pretty clearly, running ad-hoc decision support queries against a transactional database is going to add an undetermined amount of load on that system. So your customer has a few options -

    1. Upgrade your systems to support more load. Obviously, they want to still do their data processing in addition to any queries. If they're willing to cover the costs of the upgrade to insure the current level of service, then there shouldn't be a problem.

    2. If the data doesn't have to be real time (within a few seconds), you should be able to replicate the data on a separate box for ad-hoc queries while active processing is done on the main database. Again, they need to foot the bill for this replicated server, but it may not need to be as beefy as the production box (depends a great deal on your scale/size).

    3. Find a 3rd party to host the data for the customer and have the customer pay the 3rd party directly. Obviously, there may be some development and support cost of maintaining the data feed, but that way the customer understands the actual cost of that capability.

    Now, I don't know the competitive and political environment that you're in. Are there competitors that may have a similar product to yours that allow live queries? Sometimes requests like this are simply to provde justification for a switch.

    1. Re:The customer can have anything... by DaveV1.0 · · Score: 1

      Even data on their competitors in violation of confidentiality agreements and NDAs?

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
    2. Re:The customer can have anything... by borkus · · Score: 1

      Even data on their competitors in violation of confidentiality agreements and NDAs? How much are they willing to pay? Of course, that may be out of contract.
  49. Read Only by AlricTheMad · · Score: 1

    If no is not a sufficient answer and you can not come up with a legitimate business case the a replicated DB would be my choice.
    Possible business case reasons:
    No way to prevent access to other customers info without significant development time and expense
    Server may not be able to handle the expanded load
    Not enough licenses for the server

    If you have to
    Charge for creating the replicated data
    charge for development time to provide access
    charge for service of maintaining replicated data
    write read only views to the data restricting what they actually have access to.

  50. Create a view! by Anonymous Coward · · Score: 0

    You could create one or more views that restrict what the user can see. That way you don't have to reveal the structure of the tables.

  51. Create a Copy of the Production DB by Anonymous Coward · · Score: 0

    I have been in the position of your users and can relate to their situation, but I am also sensitive to yours.

    As others have said, the best option is to create a copy of your production DB and put it on a different server and refresh it weekly or every couple of days (e.g. Sunday and Wednesday). The copy doesn't have to be the entire DB, just a subset. That way, even if they do something stupid (e.g. bad join) they won't crash production.

  52. Higher Authority by Anonymous Coward · · Score: 0

    Always try to result to a higher authority like 91 Degrees said and say that you aren't authorized to provide that access. No need to lie about legal stuff though. The initiated will look that up and call you out. Not a good scenario.

  53. The customer needs to cover the cost by 93+Escort+Wagon · · Score: 2, Insightful

    Explain to the higher-ups, in detail, how this customer request can (and will) impact your other customers. Then tell them the solution is to replicate the database onto another server, which will be the one the customer will be given access to (as others have said). But make sure the customer foots the bill for purchasing and running that new server.

    --
    #DeleteChrome
  54. ummm.... by Anonymous Coward · · Score: 5, Funny

    Wow, you're right. Next week "Ask Slashdot: How to find a DBA job after being fired from EDS"

    1. Re:ummm.... by ggvaidya · · Score: 1

      Not just me then :P

      Does anybody know the e-mail address of the editor "on watch"? I can't find it in the FAQ. If we e-mail them, and they anonymize the name a bit, we could spare everybody a whole lot of pain tomorrow.

    2. Re:ummm.... by Otter · · Score: 1

      Fortunately, his address will soon be switched to hp.com and no one will be the wiser!

    3. Re:ummm.... by Anonymous Coward · · Score: 0

      How to find a DBA job after being fired from EDS

      That's OK, I'm guessing the cyteen's newfound boldness comes from knowing he's about to be redundanted out after HP acquires EDS.

    4. Re:ummm.... by dysfunct · · Score: 1

      I know it's a bit late now, but the answer is daddypants at slashdot.org

      --
      :/- spoon(_).
    5. Re:ummm.... by ggvaidya · · Score: 1

      So intuitive! But thanks :) I'll write that down for future reference.

      It all worked out good, somebody obviously managed to get in touch with the editors, as the link to the e-mail address was removed within thirty minutes of my post. So yay!

  55. Just make a separate DB for them by Anonymous Coward · · Score: 0

    And let them break that, and pay to maintain it as well.

  56. SOX and SAS-70 by slapyslapslap · · Score: 1

    Just make up a bunch of BS about SOX and SAS-70 compliance. Tell them your hands are tied from government regulations. It works every time!

    1. Re:SOX and SAS-70 by BitZtream · · Score: 1

      Great idea, sure to work flawlessly. Make up a bunch of bullshit about stuff you don't understand, and then look like a jackass when the DB guy on the other side explains to you how you can configure Oracle to ensure that you aren't violating any laws.

      Its always good to use bullshit as an excuse for inability to do your job, tends to work out well in the long term.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  57. Why not? by bolek_b · · Score: 1

    As long as they ask for a strictly R/O access, why not let them have it? If I hear "my precious tables", I immediately have to think "unprofessional administrator". Do you have to worry about sensitive contents or are you ashamed of the mess, which most production databases converge into?

    Easy, straightforward solution (with some implied assumptions, btw): I would create a set of views with SELECT privileges granted to a new role, let's say ADVANCED_CUSTOMER. Then create a new db user, grant him the role and there he goes.

    More advanced solution: I would set up a new database, into which the original data would be replicated. Possibly with some time lag, so the advantage of fresh data remains for you.

    Anyway, as a customer, I would just state what I want ("this and that set of data"), and the provider's job would be to make it happen. Preferably in some interface neutral way, e.g. SOAP.

  58. All this is is a basic Oracle question by Anonymous Coward · · Score: 1, Informative

    Use Oracle Data Guard to replicate the database and let them query on the rerplicated database.

    Use Oracle RAC and have your application use one server on the node and they can use the other.

    Use CPU_PER_CALL to limit their impact.

    Honestly this isn't a Slashdot question you need to be on somewhere like http://asktom.oracle.com.

    You have many options to allow these users the access they desire but so far no strong reasons to deny them. So go for budget. Write up a RAC or Data Guard proposal, show them the additional initial and then ongoing cost, and let that put them off.

  59. Performance is the only valid reason by Anonymous Coward · · Score: 0

    If you're concerned about them writing bad queries and eating up server resources because of it, that is a valid reason. They cannot be reasonably expected to know how to write good SQL. However, that's the only good reason you can give. They are the customer, it's their data, and it's reasonable for them to want access to it.

    This is a no-win situation unless you can come up with a replication of the data they can play with as they desire. If you provide the access, then they may wind up writing bad, slow-running SQL. If you don't provide access, then you will wind up getting stuck responding to their every query requests, which presumably has financial implications.

    Bottom line: the scope of your relationship is expanding, and perhaps you need a discussion with them about the economic impact (i.e., "this is going to cost you").

  60. Make a list of bad things that can happen by arnie_apesacrappin · · Score: 3, Informative

    If you really want to make a case to management, write out all the worst case scenarios for your management (I know that there should only be one WORST case scenario, but work with me here). If you can list the things that can go wrong, you might be able to help. I once worked in an environment where a developer wrote a query that locked a database for four hours until we killed it. One of the DBAs was able to re-write his query so that it completed in under 10 seconds. His access was then revoked.
    Tell you boss how someone with read only access could affect the rest of the users, and you should be on the right track.

    --

    Still, with a plan, you only get the best you can imagine. I'd always hoped for something better than that. -CP

  61. use views by bendytendril · · Score: 1

    I had a similar situation. In my case, I was more concerned they'd see the schema. I created views of denormalized data that they'd be interested in accessing, then granted rights to only these views. They were never the wiser.

    --
    sig: pv qid
  62. Just give it to them by sricetx · · Score: 1

    They are the customer. They paid for the database. Give them full access to it. And when they muck it up, charge them a very high rate to fix things.

  63. Create some views by sugarmotor · · Score: 1

    Just create some views on a copy of the database. They wouldn't know if the view is incomplete.

    Let them only read the views created for them.

    In general, isn't it funny how views are available for just this reason, and invcorporated into all the big databases, and yet, when it comes time to use the feature, everybody gets nervous.

    Similar to using VM appliances instead of adding another package to a machine, another process or service, "just to be safe".

    Stephan
    --
    http://stephan.sugarmotor.org
  64. I'm a DBA by misterjava66 · · Score: 2, Insightful

    I'm a DBA
    You should not report off of a production Database.
    Obviously, you will need to have a feed that looks like a report to the reporting DB but this is NOT a report, it is a feed.
    Reporting will harm performance and reliability of the performance of the production db.
    Also, reporting off of a simple copy of the production db is generally undesirable, generally you want to have a warehouse/flattenning/sumarization of some kind for reporting.
    That's the stock reasons to keep this stuff seperated, its done me well for 20 years.
    :-)

  65. Give them acces, charge them to fix it. by Kintanon · · Score: 1

    If they want access, give it to them. Let them know up front that any damage done to the database because of their queries will be billed at 4X the normal rate, or some other suitably large number.

    Everyone's happy.

    --
    Check out JoshJitsu.info for Brazilian Ji
  66. One approach to meet this requirement... by managerialslime · · Score: 1
    Ok, lets assume for just a minute that letting some kind of query capability is appropriate for your customer base and that you already know enough about Oracle views and roles and general security that your concern is improper SQL syntax, run-away queries, etc.


    Instead of giving them open access to feed SQL to the database, see if they would be open to using a PHP (or other web) screen where they could check off specified field names, add conditions (like, , and a value, etc.).

    You could then construct well-behaved SQL statements and kill requests that your code defines as unreasonable.

    If an interactive screen is not acceptable, then consider a facility where they feed you a SQL string and then you use PERL (or other program of choice) to extract simple queries that you can then re-feed to Oracle. Any sufficiently complex or burdensome query could trigger emails to your DBA who could then gently provide guidance to your customer.

    --
    Live Long and Prosper - Thanks Leonard. You are missed.
  67. Build a web service by Anonymous Coward · · Score: 0

    Why don't you ask what sort of queries they want to run and instead build a web service?

    They won't have access to the database directly.

  68. Yeah by Colin+Smith · · Score: 1

    Tell them to fuck off and get another supplier. I'm sure they aren't worthy of your precious tables.

    For crying out loud, what kind of DBA is unable to create views and restrict access to tables? I mean, come on, Oracle can restrict access to specific rows if you need to, that's both it's beauty and hideous ugliness.

    --
    Deleted
    1. Re:Yeah by Andy_R · · Score: 3, Funny

      "what kind of DBA is unable to create views and restrict access to tables?"

      One that works for EDS, who are famous for their incompetence. Next question!

      --
      A pizza of radius z and thickness a has a volume of pi z z a
  69. Reason why not to... by Anonymous Coward · · Score: 0

    Cartesian joins!

  70. Give it up dog... by tjstork · · Score: 1

    Customer is paying the bills, get it?

    What you should do, though, as you give it up, is that, you should get the right to waive performance guarantees you have in your SLA with them, because of their querying. Also, get your support costs for handholding them worked into the deal.

    That's fair. If the customer is monkeying with their database, and their site goes down because they did a massive cartesian join, then, you can't help that now, can you?

    --
    This is my sig.
  71. Just give them a copy of the database by soybean · · Score: 1

    And let them go crazy.

  72. That depends on the situation by Todd+Knarr · · Score: 1

    If it's only this customer's data in the database, nothing else, then just give them one or more users with read-only permissions. They'll be able to look all they want, but they won't be able to change anything or muck anything up. No danger there, and no problems with exposure of data because it's all their data anyway. The only problem comes if/when they ask for write access, and the case for denying them there depends on what they're asking and how the database is set up (if for various reasons it's not got a strong integrity constraint setup in place, the risk of corruption is a good enough reason technically to deny access unless the customer also wants to take over complete administrative responsibility for the database).

    If there's data in the database that's not the customer's, eg. tracking data for other customers or additional data for your organization that's not supposed to be visible to the customer, cite the need to restrict access to that data and the inability to do that if you give the customer direct read access to the database. You may end up having to build a custom schema/view that exposes only what they're allowed to see, but that's a fairly significant undertaking and should be billed to someone.

  73. Just charge them... by duplicate-nickname · · Score: 1

    I know for a fact that EDS has got that whole nickel & dime process down to a science, so I don't see why you need to post this on Slashdot. Hopefully that is not your real name & email address in the original post.

    --

    ÕÕ

  74. Sell by Archangel+Michael · · Score: 1

    Sell them a copy of the data, the whole thing. That is what they get, they don't get access to your database, which I suspect is what you want to protect. You sell them a copy, and let them figure out how to get Oracle etc working for them.

    Or, you can sell them that as a service as well.

    In other words, your database is yours, not theirs. If they want direct access, you'll sell them a copy of it, and let them have at it.

    The other option is to clone the database, and give them access to the cloned database. You keep and maintain the existing database away from them. If they screw up theirs, then they can buy another clone of yours.

    If they are as bad as you seem to think, then it should be quite lucrative for you, keep selling pristine copies.

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
  75. Run and find out by dzurn · · Score: 1

    The customer (remember, the dupes who pay your salary) perceives that there's something they want that you aren't giving them. This is either 1. An opportunity to charge them for their new feature extension, or 2. You evidently don't know exactly what the customers are doing with the data. When the multinational 3M company was much smaller, they sold their Scotch-brite green non-scratch pads in various sizes. Once a customer asked if they can get a 2-foot width uncut. The salesman asked why, and the customer replied that they used the pads on their custodial floor strippers. The salesman said "We make those already, ready to stick to your floor polishers!" Then the salesman immediately calls R&D and says, "Can we make these?" The answer was yes, and the entire janitorial division of 3M was born. That's why you want to find out what the customer wants to do with your, errr, *their* data.

  76. SELECT only access with limits? by pembo13 · · Score: 1

    In MySQL at least, you can grant SELECT only access, prevent locks, limit runtime, etc, on a per user/host basis... wouldn't this be applicable here?

    --
    "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
  77. Explain the cost to managment by Craig+Ringer · · Score: 1

    Frame it in business terms.

    Giving users read only access will work, with these caveats:

    - It may require the investment of quite a bit of developer time ($$) to tighten the security model to isolate restricted parts of the database thoroughly.

    - It may require the purchase of new hardware and new software licenses to support the increased load. If the customer has a skilled DBA and the database is well documented this may not be an issue. In practice, however, they'll always end up writing slow and inefficient queries that the DBA must spend time tracing and fixing ($$) or that force the addition of extra capacity.

    - Once you give a user read access, they will demand that you introduce more and more levels of restricted access priveleges into the DB structure. This not only costs DB admin time ($$) but also potentially reduces the security of the database by increasing its complexity.

    If you give them write access you can expect to spend lots of money:

    - Adding lots of extra capacity to cover inefficient queries
    - On downtime when they break the database
    - On adding excessively fine-grained security policy to the database
    - ... and on huge amounts of extra tech support because of things the customer breaks.

    This is true even in a well designed database with exisitng quite strict access limits and lots of internal checking. The only time write access might even be *remotely* sane is when everything is done through (paranoid) stored procedures anyway. If that's so, it's not much different to offering them access at a web service level instead.

    On a database that's not so well designed or is designed for use only by 100% trusted clients (so it omits some sanity checking and priveleges structure) you're in for a nightmare without end.

    In other words: Giving the customer direct DB access will cost you money. If you do it, make sure you're prepared to add capacity (and charge the customer accordingly) and dedicate DBA time for direct customer support. Consider giving them access only to a cloned reporting DB. If you offer write access to the main DB do so only through very restricted interfaces or you will face large increases in tech support costs, downtime, etc.

  78. What's the customer's name? by tjstork · · Score: 5, Insightful

    Just say no and hope that it sticks. Seriously. I find that so many people in the workforce noadays don't know how to say that simple word. No.

    Hey, I have a consulting firm that would be willing to work with the client to ensure they have that database access. :-)

    What we could do is give them the query access via their own public synonym space, and build it into our SLA that we are not responsible for downtime due to their querying. We would also bundle some support costs into the agreement.

    --
    This is my sig.
    1. Re:What's the customer's name? by j0eshm0e · · Score: 2, Insightful

      Seriously, this poster's attitude is WAY wrong! Instead of throwing up barriers which will only piss off your customers (which now even Microsoft knows is a bad thing), you need to solve 'why' they are asking for this in the first place, and then giving then a viable solution.

      That customer obviously has a valid business reason for asking for this --probably the condescending tone he gets whenever he asks for a one-off report-- and the DBA better jump at the opportunity he has to show how he can meet a client's need. If that means getting better metal to handle the increase in adhoc queries, so be it.

      The poster needs to remember it is that customer who generates his pay-cheque, and lay off the 'top of the food-chain' crap that'd see him fired if I were his boss.

    2. Re:What's the customer's name? by MoxFulder · · Score: 1

      Bravo! Finally, someone who actually intends to help the customer do what they want, rather than tell them they're too stupid to do it...

      I know we're all IT people here, we run our own RDBMS, rebuild our kernels, etc. etc. but...

      Imagine for a second that you're not the OP's client. Wow, it's going to be awfully frustrating when the company you've hired for database support says, "We won't let you do what you want with the database, because we think you're too stupid."

      Even *if* that is true, flat-out rejecting it is going to lose you business fast. Better to build an auxiliary database that they can use for their own queries, or otherwise come up with a real live compromise solution... just as tjstork suggested.

    3. Re:What's the customer's name? by 2short · · Score: 5, Insightful

      Seriously. If our sales guys had the clients name, we'd eat his lunch.

      He seems to think 2-8 GB is a big database. If the customer wants some custom report, he thinks emailing someone who writes custom SQL and sends them an excel spreadsheet the next day is a process that "ticks along happily". If your customer is asking for direct SQL access so they can bypass you and do stuff themselves, your process is not ticking along happily.

    4. Re:What's the customer's name? by Alioth · · Score: 1

      Additionally, if I were the customer, and the supplier was cagey about giving us read only access to the database, I would be suspecting that the schema was something that should be featuring on The Daily WTF website. People generally want to hide code or databases they are embarrassed of.

  79. Diego de Oliveira by Anonymous Coward · · Score: 0

    What your customer really need is a OLAP software to query the database. Open query access may result in wrong queries structure that grab wrong data and result in a wrong interpretation. With an OLAP software you can put roles in what relationship is allowed, what indicators and so on.

  80. As a database vendor customer... by Anonymous Coward · · Score: 0

    I work in social services, and my job is to be the liaison between my team and our database vendor. The biggest complaint from my staff, and from other people I've talked to who use databases from other vendors, is that we can't get the data we need the way we need it when we need it. From the customer perspective, your job is to make it happen so that we can do what we need to do for our jobs. In the bigger picture, from the customer perspective, this is why we hate database vendors. My experience is that database vendors have a database that works the way it works and too damn bad if you want something to work differently or you need to access or enter something they don't already have a way for you to access or enter. Is your job to provide a service, or is your job to be a BOFH? Am I a customer or am I a lowly peon who has been graced with the chance to use your sacred product?

  81. Saying 'No' should be very simple. by hrieke · · Score: 1, Insightful

    When your customers can write their own queries, what's stopping one of them from
    1. Copying the entire database for their own? CCBA anyone?
    2. Query about their competitors who also use your services.
    3. Give your competitors access to your full system. You'd be a fool not to think that one of your customers hasn't given access to your systems to one of your competitors sales people. Now image if the whole system is open.

    --
    III.IIVIVIXIIVIVIIIVVIIIIXVIIIXIIIIIIIIVIIIIVVIIIV IIVIIIIIIVIII...
  82. Give them dumps by Anonymous Coward · · Score: 0

    Let them download backups of the entire db that they can restore and query on their own server. Since you're not using an open source db it may not be compliant to give them direct client access to the db anyway, but what you can tell them is that you don't want rogue queries to corrupt the data or hose the performance.

  83. View by Oxy+the+moron · · Score: 1

    It's not a perfect solution, but perhaps you could create a read-only view that is customized for each client that wants this capability? That would keep their grubby paws off of other clients' data and also abstract (and obscure) them from knowing the actual underlying data model.

    --

    Proudly supporting the Libertarian Party.

  84. DBA hat by mugnyte · · Score: 1


      Low priority, read-only views on a limited number of shared connection types.

      Queries, even bad ones, are throttled, lower priority than standard work, and they can only open 10 connections, for example.

      Even this will impact production performance, but it shouldn't interfere with local transactions, at least.

      You could also make disconnected views, which are refreshed at a single point in time.

      Which is one step away from a replicated DB. This offers the best hope, as they could update certains tables and you oculd scrub/replicate back if you wanted.

  85. Just Say No by kotj.mf · · Score: 1

    > Presumably apart from server load it wouldn't be a big deal assuming the users are working on a read-only login?

    Server load can be a big deal. All it takes is a couple of bad joins and some dirty math (can you tell I'm not a DBA?) to start thumping disk or processors in new and interesting ways. That's bad enough when your own DBA does it, and indescribably worse when a customer does it. Read-only access does nothing to solve this problem.

    Personally, I wouldn't be letting non-developer-types write queries, period. If they're paying you for data processing and reporting, then provide them with data processing a reporting. If they just want you to host their instances, then charge them accordingly.

    sqlnet-level access arrangements have a tendency to both snowball and become entrenched. Five years ago, my employer (a data processing a reporting shop) gave sql access to a single user at a large customer of long standing to our otherwise web-only application. Five years later, every last user at that customer expects access, and the security requirements are having a severe negative impact on our ability to build out a more robust and flexible network infrastructure.

    Your shop may be able to support query access for your current customer base, but will you be able to do it in five years when you have ten times the customers? What about when you want to, say, start collocating your servers? What happens when a new customer comes on - do you give them their own instance and eat that overhead, or do you give the SQL customer access to a potential competitor's data? Your sales or customer support folks should have to answer all of those questions before they give a green light to the customer.

    --
    hang brain.
  86. Resource Manager by oyenstikker · · Score: 1

    This is precisely why Oracle created Resource Manager. Figure out how much it would cost you to acquire the proper licenses (if you don't already have them), add hardware to handle the added load, and set up and administer the resources. Add your profit markup. Present the cost to the customer.

    If the customer balks, you got your wish. If your customer puts up the money, you make profit. win-win.

    --
    The masses are the crack whores of religion.
  87. How about a business intelligence solution? by IcyHando'Death · · Score: 1

    You might suggest to your management installing some business intelligence software. This would allow your customers to poke around the data in an ad hoc way but without the absolute freedom to create chaos that direct SQL gives. Check out SourceForge for some free alternatives. I like the look of OpenI, but can't claim much knowledge in this area.

  88. views and stored procedures by mytrip · · Score: 1

    have them execute a stored procedure on a view that contains information pertaining to their userid only. stored procedures are like batch files. views can have certain parts of tables but not others (like a virtual table)

    --
    Contrary to popular belief, Unix is user friendly. It just happens to be particular about who it makes friends with.
  89. They are asking for free compute power, say no by Omnifarious · · Score: 1

    Basically they are asking you for an arbitrary amount of computer power whenever they want it, for free. You shouldn't allow this.

    If you provide access to some interface for running SQL queries against databases you host, come up with a way for charging them for the resources those queries take to run. If you don't, you're just asking them to write SQL queries that compute 1 billion digits of Pi.

    Otherwise, work with them to get the data feeds they need to run those queries locally using their own resources. If they're worried about cost have them use MySQL or something like that.

    I repeat, do not allow them to run arbitrary queries without some way of making sure that you aren't providing them with potentially infinite resources for free.

  90. Ways to do it ( relatively ) safely by grassy_knoll · · Score: 1

    Since you're using Oracle, there some ways to prevent access to other parts of the schema and prevent run-on queries from going nuts.

    Create a user for them, specifically for these ad-hoc queries. This user should have no disk quotas on any tablespace, since they're not writing any data. This user should only have the 'Create session' privilege.

    Second, if your customer data is all in big_honkin_schema, create some views for them. Create the views in another schema and grant them select only.

    Third, if you're REALLY worried about them "touching your precious tables"[1] then create them materialized views instead. Might have to adjust disk quotas of course.

    You can also set up user profiles to limit resource consumption ( number of sessions, maximum CPU time, et. al. ).

    [1] Since when did Gollum become a DBA? ;-)

  91. Oracle Application & Reporting Server by Swampcritter · · Score: 2, Interesting

    Coming from an ex-Oracle DBA/Administrator background myself, I recommend setting up something like the Oracle Application Server for external users to access the database in a read-only format. That way, through the web interface, you can limit what tables can be reviewed. You could even go as far as creating certain types of search SQL statements that could be run from the portal as well (i.e. via drop downs, buttons, etc). Depending on your Oracle release, you might also want to look into the Oracle Reports server environment as well.

    Oracle Application Server Overview: http://www.oracle.com/appserver/appserver_family.html
    Oracle Reports Server Overview: http://www.oracle.com/technology/products/reports/index.html

    -- Michael

  92. Only one safe way to do it by m.dillon · · Score: 3, Interesting

    And that is to generate a nightly backup of the database (or even a continuous one-way replication of the database), run it in its own virtual machine, and give the customer access to the backup. It's really that simple. The last thing you want to do is to give the customer direct access to your production database system, no matter what kind of security oracle thinks they can provide it would be a big mistake.

    If money (in the form of ridiculously expensive oracle licenses) is a concern, then just create a daily backup and run the copy in mysql for the customer.

    -Matt

  93. Some simple responses by DaveV1.0 · · Score: 1

    "I am sorry. We can not provide you with that kind access due to SOX compliance issues."

    "I am sorry, but we can not provide you with that access because then we would not be able to provide our customers with the confidentiality they expect."

    "I am sorry, but we can't do that. Doing so would mean we would have to give access to all our clients, some of whom may use that access to spy on their rivals."

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  94. read-only copy by hejish · · Score: 1

    stage the data elsewhere in a read-only copy that is updated daily. Let them paw through that. I do that, and it works well.

  95. Oracle Materialized Views by Nick+Driver · · Score: 1

    You don't really have to set a separate reporting database. Just set up some materialized views and give them read-only access to those views. You can control what you want them to have access to, by way of your select statements in those views, refresh the views on your decided schedules, and since they won;t be hitting the live tables, the performance impact will be lessened.

    You will have to worry about Oracle client licensing for their connection, if you haven't already bought and paid for that.

  96. Build an API by SanityInAnarchy · · Score: 1

    Finally, if you expose the schema to outside users, you are effectively making this your API. If you want to change your schema in the future, you are going to be breaking all of the legacy queries that you customers have written. That's perhaps the biggest issue. Encapsulation 101: Provide an API. You can make it nice and RESTful -- I'd use YAML and/or JSON, but you can make it nice and enterprisey XML. Sit down with the customers and find out what kind of queries they actually want to run, and build an API around that. With any luck, they only need one or two queries anyway, and it'll take less than a day to get them the functionality they really wanted.

    But if you just give them actual, SQL-level access, aside from all the security and performance implications, you're also setting yourself up to be even more rigid than you may already be with respect to schema changes. You shouldn't even be touching the SQL directly yourself, when you can wrap it in an API.

    Now, security and performance... Performance issues can be demonstrated as easily as a 'SELECT * FROM SOME_HUGE_TABLE' -- and you could add a few joins without conditions (or with very broad conditions) to make it even worse.

    Security issues shouldn't need a demonstration. Just calmly point out that most variants of SQL are Turing-complete, and that you're very sorry, but customers are NOT allowed to run executable code on your production server.

    Finally, worst-case, give them a dump of all the data they need, in a format which they can easily import into their own Oracle database. Explain that it's the closest they'll get, unless they want to use your API.
    --
    Don't thank God, thank a doctor!
  97. replicate to another system by UID30 · · Score: 1

    I would never give a customer direct query access to any database critical to the rest of my business.

    A possible solution is to replicate the data tables they need onto a separate physical server that they can hammer all they want. Pass the cost of the server on to them as a one time "setup fee", and away they go with whatever obscene table joins their interns want to write. Additionally charge them for maintaining the extra service ... if they want more they should pay more.

    If you don't want to spring for another oracle license, throw postgres or mysql at the problem.

    If the dataset is small enough, another solution is to simply export data tables to the client and let them expend time and resources importing into their own database system. They can then hammer their database all they want ... and bad queries are the problem of their DBA.

    I'd pull the trigger on your Legal team in either scenario ... just to protect your asse(t)s.

    --
    "Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
  98. From personal experience... by hanshotfirst · · Score: 1

    It seems I've made a career of your question. The first 2 obvious possibilities have been suggested to death already. ("Just say No", and "build a copy for them", but no-one says at whose expense for this new copy).

    I'm going to go out on a limb and guess you are (or will soon be) told "we have to service the customer - find a way."

    Since you are using Oracle, you do have some options to let them in without killing the performance for everyone else.
    1. User profiles... you can limit a particular user(s) and cut them off based on idle time, cpu usage, long-running queries, etc.
    2. Resource manager... when the CPU hits 100% Oracle can automatically start playing traffic cop and let the connections you designate as "important" get most of the CPU time, while your hungry-end-user-hobbitses get reduced to a small percent of CPU time.
    3. What you didn't ask, but stands out... security. Is this ONLY data for this customer... maybe no big deal. Does this database contain data for OTHER customers? If so then you've got some data security to take care of. Virtual Private Database may be useful here, if that is the case. Even if VPD is overkill in your case, the concept of "least privilege" is always good - don't let them see any more data than you are obligated to let them see.
    4. Auditing is a good thing to consider also... log when they come in (via oracle auditing, or with just a logon trigger), log how long their queries run. When the system slows down be able to pinpoint the session that is the culprit. In doing so you may find the real slowdown comes from poorly-written-application-X instead of scary-adhoc-user. 5. Of course, be able to tell if they are killing your system or not. Monitor (Statspack/AWR for starters) when all is well and when there is a problem so you know what "normal" looks like so you don't chase the wrong activity when things slow down.

    --
    Why, oh why, didn't I take the Blue Pill?
    1. Re:From personal experience... by m.dillon · · Score: 1

      Well, in this day and age, storage and cpu is essentially free. In the case of a read-only copy of a database you don't even have to back it up (since its already a copy). The customer clearly doesn't want to have to manage a database themselves, they just want to run queries. So you monetize the request and provide the service.

      The price you charge the customer will have nothing whatsoever to do with the cpu or storage used by the copy, which is essentially nil, and everything to do with the effort it takes you to set it up and manage it, and beyond that you price the service to what the market can bare for the customer's convenience of access. Sounds like a money maker to me, frankly.

      -Matt

  99. Say Yes. by Angostura · · Score: 5, Insightful

    "Absolutely, we would be delighted to provide you with this high-value ad-hoc access system. In order to protect our valuable operational infrastructure this will require the installation of a separate datawarehouse. Provisioning this system will cost $X, the monthly charge for maintenance of the system, the population of the datawarehouse and the provision of secure access will cost $Y"

    The advantage of this approach:

    1. It makes you look helpful and willing to accomodate your customers
    2. It makes it clear what some of the issues are
    3. If you set the values of $X and $Y at the correct values you can generate significant additional revenue for your business
    4. If you set the values of $X and $Y just a little higher, the answer equates to "No".

    Win-Win.

    1. Re:Say Yes. by earnest+murderer · · Score: 1

      Possibly as important, you aren't whining about corruption, down time, or (not so) subtlety implying that their people are idiots or any other form of arrogance.

      In this particular case though, the submitter is completely capable. I'm not sure this is a technical issue at all. I wouldn't be at all suprised if this is more about control over the data in the database, and/or the income that is part of that lack of control.

      It's hard not to file this one away under "bad business model" or "control freak".

      --
      Platform advocacy is like choosing a favorite severely developmentally disabled child.
  100. A DBA is not a CEO, CFO, or CIO by postbigbang · · Score: 1

    You're handing them the keys. You're not allowed to do that. You're obligated to assess the implications and give them to a corporate officer, because you're transferring assets. Really. Don't make this decision on your own. It's your organization's assets and if they're going to be given away, an officer needs to know this.

    Should accessibility be granted, then you need user controls that don't kill your CPU or generate queries from hell. RO access is one thing, sucking data and porting into MySQL or another db is trivial, so be prepared for other strange problems that you customer might try and impose on you. You need to clearly constrain the access, if in a congenial way.

    --
    ---- Teach Peace. It's Cheaper Than War.
  101. Ohh, I know that feeling... by Anonymous Coward · · Score: 0
    We have the exect same problem. If you really want to argue against, I would try:
    • Wrong formatted SQL Statements or Queries generated by reportint tools (e.g. Crystal Reports) can crash, or at leas slow down, the database
    • The database structure is too complicated
    • That way you can't ensure the protection of privacy
    If they still want it:
    1. Give them access to a replicated server/database (to ensure the stability of the production system) AND charge them for this extra service
    2. Ensure they are only using the tools YOU specify. For example: If you want that they only use Crystal Reports, a nice Trigger ensures they're using just that.
    And hey... If the customer is too annoying you still could play BOFH
  102. Not your tables by s4ltyd0g · · Score: 1

    You are correct being concerned about the data. That's why they pay you the big buck no?

    But the tables are not yours. Does the cleaning lady own the phone because she dusts it?

  103. In the UK? Just post it! by tomknight · · Score: 1

    Why not just post them a CD with the database on it. You can always password protect it to keep it safe. I see you work for EDS. Their customers include... http://www.eds.com/about/locations/uk/

    --
    Oh arse
  104. REST by prog-guru · · Score: 1

    I would see if setting up a REST interface might do it for them. It's not the low level SQL access they asked for, but with a library like ActiveResource they can work with it. Ethically, it's not much different for you than exporting a CSV or something.

    --

    chris@xanadu:~$ whatis /.
    /.: nothing appropriate.

  105. Simple solution by lawn.ninja · · Score: 1

    Being a sys admin I know where you are coming from on this. I get weird requests all the time, and most of the time it is because some vendor has been feeding crap in the ears of my user base. Usually most of the time you just have to tell them why it is a bad idea, and also try to speak to them in terms they understand (I.E. overhead costs) Let them know that this will take some of their employees time up, and that is why they pay you for your service. So in essence they are paying for the service twice then. You know by letting their employee fuss about getting the data, writing the queries, etc. Chances are they have some dipshit kid who is running his mouth out of inexperience and telling them that he can do more comprehensive searches and return the results faster if they will cut you out of the loop. usually the money arguement makes sense to them, because it is in fact a good deal of time that their employee can be more productive doing his own job and generating revenue. Remember as an IT folk, you are overhead, they figure you into the cost of doing business. You are less expendable than a FTE and they are paying you for the exact thing they now want to take over. You make a good enough arguement about the money of it and management will always buy it, because profit is the name of the game.

    If they insist on it try the PCI line. Most folks lap that up and just nod their heads in agreement. Then ask them if they need more focused data and better queries. Because this kid probably spit in their ear about saving money let them know the time involved in writing an effective query and how much of it their employees will spend mining all this data. Really to me it sounds like they aren't getting exactly what they need to get, so they think by bringing it in house they will find the data they need. What really needs to happen is you need to sit down with them and get a better idea of their needs and make them feel like you'll go the extra mile and that is why they pay for you to do it.

  106. Scope of Work... by Rogue974 · · Score: 1

    First, I would have to ask, what does your contract/agreement that you have with the customer say? It may be spelled out in there that you will provide them X,Y,Z services but the access they are presently asking for is not covered and not allowed at the price they are currently paying. If it doens't cover it, you have to make a case for why ti doens't cover it and proceed on.

    If they say, well, how much extra will it cost to give us this option that we want, then you figure out how much it will cost to make sure they can not screw you up and give them a new contract to sign for the option they want. If you can not make the data secure on your end where they can not significantly screw your stuff up, then make the price of the contract high enough to cover 10 times (or some reasonable saftey factor) the number of likely incidents they will create. I.E. If you could guess they may screw the stuff up 10 times a year and it would take you 3 days to fix it, then do the math and say, 10 times* 3 Days, * Hourly Rate* 10 (safety factor) and tell them that is the anual cost to have the feature they are asking for. You may also want to include a clause that if they screw up your data base, additional extra charges can be levied at a certain rate to fix it in case they mess it up way more. They want an option, figure out what it is worth to you to give them that option and then make them pay it.

    If you can't make it secure/don't want to, then as someone else said, tell them no, it can't be done and explain it, but that can be difficult. It is usually pretty easy to discourage a customer by saying, not in scope and that will cost a lot of extra money and they will usually say, nevermind.

  107. Exploitable security vulnerabilities by uberdilligaff · · Score: 2, Insightful

    We don't allow any end-user accounts of any kind on our primary database servers for a number of reasons, but one of the important ones is that a significant number of vulnerabilities that have surfaced for Oracle involve privilege escalation. Many require that a user have the ability to log in to the database before they can exploit the vulnerability. Keeping the unwashed masses out of your database is a good idea, if you'd like it to remain your database.

    --
    Against stupidity, the Gods themselves contend in vain. --Friederich Schiller
  108. KB3NZQ by KB3NZQ · · Score: 1

    if your boss really wants this he should then by you a new server and setup a read only DB on that server all at his expence

  109. heh by B3ryllium · · Score: 1

    Well, if you don't want to just outright say no, you could make up a fake excuse.

    "Someone else was stupid once, and ruined it for everyone, and now we have a policy not to allow access to anyone."

  110. Give them a reporting interface by Anonymous Coward · · Score: 0


    Use something like BI Publisher, or other reporting tools that come with the Oracle Database.

    Or, make an APEX application from the data that you want them to be able to see. APEX apps take almost no time to create.

    Create an account for them that only gives them access to their data. They will only see data that they have access to.

    Realistically, if you want to make your own life a lot easier - give them self-serv access. It will make you better able to focus on other, more important things.

  111. How To Do It by porkface · · Score: 4, Insightful

    The business rule here is:

    "This is a complex Oracle database, and yes, even read-only access can cause major problems. These problems are prevented by accessing the data through the approved application.

    If you would like full query access, you will need to provide an Oracle-trained staff member to perform that work. And even then, all warranties on the system are off.

    Our preferred solution to your business requirements in this case is for you to submit queries for approval and/or integration into the front-end application. If there are strict deadlines involved, please let us know and we can try to accommodate those.

    Please understand this isn't an issue of control, but simply of us trying to maintain a high level of quality of service. It may seem like read-only access is safe, but it is not. If you would like further clarification of this reasoning, please contact us and we would be happy to arrange a presentation."

    If they want a presentation, you show them how poor queries can crash the database or cause unacceptable performance problems and misunderstood results.

  112. Make $$$ by Anonymous Coward · · Score: 0

    If the customers have $$$, get them to fund a web application that does ad hoc queries based on user selection of tables, columns, and values entered in a nice HTML form.
    You build the queries dynamically. You control access to which tables and columns users can base their queries on, including select lists for allowed values.
    That way you make some $$$ and satisfy your users. Everybody wins as long as the application you deliver is a good one. Make sure to include the ability to save queries (public and/or private).

    1. Re:Make $$$ by argent · · Score: 1

      Like, say, the display class in DIO or Speedtables. :)

      Disclaimer: I based STDisplay on DIODisplay. :)

  113. Restrict Keywords by curmudgeon99 · · Score: 1

    I have faced this type of requirement too. Either create a schema that has read-only rights or strictly filter out keywords and other troublesome things such as --, TRUNC, DELETE, etc. Good luck!

  114. say no, without saying no by Anonymous Coward · · Score: 0

    you should never give access to run adhoc queries on a live production transaction based system without expecting severe producution performance problems. that in itself should be a winner argument. however they are your customer so try to identify what their true business requirement is. offer to give them more complete automated data feeds that you control which they can load into their sql server database. offer to provide them an additional reporting database, for more money, that has a snapshot of production data. essentially that is what their own sql server is supposed to be for, but apparently for some reason its not meeting their needs.

  115. Allow them to download the raw data by Anonymous Coward · · Score: 0

    I'm currently on the other side of this problem. We utilize a 3rd party service to collect metrics on visitors to our website. The interface we have to query the data stinks. Any request for custom reports cost extra money, take a long time and are bound to be error prone. We have the capacity to replicate the data on our own dataservers, but the provider does not offer us the option of downloading the raw data. The should do this for us, and you should do it for your customer.

    Don't tell your customer no; find a way to meet their needs without compromising the integrity of your platform. That's how a good service business is run.

  116. The response should be second nature to you by petes_PoV · · Score: 1
    Given the email address you posted from, it should be ingrained into your psyche that anything new like this has a cost attached. Just work out your worst-case costing for this change and tell them "if you want this access, it'll cost $X".

    If they still want it, you just didn't propose a high enough cost. Double it and try again.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  117. There is a term for it that I can't think of. by DRAGONWEEZEL · · Score: 1

    It's not shadowing, but similar, where you work on a subset of the data (a subset that consists of the whole dataset, essentially a replication, but not in real time)

    GOD the name escaping is killing me. DB was SO long ago. Anyone?

    --
    How much is your data worth? Back it up now.
  118. Just Who's Data is It? by Nom+du+Keyboard · · Score: 2, Insightful
    I see it as a question of just who's data is this?

    Is it the customer's data (and how do you plan to keep one customer out of another competitor's data of they both have this access?) in the first place and you're just storing it for them? If so, then there's a strong case that they should be allowed access to their own data.

    Or is it your company's data that you provide to them on request? In that case they have no rights to anything beyond what you're already providing to them.

    --
    "It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
    1. Re:Just Who's Data is It? by filterban · · Score: 1
      Is it the customer's data (and how do you plan to keep one customer out of another competitor's data of they both have this access?) in the first place and you're just storing it for them? If so, then there's a strong case that they should be allowed access to their own data.

      In many cases, this isn't valid. If your database contains sensitive information, such as credit card numbers, email addresses, or passwords (even if they are encrypted), allowing a user access to it will give them the ability to either view the information or hack your encryption scheme and view the sensitive data.

      Granting users access to a database is a request. Treat it like any other request. Some of the costs/issues that I can see right off the bat:
      1. New hardware for replicating data to a new optimized DB
      2. New process to scrub sensitive data
      3. Resource restrictions for user so they can't kill the box
      4. The simple fact that the user most likely doesn't understand the schema design, so their queries are not likely to be accurate (for example, they may not know to exclude rows with ACTIVE = 0)
      5. If a schema change occurs, their queries will no longer work
      Generally speaking, these types of requests - where the user defines the solution with no technical consultation - end up with a result that is unsatisfactory for them and for IS. Most likely they're trying to solve a problem but you don't know what that problem is.

      You need to meet with the person requesting this and find out the root cause of what they're trying to solve and present a solution. Read only access might be the best solution, but most likely it is not.
      --
      rm -rf /
    2. Re:Just Who's Data is It? by Anonymous Coward · · Score: 0

      Customer data or not, chances are that the organization of their data in your database is work product that they have not purchased. So, you're happy to return the data in tables to them, but access to your database is not something to which they are entitled.

  119. use an ORM by Anonymous Coward · · Score: 0

    Just allow them to specify the WHERE condition, validate it using regular expressions, determine which tables are involved, build the full select on your end and use in a nested select that does pagination so that no more than a fixed number of records are selected. Expose only this API function. Alternatively, log all the queries and write a contract that says you terminate their contract and they owe damages if they screw up.

  120. Why do you REALLY not want them to do it? by BitZtream · · Score: 3, Insightful

    Oracle is more than capable of dealing with this situation.

    You use a combination of views custom to their needs and access restrictions on tables to ensure they only see their data.

    You don't grant them any permission to write to any table or view.

    You configure their user so it can't starve the system of resources so they can't disrupt everyone else that uses the system.

    Oracle is made for this sort of thing. If you were talking about MySQL or PostgreSQL, it'd be a little different as they aren't nearly as mature.

    Being able to configure Oracle to do this stuff is why you get to be called a 'DBA', since you know, DBAs administer DBs.

    Now ... figure out the real reasons you don't want them to have access to the database and make your case based around that, if you have one. Don't try to BS your way out of it with a 'its insecure' or 'its dangerous' excuse, cause in those cases the fault lies in you, and they may very well have a DBA that can point that out. If you want to use those excuses, you shouldn't have used an enterprise class RDBMS that has been capable of dealing with these requests for years.

    Theres a reason Oracle costs a fortune and people still use it over open source alternatives, its MADE for these sort of problems.

    If you don't want them wasting your CPU power for their queries, thats a fine reason. What are they willing to pay to get special access to the data? Its going to cost you time and energy to create a user for the database that has proper permissions, they definately need to pay for that.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  121. cut 'em loose by fred+fleenblat · · Score: 1

    I'd say it's probably time for the customer to just manage their own data. If they want access now, they'll want control soon. Unless this is your only customer you need to cut them loose. In the long run everyone will be happier with that.

  122. My reply ... by Anonymous Coward · · Score: 0

    (I'm not a lawyer, but I envision the conversation going something like this...)

    "Sure, I can open up the database for you.

    But if I open up the database to you, please understand that it poses a massive security risk, and I advise you against requesting that I do this. If you compel me to make the data available, you will no longer be able to hold me responsible for data which are copied, stolen, corrupted, or rendered inaccessible by any means, including unanticipated malicious attacks or by your own incompetence. Also, please be aware that I reserve the right to bill you for any expenses that may be incurred if your actions or the actions of others render the data inaccessible or corrupt.

    Please sign here to indicate your acceptance of these criteria."

  123. Um... Security by deets101 · · Score: 1

    If the customer is an outside customer and access the DB over the internet, then why would you allow access. Either you will need to create a login (with VPN, etc) for your network or open ports to a DB server. Hint, option 2 is real bad! Tell them security standards don't allow for this. I would not even ask or entertain the idea of opening up the firewall for this. That is a disaster waiting to happen. If you do allow this, be ready to hear about yourself on the news for customer information leaks, etc. You know, the kind of story you hear and think to yourself... "What a dumbass, I would hate to be in his shoes! What was he thinking?"

    --

    --
    My parents went to Slashdot and all I got was this lousy sig.
  124. Couple of questions by Arimus · · Score: 1

    1) Who owns the data in the database? If it is just that customer then why shouldn't they have access?

    2) Are they aware of the potential performance hit if they screw a query up on the production server? If so and they accept the risk then let them...

    3) Do they want read only access? If so why not provide an access to a shadow database via odbc - explain that the data is, say 24 hours out of sync, with the live system and let them play in what's effectively become their sandbox (IE put the shadow database on a seperate server, do not allow access other than for mirroring from the production server, do not allow any acess from the shadow server to other parts of your network, restrict heavily what they can do to the minimum they need)...

    4) Is there a risk that by gaining knowledge of the internals of the database etc that they could over time stop outsourcing their database needs? if so tell your boss that, if they will see proprietry schema's etc which are your companies IPR then tell him that etc...

    --
    --- Users are like bacteria -> Each one causing a thousand tiny crises until the host finally gives up and dies.
  125. Give them what they want - not what you don't want by Anonymous Coward · · Score: 0

    Yeah, that happens all the time. You get 2 marketing folks that typed a SQL statement once in their life and think they can do your job better than you. Ignore the veiled insult and give them what they want (they'll come back crawling for help later).

    1. Ideally, if you provide them with an OLAP system with enough dimensions and drill-down abilities, you might find that... they don't need SQL access anymore.
    2. They ask for it, ok: replicate the damn thing! They get access to the replicated database and can run whatever the hell they want. Put that on a separate server so if some douche runs a horrible query it doesn't ruin your primary server and voila: no worries about bad stuff happening and you're really giving them what they're asking for, though arguably, I'd still say I prefer and always implemented #1 myself and mostly avoided giving them #2

  126. You need a defined interface by emm-tee · · Score: 1

    You need a defined interface with your customer. It's like an API. So they know what to expect from you and you know what to expect from them.

    If you have a high level interface which the customer can access (this could even mean email), then you are at liberty to, for example, change the structure of your database to make it more efficient. The customer doesn't need to know.

    If you expose the contents of the database, you're no longer at liberty to change it when you want. Any changes you do make will impact the customer, requiring justification and *support*.

    This might be bad for both you and the customer in the long run.

    Maybe you could *for an additional fee* provide another way to access the data for custom queries? This could be copying/transforming it into another database which you can give them.

  127. Views by AcerbusNoir · · Score: 1

    You could find out exactly what the user needs and set up views accordingly and give them permission to only access those views

    1. Re:Views by Specks · · Score: 1

      Bingo! A view can be set up for that.

      --
      Specks
      Batteries not included
  128. The database is valuable by Anonymous Coward · · Score: 2, Insightful

    If the database is very interesting than you are putting your self a risk by giving unrestricted access to the database. A client could easily download the entire database and make their own. This creates the risk of duplicate data as well as giving the database to potential competitors if a client was to defect.

    1. Re: The database is valuable by mcvos · · Score: 1

      If the database is very interesting than you are putting your self a risk by giving unrestricted access to the database. A client could easily download the entire database and make their own. This creates the risk of duplicate data as well as giving the database to potential competitors if a client was to defect. But if it's the client's own data that's in the database, shouldn't they be free to move that data to a competitor when the OP's company is unable or unwilling to give the client exactly what it needs?

      This is one of the big selling points of open source: "If you don't like us, you're always free to go to our competitors."
  129. Don't be arrogant by Toonol · · Score: 1

    Where I work, we are hampered by half-assed pregenerated reports and wonky query tools. This becomes a major time-waster. I've sat through ridiculous training classes of report generation tools just to get a negative answer to the question: "Does this let you access and edit the generated SQL?". A negative answer means the tool is basically worthless.

    Finally, I got access to telnet in to the box that holds the database, and ability to run queries (and SAS). This finally allows us to analyze data without horrendous lag times, and actually makes the db admin's job much easier. You can set permissions so they can't overwrite data. Don't be overprotective.

    1. Re:Don't be arrogant by thePowerOfGrayskull · · Score: 1

      You can set permissions so they can't overwrite data. Don't be overprotective

      ... until the first time some idiot types this on a multi-million record table:

      select table1.somefield, table2.somefield, table3.somefield from table1, table2, table3

  130. Quote them an enormous fee for this service by OmniGeek · · Score: 1

    Preferably, a fee large enough that if they pay it, you can afford to replicate your database in a sandbox for them to screw up at leisure.

    I'll echo the other posts warning about Data Protection Act and server loading issues, and add the concern of unauthorized access to the database and/or third-party attacks on it.

    --

    "My strength is as the strength of ten men, for I am wired to the eyeballs on espresso."
  131. Isn't this exactly what a database view is for? by TheDan666 · · Score: 1

    I agree that in general I would not like to do this sort of thing. But if you absolutely have to do this just create a view of the data they need. It restricts their access and is by definition read only. --The Dan

  132. it's called OPERATIONAL RISK by Anonymous Coward · · Score: 0

    the problem is called "Operational Risk" rather than 'because you are stupid' and that's a completely valid accepted reason.
    How much do they know about your database layout anyway? How much time will you be spending explaining 'what's in table ??' or 'what does that field mean?' Who will pay for that time?
    At worst create a few views for them with proper access control and with reasonable indexing so whatever they hit the views with can't bring the dataserver to its knees.

  133. Re:A simple suggestion - data can be dangerous! by romango · · Score: 4, Insightful

    If the customer does not understand the structure of the data, they can get bad answers that are disastrous. What if the data has the same amount under several categories and the customer decides to add all the categories together to get a total and then makes a business decision based on that answer? I've seen it happen!

  134. Read other peoples posts people. by Sir_Lewk · · Score: 1

    There are so many fucking repetitive replies on this post it's sickening.

    --
    "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
  135. It's not a bug it's a feature! by CompCons · · Score: 1

    There is a very simple argument against giving them direct access to your internal database. Presumably they are going to be writing queries and running reports which that are going to want to run often. Once they have spent this time creating queries and formatting reports based on your tables who is responsible to update them when you make schema changes to your database? It would be MUCH better to provide a secondary database which at first might simply be a replication of your database. This gives you the flexibility to change your schema for your database without breaking any of the queries or reports they have spent alot of time and money creating. This is a very effective argument becuase it shows them how NOT querying your database directly is actually beneficial to them. Telling them or your boss no is a bad idea. Showing them a better solution to thier problem is a good idea and will be much more likely to meet with success. Don't present it as a limitation, present it as a benefit.

  136. Reason: schema evolution by Anonymous Coward · · Score: 0

    They'll want read only access for simple reports..then they'll start integrating their systems with yours and expect you to retain your current DB schema forever.

    A customer of ours supplies software to the large TV networks and they've insisted on direct access to our customers underlying DB. Guess what? Our customer's hands are now tied since any changes they make will break their customers queries...even though they wanted the upgrades in the first place!

  137. Tell them this by Anonymous Coward · · Score: 0

    Just tell them that 9/11 changed everything and that's why they can't get access.

  138. Transfer of responsibility by etully · · Score: 1

    This is a standard contract issue.

    As long as you have put your [ database | web server | automobile | children ] in my care, I am 100% responsible for its safety.

    You may have your [ database | web server | automobile | children ] back at any time. At that moment, I relinquish all responsibility and will not be held liable for any damage that results. You agree to accept full responsibility for its safety.

    If you take over responsibility and then wish to return control to me, I will charge $150 an hour to inspect and verify the integrity of the database that is being returned to my care. I may refuse to assume responsibility for the database being returned to me if it has been altered in any way.

  139. Use a reporting tool by pondlife · · Score: 2, Insightful

    It sounds like you need to look into a reporting tool: Business Objects, MS Reporting Services, whatever. Copy/replicate the data to a separate server to keep the users away from production, and then let them do what they like on there.

    There are good reporting tools that be web-based, write the SQL for them, detect and prevent cross joins, handle logical security (client X can't see client's Y data etc.), use intelligent caching, export to Excel/CSV/PDF etc.

    It may not be the easiest or cheapest thing to set up, but on the other hand it will probably be a lot more reliable and smarter than anything you can hack together yourself. And since you're providing an additional service to your customers, you can bill them for it.

    --pondlife

  140. Say "no", and if that doesn't work... by Fallen+Kell · · Score: 1

    ... if "no" simply does not work, discuss the costs of creating and maintaining a replication server which their custom queries will run so that none of their queries will affect the stability and performance of your main production database.

    --
    We were all warned a long time ago that MS products sucked, remember the Magic 8 Ball said, "Outlook not so good"
  141. Who owns the data? by Jason+Levine · · Score: 1

    My first question would be: Who owns the data? If it is the customer's data and just your systems holding it, then there's no problem (barring that systems are put in place to keep a badly written READ call from bringing down everyone's systems). If it is your company's data and they are just paying for access to it, then giving them direct Read control is essentially giving them a copy of the database. I would wager that, if the latter situation is the case, your company views their database as an important asset and having a client download the entire thing would make management queasy.

    --
    My sci-fi novel, Ghost Thief, is now available from Amazon.com.
  142. Professional Responsibility, It's not just theory! by DRAGONWEEZEL · · Score: 2, Insightful

    It's your job to inform your manager whether or not it's a good or a bad Idea to do whatever new someone wants to do w/in your sphere of influence.

    Also while some advocate "just say no." It doesn't work for drugs, and it won't do squat for a client. Especially a mildly informed client that thinks (but thinks they "KNOW") damn near anything in software can be achieved w/ some effort. (IMHO it can) If you take that route, at least show them how it would be less economical.

    For instance, a client just last night wanted 75G of data recovered to be burned to DVD. I wasn't going to go buy a column of dvds, and swap disks all night, while trying to divide it up all pretty. so I said no problem, 4 hrs at 75$/hr, or you can go buy an external drive at costco for 150$ and I'll do this for 1 hr @ $75/hr saving you $75 dollars.
    It wasn't too long before he said "I'll drop the external drive off on Monday."

    There's tons of reasons to do something or not, but if you send it out to Management in these terms, you'll have the best response.
    1. Economics
    2. Your Liability
    3. Decreased (or for a positive, Increased) RVU (more time taken to do less work)
    4. Their Liabilty
    5. Their increased/decreased RVU
    6. Solve the problem, and make sure you make money off of it. Tell your boss that they should front the cost for a project for you to build a shadow server for them to work on. Think how much it'd cost to set it up, make it functional, then support it for 5 years. Write it out as a $ figure, and propose it. Become your own vender, sit the server at clients site, hope their bandwidth costs for shadowing the data is not too high, and reap in the $

    --
    How much is your data worth? Back it up now.
  143. I'll lay this out for you by Gewalt · · Score: 1

    Step 1. Learn how to DBA
    Step 2. Learn how to write a service contract
    Step 3. Learn how to recognize a sales opportunity.

    It is rather apparent from your summary that you have not yet mastered any of the above three steps. At this point, "I" would recommend to your customer that they seek services from another firm.

    --
    Modding Trolls +1 inciteful since 1999
    1. Re:I'll lay this out for you by Gewalt · · Score: 1

      Also: Tagged - urdoingitwrong

      --
      Modding Trolls +1 inciteful since 1999
  144. Common problem by yomahz · · Score: 1

    This is a pretty common problem. I'd suggest picking up a good book on (**** warning, buzzwords incomming****) SOA/ESB solutions. There are plenty of good, proven patterns to help solve this problem.

    Here's a good start:

    http://books.google.com/books?id=dH9zp14-1KYC
    http://manning.com/rademakers/

    --
    "A mind is a terrible thing to taste."
  145. Win either way by Anonymous Coward · · Score: 0

    Point out the staggering number of security vulnerabilities Oracle has fixed, has not yet fixed and is likely to discover as a reason for not permitting remote access via TNS. Demonstrate how simple it is to cripple an Oracle database with a couple of cartesian joins.

    Work up a proposal to establish a read-only replica + isolated subnet + secure VPN to address the above problems. If the cost doesn't shut them down you end up with shiny new hardware.

    Don't use phrases like "my precious tables". You sound like a dork.

  146. HOW are they accessing it? Internet? by Anonymous Coward · · Score: 0

    I think everyone is looking at it like DBAs... think of it like a sysadmin/network admin for a second.

    HOW is this company going to access the server directly? Are you going to hand the oracle server's a55 out onto the internet directly? Are they going to use a secure VPN tunnel? Do you have the hardware for the VPN?

    I think the bigger question (and better answer for MGMT) is HOW would they get access if they are not physically on location, as otherwise you are opening gaping security holes, let alone what level of access they have on the DB.

    Hopefully this gets modded up rather than down.

  147. Reporting DB by thePowerOfGrayskull · · Score: 1

    The common solution for that kind of dilemma is to create a read-only copy of the DB, refreshed from actual data nightly, which the customer has access to. This will allow you run it either on a separate box entirely; or at minimum set a max on the CPU(s) allocated to this new DB -- so that your production app doesn't fall to its knees the first time some ninny performs a Cartesian join.

  148. Premium service by Col.+Klink+(retired) · · Score: 1

    Make it available as a premium service and charge for CPU usage. If they write a screwy runaway query, you can retire early!

    --

    -- Don't Tase me, bro!

  149. Just Say No. by DraKKon · · Score: 1

    It's just a part of your Business Rules that only internal DBAs are allowed to run queries against the database.

    --
    "It's not like your minds are as open as the source you love..." - Me to the majority of Slashdot.
  150. There is a way to do this safely by Anonymous Coward · · Score: 0

    Firstoff, I agree that the client shouldn't get direct access to the database server. They probably will mess things up. One way to get around this is with realtime data replication. There is software, among other people by Datamirror (ask Wikipedia) that does realtime database replication and transformation. This means that you can duplicate only those tables/columns you want and even manipulate data as it's being replicated. Nifty stuff. You could set this up between your live server and a secondary server for the customer. The upshot of this would be that the customer can fool around on the secondary server, see only what you want him to see and if it crashes the server won't take your business with it.

    Hope this helps,
      Coward 312-213

  151. You wrote... by rickb928 · · Score: 1

    "they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without consulting us"

    You meant...

    "they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without PAYING us".

    There, fixed that for ya.

    Now it's all clear to me. I've had clients like this. Write them an ad-hoc report generator, bill them accordingly. This should take a year at least, to get their requirements and meet the 19th version of the requirements some time in November. Then you should get them to sign off on the final version by next March or so.

    I suppose you could expand the Web gizmo to allow more than 15 fields, but where's the fun in that?

    Alternatively, you could farm this out to an Elbonian consulting firm and take a cut.

    I'm so glad I don't do that any more. Made me feel dirty charging clients for their own data. My former boss is in real estate now, for somewhat obvious reasons...

    --
    deleting the extra space after periods so i can stay relevant, yeah.
  152. Application Express / Discoverer by DuLuX · · Score: 1

    I'd recommend using Application Express (used to be called html_db) / Discoverer. Create the reports they need - and give them access to that. It's web based, you can tune the query and you can even schedule it to repopulate the cache on a daily or hourly basis etc. Might also want to look at using Oracle Portal too if you have multiple clients that you want to do it for. The less people with direct access to your database the better!

  153. Pay for play by Anonymous Coward · · Score: 0

    Respond with an offer for daily/weekly/monthly cleansed extracts. Give them the possible fields you would let them have, ask them to tell you which they want and write and SQL extract script to make the dump, compress it andemail it to them for $XXX.00 per extract. If you REALLY want to be helpful, import the extract into a read only MySQL hosted on a locked down linux box that only allows connections from their IP with a specific userid. Tell them the SLA is whatever they want to pay for. If they don't want to pay, they don't get to play.

  154. DB2 could handle it... by quarkomatic · · Score: 1

    IBM's DB2 has a feature that can estimate the cost of a query. DB2 Query Patroller takes advantage of this feature and allows you to define rules such that expensive queries against your database can be rejected, given lower priority, or scheduled for a later time, for example.

    I know you're using Oracle, but perhaps it supports something similar?

  155. My precious tables by thewiz · · Score: 1

    How would you advice me to keep my customer away from my precious tables?

    Your real name wouldn't happen to be SmeeQL, would it?
    --
    If "disco" means "I learn" in Latin, does "discothèque" mean "I learn technology"?
  156. Give them views.... by Anonymous Coward · · Score: 0

    And create a consumer group limiting their impact to the overall functioning of the data store... Under no circumstances can they access base tables (unless you implement virtual private databases). With views, you don't have to worry about malformed joins, or peeking at data they shouldn't be able to see....

  157. Here's how to do what they want by marhar · · Score: 1

    - install a new oracle on a dedicated box. If there data set is small, you can do it for free with XE (express edition). If not, you will have to pay $750 (list price) for SE1 (standard edition one).

    - set up oracle replication so that you publish changes from the main server to the new server

    - do these tables have data for multiple customers? If so, create views to filter other customers out. From your description it sounds like this customer has its own dedicated schema, so that's not a problem.

    - make the schema read-only.

    - turn on auditing so you can keep a log of their queries. This will be quite useful to them!

    - disclaim that the internal table structure may change. If they want some guarantees regarding the table structure, that can be taken into account with the views.

    The nice thing is that (a) you can charge for all this, and (b) it makes the customer happy. I imagine they want to do excel query directly on the tables, so you can imagine this would make their life a lot easier.

    Gratuitous career advice... drop the BOFH attitude, instead think of how you can make an awesome environment for your customers.

  158. Operational Hazard by JoelMartinez · · Score: 1

    just because they have readonly access, doesn't mean they can't bring down your system. I mean, what if they write a bad query that joins incorrectly and produces a huge cartesian join. not only that, but if there's more than one customer's data in there, what's the stop them from querying other client's records. maybe one way is to give them a page on a web server that would scrub their sql queries, and maybe append something like "and customerid=blah"

  159. If it's 'their' database, why not RO access? by samalex01 · · Score: 1

    I've actually been on the customer side of this debate MANY times, and I always think if at all possible the customer should have read only access to the database containing their data if at all possible. You say you frown on the idea of customers getting directly into the database, but if it's a properly setup relational database and you have a decent schema or layout, even if technical and not for lay persons, that's all most folks need, even if you provide it 'as-is'. In today's world, you'd be surprised how many folks have database experience in small offices or how many offices have resources to help them get the data they need if given the ability. Becuase no matter what tools you provide, someone within the company will always ask for data the canned report writers can not provide.... and charging for custom reports when there IS someone within the office who's DB savvy enough to create the reports they need just seems a rip-off. so my post might not give you want you're wanting ot hear, but if at all possible, grant read only access on an as-is basis if it's technically possible.

  160. Encapsulation by gdshaw · · Score: 1

    The strongest technical argument I can think of is that this breaks encapsulation: you are exposing your internal data structures to your customer, which could make it much more difficult to change them in the future should this be necessary.

  161. infinite interface by roaddemon · · Score: 2, Interesting

    My biggest problem with this is that if you give them unfettered access to your database, everything in it becomes an interface you need to support. If they build applications around that data, you can't even change a column name without (potentially) breaking their application. If you give them access to a small subset of tables, there is a smaller interface you need to support.

    This is actually my favorite reason for using stored procedures (yes, above performance and security). It's a clear interface definition. Don't break the procedures and you're fine. If there is ad hoc sql running against your database, your interface is basically infinite.

    1. Re:infinite interface by slashname3 · · Score: 1

      Good points but easily covered by having the customer acknowledge that structures may change with out notice and that you are not responsible for backward compatibility with ad hoc reports/process that they may have created.

      Of course it would be good practice to notify the customer when you do plan on changing such things just to keep them happy. And after about 10 or 20 changes that require the customer to rebuild their own application they may revert to using the interface you originally provided.

      Of course the real question that should be asked is what is the interface you have provided lacking that requires the customer to write ad hoc reports themselves? If you get that sorted out you can improve your interface to cover the problem the customer is trying to get around.

  162. Use privacy laws and/or confidentiality by Sedennial · · Score: 1

    You may not be able to justify completely excluding them. However, if you have any data that could in any way be linked to specific individuals, you may be able to achieve your goals by putting onerous liability requirements. Require them to sign a 'transfer of risk or liability' contract or form in which they assume liability and responsibility for any financial or criminal data breach, leakage, etc. Also can you require signed confidentiality or legal contract form each employee who will be accessing the data. Tell them you will happily give access but each individual will have their own unique username and password for auditing and issue tracking purposes, and write in the contract that sharing these passwords will result in revocation of priviliges. Possibly modify your contract or financial relationship to include billing for additional issues resulting from 'I tried this query and now the database isn't responding for anytone'. If you turn the issue around in such a way that their managers or company has to carry the financial impact, you will at least be able to minimize the number of people who have access to the data.

  163. Run-away queries by Tablizer · · Score: 1

    Views still don't necessarily limit run-away queries. If some kind of time limit cannot be put on them, then perhaps considered creating say 3 views: one that requires a date range, with a max range of 1 month (checked with triggers), another that requires a specific product category, and another requires a specific location. That way you know they are using at least one indexed column (date, product category, or location). You may have to create a set of these for say sales transactions and product catalog. Thus, the sales transaction view would have about 3 views and the product view would also have about 3 views, each one based on a required parameter for an indexed column.

  164. Umm, MySQL - save money give them a slave by Anonymous Coward · · Score: 0

    Stop paying Oracle, use MySQL, setup a dedicated slave for the client to abuse. end of story.

  165. Restrict access and resources then give it to them by tehaynes · · Score: 1

    Limit their account to read only. Give it access to specific tables and, if possible, specific columns. Using quotas (or the proc resource equivelent), limit the amount of CPU time their queries are given. Also, add a max query time to the account so they can tie up the DB with a lot of slow queries. Then, track resource usage by the user account so you can decide as things progress how efficient your rules are or are not.

  166. ChezGear by ChezGear · · Score: 1

    To quote Nancy Reagan, "Just say NO!" Seriously, your files are proprietary and private. If you could find a dummy Excel file that you could send them, that might help them and would certainly save you. If you don't have an old dummy file for them, maybe you could hire a data entry temp to create on or look online.

  167. Get over it! by slashname3 · · Score: 1

    Seriously, get over it. What is the problem with a customer accessing customer data in a database? Provide read only access along with the table schema so they know what to query for and call it done.

    The only problem you need to watch is to make sure they don't cause performance problems on your server with huge convoluted queries. If that is a problem then you limit them to certain times of the day/week when the load is lighter.

    I have worked on several projects where the application we wrote utilized a database. In all cases a document describing the schema was made available so the customer could generate reports as needed.

  168. security by equex · · Score: 0

    we had the exact same situation here at the company i work for. the one who stopped it was our network admin that refused for obvious security reasons to open any path to the databases for external traffic. and that stuck. cheers

    --
    Can I light a sig ?
  169. The new paradigm... by dogdick · · Score: 1

    I like to stick with the new paradigm in data management:
    STITT
    Which stands for: Stab them in the throat.
    Its your DB, make 'em back off.

  170. pain, loads of pain... by gbh1935 · · Score: 1

    worst case.... make a shadow database and create some very restrictive views.... best case, create a webservice where they can get the data to load into their own database to play with.

  171. Create a VIEW by hAckz0r · · Score: 1

    Just create a read only VIEW that limits them to what records and columns they should be allowed to access and let them replicate the results to their own server for playing around with. Optionally you can create a stored procedure to track what they are looking at, limit the number of times per day, or even time of the day when they have access to that data. In fact, why not just hook the stored procedure into paypal so they can make a direct payment to your company each time they hit your database! That should at least make them a little more thoughtful about beating on your database too hard.

  172. It may be your tables but it's their data... by fitten · · Score: 1

    I understand that you may want to keep them from doing queries with 19 table joins (yes, I've seen that before) and such, giving your database machines performance issues but remember, it's their data... the next thing they may be asking you for is complete backups/dumps of the data (so they can use machines/services where they can do their queries), but that may be OK for you, too.

  173. Do you have a good reason? by magisterx · · Score: 1

    The real question is do you have a good reason not to give the customer what they want?



    IF you do(concern for performance, concerns about amateurs misinterpreting data, bandwidth since they will have to come in from outside the LAN, concern they will copy everything and then no longer need your company's services...) then express it concisely and it should be no problem. If you have no concern that you can express, then you should probably give it to them.

    In fact, it is generally a good rule of them to give the customer what they want if the request is reasonable. So I would go a step further and say that even if you have reasonable concerns, you should look at ways of addressing or mitigating them and proposing those to management too. For instance, if your concern is bringing the server's performance down, perhaps set up replication to another server dedicated to the customer (with the customer providing the money for this additional service and its costs of course). If your concern is misinterpretation, that can be **Partially** mitigated with good documentation, which you probably should have anyway. If the concern is accessing proprietary information, use proper security so they cannot, or to be even more paranoid give them access to only a replicated server which will only have the information they are allowed to have.

  174. License restrictions? by Just_Another · · Score: 2, Insightful

    What about your license with Oracle? Will that allow such access? Their licenses tend to be restrictive about this type of thing.

  175. Find a way to give the customer a choice. by Presence1 · · Score: 1

    A friend gave me a piece of advice that has served me very well. He said to "never say NO, always give the customer a choice".

    In this case, many posters have already pointed out the obvious problems with security of their and other customers' data on the main server, and the problems with badly formed queries trashing your performance.

    But, instead of saying "no you cannot acess the main server to enter your queries", tell them that you understand their need, explain the issues, provide options X, Y, and Z to meet their need, and provide rough costs and schedules for each. (Of course, none of these options involve actually running queries on the main server.)

    The options might inclulde setting up a replica reporting-only server in your data center, shipping the data to them periodically (assuming that is reasonable based on data ownership, size, available transfer techniques, etc.), and/or setting up a replica reporting-only server in their site. Of course, you'll come up with better options since you know the business and the customer, but the core idea is find a solution and bring it to them.

    The customer may not like the costs or the schedule, but they are much more likely to remain your customer than if you just said "NO". The best case is that they buy one of your solutions, which is a win for everyone.

  176. SOAP / XML Data Service by alc277 · · Score: 1

    Just setup a secure SOAP or XML data service. They can get live data from the server, and you can put limits in the queries to protect your servers from melting.

  177. Bad Attitude by bokmann · · Score: 1

    It might be 'your database', but it sounds like it the 'their data'. Give it to them. Whats wrong with read-only access? My guess is it boils down to fear of:

    a) working yourself out of a job. Why would they need you as the bitkeeper if they can write their own queries.

    or

    b) someone who knows better might tell you why your schema sucks.

    In either csse, sharing the data might be a hard thing to do, but is in your long-term best interests... do you want to be maintaining reports forever? If you are designing a lousy database, wouldn't you want the education to do it right?

  178. Help your customer get what they really want by alwillia · · Score: 1

    I think your customer has a legitimate need, which is to be able to get answers out of data that you store and manage for them. Although your customer thinks direct access is the best solution to get these answers, it may not really help them because non-DBA users often don't understand the database structure or the SQL syntax that's necessary to make use of the data.

    I'm with Kirix, and we currently have a similar situation with one of our clients: they have a backend database that they don't want their users to access, but their end-users want the ability to do ad-hoc analysis on the data.

    Our solution was to set up a nightly job to extract out relevant portions of the data into CSV files and post them to a secure website. The users can then open the CSVs directly by clicking on their hyperlinks in Kirix Strata, and then manipulate them directly any way they want with a simple interface. As a result, 1) the users get what they really need, which is the ability to do ad-hoc reporting on the data, 2) the database remains secure, and 3) the solution is easy to extend by making additional data available via new hyperlinks on the secure website.

    In your case, this may work well, as long as the individual data tables you post are reasonably sized (less than 1 million records).

  179. NS by flibuste · · Score: 1

    A simple and good reason for not allowing everyone to run SQL on your database would be that a badly formed query can bring down your database to its knees. Which, from what you've described would rather impair your business.
    I hope this will help convince your managers to choose between "restricted access" and "no access anyway because it's dead".

  180. BI Tools a possibility? by Anonymous Coward · · Score: 0

    In some instances, we simply mirror the data on a second reporting server that provides and then provide read access to the users.

    But one thing I haven't seen mentioned so far is use of a BI tool - like Oracle's OBIEE+. This, of course, requires up front development but in the end empowers the user, no?

  181. Forget technical reasons by Ryan+Amos · · Score: 1

    Technical reasons aside (there's technically no reason you can't do this,) the main reasons business/risk exposure reasons. If you make money off running reports for them, why the hell would you want to let them do it themselves?

    Also, if you're not skilled enough with Oracle security to be able to do this; it's not going to happen overnight. Just say you don't have the proper security structures in place to allow for that kind of access.

    Besides, do you want to be the one who has to explain to the rest of your customers that your database access got 0wned because "Special client A" had a vulnerable intranet web application they wrote to query the DB without your permission that allowed the hacker to query your database and run some form of Oracle privelege escalation to get access to 20 million credit card numbers? You can't trust your clients to be as careful with security as you are.

    Since you can't control the security on their end, you can't trust them. Financial companies have external compliance audits to iron out this kind of thing; is that what you're going to do for this customer? Or is the prospect of a $250,000 security audit every 2 years enough to scare them off?

  182. Simple answer.... by Dimes · · Score: 1

    Out of the box? No. Thats the answer. Slightly longer answer....if they really want all the info in the database and access to it when ever they like they can buy your company for it.

    Elsewise you should not give them access to something that could very well impact your company's ability to business with other customers.

    It is actually quite a ridiculous request on their part.

  183. Re: And that's the kind of attitude... by colinnwn · · Score: 3, Insightful

    ...that makes the IT department a liability.

    Providing improvements to business processes where technically possible, affordable, and not illegal is the number one job, just above securing company data. Because if you can't do number one, there isn't much worth securing for number 2.

    Is a requested enhancement required for a company? Probably not. Is it important to provide continuous improvement and efficiency to keep the company competitive? Frequently it is.

    I'm all for standing up and saying what kind of resources and safeguards are necessary to provide an enhancement so the company can decide how to expense the upgrade. But just saying ninny, ninny, boo, boo, you can't have it is ridiculous.

  184. Why not? by Balthisar · · Score: 1

    As one of the few (in my workplace) non-IT people that actually does know how to write an SQL query, and does want to manage my data quickly than some poorly-written propriety software (desktop or web) will permit, I routinely ask for read-only Oracle access to the pertinent databases. It's read-only; what's the harm? Makes my life easier, and makes me more efficient.

    --
    --Jim (me)
  185. Solutions by goldcd · · Score: 1

    depend on your problem. Free Queries against a live database a no-no - so set up a sync link of whatever flavour you like. Either host it yourself, or to a db on their site (guess it depends what the load and your link is like). If you're trying to 'hide' the internal workings of your db, then just create some views that match the daily reports you send them and sync those. Not entirely sure what your problem is..

  186. Sometimes you have to give in - if so, ... by jamcc · · Score: 1

    Sometimes these decisions are made above your pay grade. Just interject your own creativity and reasoning in between and hope it all works for the best. Here is what I would propose if I were you: Pre-parse and re-write the query before submitting it to the database. Some checks: Make sure it starts with SELECT,and does not contain ALTER, UPDATE, DELETE, TRUNCATE, etc. in the query string. Remove all ";" semicolons to prevent them from stacking commands. If a ; is found, strip everything beyond that. Require them to log in and establish their credentials somehow. Let's establish them and make a session var equal to their login uuid or something. Substring search their query "WHERE" clause, and interject a "and customer_id = %cust_id%" to restrict the returned results to just the stuff they are supposed to see. If none of that flies, you can offer your resignation, saying that you can't support it, and if they insist, bail out of there.

  187. duh by Anonymous Coward · · Score: 0

    I'm surprised this question is even posted.

    My answer is: duh, make a copy of the database, do not encourage them to fail.

    On a different note, it is a shame that slashdot accepts this story and not something more important such as the forensic evidence behind wtc7's collapse.

  188. Missed point by ohtani · · Score: 2, Insightful

    I think a lot of these comments missed the point. It's not that he's not thinking of saying no. It's that he doesn't know HOW to say no or what reasons to give. So telling him to "just say no" isn't sufficient and was a no brainer from the beginning.

    I think the arguments I saw that were best boiled down to the fact that you are providing an information service, and that you're not selling the data. And the other thing is that they need to know the downfalls of somebody inexperienced bringing the whole server to a crawl.

    --
    Pancakes. Oh I blew it.
  189. Get over yourself... by Kymermosst · · Score: 1

    Seriously, not all of your customers are "stupid" and it's damn right that "because you're stupid" is not a valid reason.

    What makes your tables so "precious" anyway? My guess is you have some superior design that you want to keep away from all the "stupid people" (e.g. everyone besides you).

    Anyway, you could make a shadow copy of your precious tables and create some views to exclude information that you don't want returned. You know, offer a compromise that allows them to get at most of the data without being able to adversely affect the main database.

    Even a stupid guy like me can figure that one out.

    --
    "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
  190. Security Issue by drGreg · · Score: 1

    One reason for security is competitive advantage. In your case you could define that as the value add on the collecting of the data. Yes at a low level you can make the information available to them in a safe a secure manner. This thread is full of good ideas. It sounds like you are looking for a reason not to share the data and from a competitive advantage point of view, you collect the data and make a subset of it available to them. You may have other customer information in the same database, you may have data fields that you don't want to share, etc. In any event if it's your information and you must provide what you want to share with them.

    You can also offer "more data" for a cost and pass along the additional work you'll have to do to protect the information.

    good luck.

  191. BI Tool and Data Warehouse by Anonymous Coward · · Score: 0

    This is where a Business Intelligence tool such as Oracle Discoverer, Business Objects, or Cognos come into play, as well as a Data Warehouse. Store a copy of the data in the data warehouse, and provide them access to the BI tool, which will allow you to control access, preset joins on tables, etc.

  192. Just use naked racism by Anonymous Coward · · Score: 1, Funny

    Remind them that simply because they don't have to use the waterfountains for coloreds anymore doesn't mean you two can coexist in the database together.

    Then put a white sheet over the server and a noose from the CDROM tray.

  193. :-P you owe me a new keyboard :-) by hummassa · · Score: 1

    And you are 100% right.

    Well, and as alternatives the OP could proxy his database thru SQLrelay... or replicate his client's tables in other database, giving access to that one.

    But he should never forget (and neither should the GPP) that the customer is always right!!!

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re::-P you owe me a new keyboard :-) by lawn.ninja · · Score: 1

      But he should never forget (and neither should the GPP) that the customer is always right!!! Maybe in sales the customer is always right. But this isn't a sales deal this is a tech issue and that is how the question was phrased. So in this instance most of the time the customer is wrong. The only truth to your statement is that the customer always knows what they need the end result to be, they are far from always right, though. That is just bullshit sales jargen that managers with no clue use to enforce fake rules. The problem is here that the internet made everyone experts on everything and some weekend gamer wants to expand his resume, and his boss was dumb enough to sell it up and now here you are.
  194. It doesn't matter... by hummassa · · Score: 1

    The customer is always right, and if you don't agree with the customer, you are obviously wrong. Period.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  195. What About Oracle APEX? by HardCaliber · · Score: 1

    I would create an Interactive Report in Oracle APEX (Application Express, formerly HTMLDB). This will allow you to restrict everyone that logs into the application to their own data. It will also allow them to customize their own report, hopefully reducing the number of one-off requests that you get.

  196. Data Warehouse by vaporub · · Score: 1

    Sounds like you need a Data Warehouse for your reporting needs. Using a multi-dimensional db model (star schema) you can de-normalize your data and create an easy to use reporting database to allow your customers to access. Most of the time your customers will not need up to the minute real time statistics; so you can use a multitude of ETL (Extract Transform Load) tools available to 'load' your warehouse each night, only loading the data they need to see. You can save space by aggregating your data and any modern fast sql db can be used to store the warehoused data (MySQL, PostgreSQL if you want to save some money). You can then set user perms on that separate database and it makes reporting MUCH easier. Makes it really easy to design cubes (ie Mondrian), create easy to query reports, and it reduces the load on your transactional db servers. There are many resources for building warehouse and data marts (Oracle Warehouse builder, Pentaho (open source), etc) Using 'slowly changing dimensions' methodology, you can track changes to your data as well without bloating your transactional db servers (say your customer changes mailing addresses, product price changes,etc).

  197. Say yes by FailedTheTuringTest · · Score: 1

    All of you who are advising kdawson to say no, pause for a moment and think of it from the other point of view. What if *you* were the customer, and you had hired a company to provide some data management service for you? Wouldn't you feel justified in demanding full and unrestricted access to your own data? If your service provider refused, how long would it take you to start getting quotes from competing providers?

    The customer owns the data and should have whatever level of access they want. Your job as custodian and manager of that data is to make that happen, using whatever reasonable means are necessary to enable access while ensuring that there is no risk of damaging the service, including training the customer if necessary as well as the other technical solutions people have suggested. But don't say no.

    (I am in this situation personally, as the customer, and the service provider in my case would have lost us as a customer long ago if it weren't for some higher-level business alliance factors that keep us locked in.)

  198. The "truth" by holophrastic · · Score: 1

    The same truth that I tell my clients:

    "I could never guarantee reliable service and performance if other people have access to my systems. I have other clients, and I can't put myself in a position where one client can hinder others. That's why your system runs so well, because no one else has access to it."

    Look, you're talking about an SQL database with a whole whack of records. Read only means they can't change information without some kind of hack. But nothing stops them from accidentally running a query that returns eighteen trillion records. We've all done it at least ten times by accident. Oops, missed a join condition.

    Unless you're going to start playing with permissions that restrict the complexity of the SQL statements being run. . .

  199. Don't say no, quote a price/cost by Anonymous Coward · · Score: 0

    I would not say "no". I would provide them a quote on the cost to impliment their request. For security reasons, you probably need to grant them a VPN of some sort. Just opening a readonly port to an oracle system over the internet would probably be a bad idea. In addition, to protect other customers data, you may want to tell them they need a dedicated oracle system. Plus you probably need additional Oracle licenses, now that they are not using web. Plus they will need a reporting tool. And the hours it will take to impliment. In effect, you are telling them that "just giving read-only access" is not a trivial request. By forcing them to foot the bill, the decision for the value of having this is all on them. What do you care if your customer wantts it or not, it is their money and they can justify how they spend it. We people ask me "can we do..." and I tell them "with enough time and money we can do anything".

  200. Why? Money. by SleptThroughClass · · Score: 1
    You're considering only the option of changing the DB server permissions and the effects.

    What you should consider are ways to provide the service or information, and the costs of each option. If the solution is to give them their own DB server with a copy of their data (so they can screw up its usage as much as they want), then tell them how much that will cost (include the cost of resources to transfer the data to the DB server). If there are less hardware-intensive solutions then find a price for each option. Let the customer choose how much they want to pay for the various services; you won't care too much because you'll profit from any of their options...unless you underestimate the cost of what they chose.

  201. not only stupid by lokpest · · Score: 1

    you forgot one thing, they are in fact "stupid and ugly".

  202. Give them access to a replicated copy of the db. by SoWatt2000 · · Score: 1

    You can create a replicated copy of your data filter by only this specific customer data and only give them access to that database, hopefully you will put this db on an other server...

    This should help you keep your data and CPU safe from your customers...

  203. You may win this battle but certainly lose the war by Anonymous Coward · · Score: 0

    The moment they ask for direct access it means as a sysadmin (or the company) you've not anticipated their needs fast enough.

    Think about it: the real reason they want access is to fill a need that is not being provided now by the current mechanisms you control. A good sysadmin would have already met that need -- before such requests come in.

    I've had too many sysadmins throw hurdles like that (even my own subordinates). Guess what, eventually it turns out DBAs become the easiest link in the chain to replace. As someone here mentioned, the data is not yours, so it's not yours to horde. So find a way to make it work.

    On the plus side, this may be your opportunity to show how to make it all work -- by managing the risks. Don't listen to too many sysadmins, especially entrenched stick-in-the-mud types. Rise above it all.

    Good luck.

  204. Is that you Brian?! by Ch*mp · · Score: 1

    I am shocked I tell you!
    I ask such a simple request (and very politely too I might add) and next thing I know you're turning to Slashdot for advice!

    Too late buddy! You've aired my laundery in public and I'll never do business with you again!

  205. The easy way to say "No" by Minwee · · Score: 3, Insightful

    First, you have to start by saying "Yes". Then you let the customer decide on his own that he really doesn't want what he just asked for.

    Your problem is that the customer has come to you with a business problem. Someone, somewhere, has decided that it might be fun to have full access to SQL queries instead of those boring prepared reports they have been getting. Chances are that it came up in a meeting when one of the customer's own technical people was trying to explain why he couldn't deliver the Moon, two pieces of cake and a pony upon request.

    "Why can't we get more detailed data than this?"

    "Um, because it's not in the report. We would need, uh, raw SQL access to the database to get that and that's not going to happen."

    "Why not?"

    "Um, because those guys won't let us."

    The idea built up momentum until it got to you. So far all that they can see is that they have business reasons for wanting data and all they need to do is ask you for it so they can have it. Now you have very understandable technical reasons why you do not want unwashed, barely literate knuckle dragging Neanderthals who don't know the difference between an outer join and an outside straight from being able to touch your database. Unfortunately they are _technical_ reasons and not _business_ reasons and business trumps technical. Think of business reasons as being 'Paper' and technical reasons as 'Rock'. Oh, and some kid ran off with the scissors, so that's all you have to play with. The only way to win at that game is to keep choosing 'Paper' until your opponent gets bored and leaves.

    So how do you do that? You forget about the technical problems and explain the simple _business_ costs involved in resolving them. Your customer needs access to a database? Fine. Naturally they can't just use the main database for that. They will need their own dedicated reporting database server. (Ching!) With software licenses. (Ching! Ching!) And storage. (Ching!) Plus administrative overhead, datacentre costs, additional bandwidth, and so on. (Ching ching ching!) These are all things which you will need to provide to the customer in order to give them their pony^W own database to play with. All they need to do is pay for them.

    Suddenly the technical problem of "No you can't play with the main database server" turns into "Of course you can have that if you pay $X up front and $Y additional annually", which is a business problem. Write up a rough quote, send it to the customers, and let them decide for themselves if their sudden whim of making their own queries justifies the actual costs involved in having it. If you have any alternative suggestions such as how you could provide additional canned reports or develop a slightly more flexible set of queries which they could use, feel free to attach estimates for the real costs of those projects too.

    The key here is to make sure you tell them that you would be quite happy to provide any of the solutions you have offered. If they're smart, and your estimation of the costs of replicating your entire DB server are accurate, they should be able to talk themselves into doing the right thing without any further encouragement from you. If, on the other hand, they do decide that it's worth that much to them, and you're smart, then you should be in a good position to sell them that additional service.

    1. Re:The easy way to say "No" by dave562 · · Score: 1

      This is the perfect answer. Mod this guy up.

  206. Blah... by Anonymous Coward · · Score: 0

    Simple. Just export each customers data as an MS Access Database. This way they have a high-end DB engine (MS Access) at their disposal that can handle all of their needs.

    Why limit your customers to the limitations of Oracle? They can achieve a lot more with MS Access.

    MS Access was built for a REASON. It is _far_ more flexible than Oracle. Any day.

    If the customer(s) need more power, they can simply import the Access DB into SQL Server and have an even higher-end DB.

    In all my years doing VB6 and now state-of-the-art VB.Net, I have never seen a benefit of Oracle. I have built many _Enterprise_ applications with VB6 and Access that blow Oracle out of the water. The apps I built with Access could easily handle 10 or more concurrent users. Try that with Oracle.

  207. Build a data export tool for your customers... by CokoBWare · · Score: 1

    Build a data export tool for their data only. Then they request the data dump, download it, and install it on their servers to massage. Simple. This solves the data privacy issues, lowers the security hole, reduces potential runaway query problems, and makes the end user responsible for figuring out their own queries. Done.

  208. Be sure not to use STREAMS by mveloso · · Score: 1

    Having just experienced a STREAMS/CDC nightmare, I'd suggest using some other mechanism for synchronizing your databases. STREAMS issues almost took down a production database...and none of the issues were seen in the test system, which was pretty much identical to the production system.

    There are large numbers of patches required (10.2), and there's a large amount of training your DBAs will need to be able to babysit STREAMS replication.

    Just do an exp/imp every day. Realtime isn't worth that much aggravation.

    Note: I wasn't the dba, I was a stakeholder. Ugh.

  209. Give them the data, and let them deal with it. by toybuilder · · Score: 1

    If the customers are allowed to ad-hoc query the entire database, they may just as well have a copy to keep for themselves... So why not export the data (or replicate it out) and give it to them? You can be nice and offer to host their database server in your datacenter, but let them be responsible for running it. If they balk at the work of doing that, charge them to perform that service.

  210. Mod parent up by shrikel · · Score: 1
    It's been a while since I've seen a slashdot post strike so practically and succinctly to the heart of the question.

    Thank you, Mike1024.

    --
    Any sufficiently simple magic can be passed off as mere advanced technology.
  211. Copy the data by Karem+Lore · · Score: 1

    Seriosuly, download Kettle http://kettle.pentaho.org/ and create a transformation of the required data only into a new DB on a seperate server (while you are at it, make it a star or snowflake schema). Give them all the access they want telling them that the data will be updated regularly but is not live. If you need live data, I think Oracle has a product that creates a direct image of the DB live (i.e. one row changes in DB1, changes in DB2 etc). I think this is expensive though (isn't Oracle always?). Karem

    --
    When all is said and done, nothing changes...
  212. Get out of the way! by Anonymous Coward · · Score: 0

    How would you advice me to keep my customer away from my precious tables?

    I woudn't. I would suggest that you pull your head out of your ass and start trying to figure out how to give them the access they need. Consider, for instance, views that encapsulate common joins in order to ease the construction of more complex queries. Consider, even, a schema consisting entirely of views designed to make it easy for them to get what they want out of their data. Consider, as others have pointed out, resource limits or replication.

  213. Don't waste a moneymaking opportunity! by omission9 · · Score: 1

    I assume that you do not talk directly to the customer, right? Well, whomever manages that relationship is missing out on possibly making more money for your company. Here is what you say, "Malformed queries on a production database can severly disrupt performance and reliability. To best meet your request we will offer to provide a mirror of the production db in which you will be granted read only priviledges.". You can help your sales staff come up with a quote for this.
    Thank me later. :)

  214. Show the cost, let the customer decide. Win-win. by DragonWriter · · Score: 1

    they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without consulting us. As a DBA, my heart sinks at the thought of amateurs pawing through my database. Unfortunately, 'because you are stupid' is not considered a valid business reason to reject their request. So can any Slashdotters assist me in building my case to restrict access?


    Instead of looking for reasons to say "no", you should put together a reasonable, first-blush estimate of what it would take you to say "yes" (in terms of putting together the necessary security, administrative controls, etc. to reasonably allow this without mixing customer data, allowing customers to starve the system, etc.), figure out what you'd have to charge the customers to make it worthwhile for you to do that, and tell them that they can have what they want -- if they pay the price (for which you will be able to provide the justification for the cost -- not necessarily a deatiled breakdown, but an overview.)

    Then, they'll either say "no", and you don't have the hassle, or they'll say "yes" on terms that are worthwhile to you.

  215. One word - Security! by Anonymous Coward · · Score: 0

    Explain to your customers that exposing your database, even in a read-only and limited scope, opens the potential for THEIR data to be access/hacked by a third party.

    Emphasize that you are not willing to be held responsible should that be compromised.

    Play the security card and stick with it. Don't get into fine details, keep it high level.

  216. Make it really expensive... by Vo1t · · Score: 1

    to access your DB in that way.

  217. Data Protection by goombah99 · · Score: 1

    Right. Tell them that you have an obligation to your suppliers and other customers and marketing folks to maintain data security. You can protect this via onion layers on your own web portal and data base set up. But once the DB can potentially be migrated outside, you cannot assure your stakeholdrs you have responsibility for it.

    Moreover, if they based financial decisions on their own queries you cannot guarentee them results.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  218. They're your customers. by Anonymous Coward · · Score: 0

    They're your customers. I assume they will get what they want in the long term. So better make it happen with you than the competition, unless the risk for you is too high. Whatever you need to make it safe for everyone, your customers will need to pay for it.

    Once they've asked the question and you haven't told them directly that you would prefer them not to, it's too late to find 'excuses'.

  219. Give them the data by Mackeul · · Score: 1

    Many have already hit on the most plausible way to handle this situation, ie. give them their own sandbox to play in if you are afraid they'll upset yours.

    When it comes right down to it, it is the customer's data and as such the customer should have access to it in any way they wish. However, that access should not impact your ability to maintain the system/service for ALL users which includes management all the way down to the data processing clerks. Giving them a copy to muck around with seems to be the best way to address both sides of the issue.

    --
    Never bathe in hot oil and Bisquick.
  220. No, No, Hell No! by Auger+Duval · · Score: 1

    I have this this happen b4. Here are the reason you keep the customer out of the data. Confidentiality & Security: Unless you are an expert in DB security who's to say that one customer won't "accidentally" access another customers data. Poorly formed queries: I worked for a company that had a VERY large online database application, our own programmers crashed the live system by pushing code containing poorly formed queries that included, of all things, never ending loops. Bog Down: Your system will show signs of stress when all your customers start banging on it from every direction trying to pull thier EOM's, EOW's, and the ever tiedious EOY using the before mentioned poorly formed queries. My friend the solution here is to remain steadfast in your current course. If the customer really wants to write their own queries, provide them the data structure of the data that can be queried, let them send the query to you to proof and then run it. You can then charge them for Query Analysis, and whatever else you can think of. Unless they know what they are doing, they'll give up after the first try.

    --
    --AD
  221. Sorry, but you are looking at this all wrong... by je_gonzalez · · Score: 1

    What you have here is an opportunity for you to win.... (Cool Hand Luke +/-) It seems to me that your CLIENT has a new REQUIREMENT and YOU and your BOSS have an opportunity to PROVIDE a SOLUTION for a very reasonable price! (unless the current contract says that they can do this already) So why not setup what your CLIENT WANTS in a way that they do not "mess up" with "your database"? By the way unless you personally paid for the collection of the data, IT AIN'T YOURS. If you want to test my point go to your boss and tell him/her that you are taking your data home, and see what look you get as your butt is dragged out the door.

  222. Give them view access instead? by ed · · Score: 1

    Limit what they can directly access by a limited view that only shows them stuff relevant to them

  223. Oh please... just give it to them. by eKahuna · · Score: 1

    This is one of the silliest things I've seen in a long time. Figure out a way to give your customer what they want, or they won't be your customer much longer. They understand that the data is there and that it can be safely accessed (you should be able to figure that how to make that happen-- a few people here have put forth good ideas). If you are the obstacle to what they need, they'll soon figure out a way to go around you. Feed the customer and the customer feeds you. Honestly, this is the kind of stuff that rightfully gives IT folks a bad name.

  224. Simple solutions by Anonymous Coward · · Score: 0

    1. Write views for them and give them access to those.

    2. Dump it all to SQLite or something and charge them to send it to them.

    3. Keep a replica online and sync their data to it.

    4. Tell them to bring a replica online and set up a VPN and charge them to run replication to it (nice high maintenance charge option).

    5. Tell them to go away impolitely.

  225. Turn it into a sale of services by SoopahMan · · Score: 1

    The best way to say "No" to a client is to explore how their idea could be built in a reasonable way, then come back to them with a cost estimate.

    In this case there are 2 issues:

    * Security: There is the risk that malware on their machine(s) gets write access to your database, or a rogue employee does, or if there are tables they shouldn't see, that they may gain access to them.

    * Performance: Direct SQL access could lead to slowing the DB for everyone - one bad query from them and all your clients are impacted, a risk you can't take.

    Outline a solution to this problem (maybe a web service that accepts their sql and limits their usage/reach/etc) and come back to them with the cost to build it.

    If they say "OK," you've successfully sold additional services. More revenue in the door and you might be able to offer the results as additional services to other clients.

    If they say "That's too much," you just said No the proper way.

  226. Replicate the database by samantha · · Score: 1

    Replication the database not necessarily in real time to a separate server. Explain to them that you have no responsibility to debug their queries or possible performance problem arising therefrom. Ideally replicate it to a server they own.

  227. Netapp Filers and Flexclones by Anonymous Coward · · Score: 0

    Netapp Filers and Flexclones is your answer.

    A flexclone is a writeable disk block level copy of a volume/filesystem on a Netapp filer. It can be created in a matter of seconds and destroyed in a matter of seconds.. Google it for more info. Best of all, it wont double the use of storage unless you break it and it becomes a volumes on its own.

    That ll give you what you want/need.

    Furthermore, denying them access cause you like your DB sounds plain daft to me. I am not sure if you have the right attitude towards customers/being in business here.

    Cheers,
    Eric

  228. Contact Legal and let them sort it out! by Anonymous Coward · · Score: 0

    Have you thought that you may end up in law suits if customers access data that for what ever reason is not the data that you want them to see.

    Anyway, easiest way to stop all the chatter is have your Attorney's put in their two million cents on the matter.

  229. It is not your database by georgede · · Score: 1

    It is not your database; it belongs to the organization and your clients. You are just an employee who provides a service to your clients, and your clients provide you with a pay check. Your neanderthal attitude is territorial instead of an attitude about providing solutions for your clients. I have been in IT for 25 years and find it surprising that your type still exist. One of the many purposes of a database is to provide decision makers with information. If you are concerned about long running queries impacting transactional processes, then consider implementing a reporting instance of that same database. Consider building a datamart for your customers. If you have valid security concerns, work with your Information Security Manager to solve those concerns. Work to look for solutions with your clients for your clients instead of being a roadblock. Be a problem solver and provide solutions to your clients. I cannot tell you how to best provide your clients with the solution they seek. But, I know that you can design a solution that will provide them with the results they need.

    1. Re:It is not your database by Specks · · Score: 1

      I totally disagree with the notion that he has to do exactly what his superiors tell him. He was hired to not only administer the database but to protect it as well. Not doing so is neglecting his fiduciary duties as a dba. He has a right to wade through and reject unreasonable requests.

      --
      Specks
      Batteries not included
    2. Re:It is not your database by nthcolumnist · · Score: 1

      RTFA - read-only access. They want to look at their data. Not unreasonable since 'they' are the reason he has a crappy job. They aren't asking for sysdba. Too many sysadmins and dbas have this BFOH/D&D attitude that they are gatekeepers. You can moan about it and protect your little empire in which case I fire your useless ass and employ a new grad or you can make like a professional with a can-do attitude and earn your keep.

    3. Re:It is not your database by georgede · · Score: 1

      Another neanderthal attitude. Read my comments about addressing security concerns. I never suggested to ignore security. If you have valid security concerns, work with your Information Security Manager to solve those concerns.

    4. Re:It is not your database by Anonymous Coward · · Score: 0

      I remember dealing with CEOs like this after my company had turned them from 100-million-dollar companies into multi-billion-dollar companies in a matter of months. They would get cocky and start saying "Now do this, implement this, add this in, do this" and we would say "That's a bad idea. That can be exploited. That looks good at first if you've been using this since inception, but it'll hurt 90% of users" They would insist, and we would implement their changes, begrudgingly, although always voicing our concerns.

      They eventually dismissed us, parted ways, and hired their own programming staff. Within 2 months, their product became bloated and exploited through the very gaps we warned them about. Their investors all pulled, and they're not even a 100-million-dollar company anymore.

      There's nothing professional about a "can-do" attitude aimed at destroying your own company. You're like an inbred king who executes all of his advisors when they tell him his plans won't work. Enjoy your yes-men. See you out of business.

    5. Re:It is not your database by Specks · · Score: 1

      My, look at the pot calling the kettle black.

      --
      Specks
      Batteries not included
  230. Support is the issue, not granting access by Anonymous Coward · · Score: 0

    The problems isn't that they want access. The problem is they want supported access; and it doesn't matter if they swear black and blue that they don't need support, you know they want it.

    1. They will ask for support. They'll immedately ask questions like 'what does field xyz' do? where do I find this? Where do I find that? It doesn't matter how well they think they know the schema. And it doesn't matter if you said you wouldn't support it.

    2. Restricts what schema modifications you can make - if you change the datatype of a field, you know exactly what is affected. With this, you'll get an angry call complaining about you trying to clean up a schema.

    3. They'll blame you for their incomplete understanding. They might not realise that for historical reasons, customer record 1 doesn't mean what it should. Or that they need to join against table A and table B, so they'll miss half the orders and get the wrong numbers and blame you.

    4. You wish to upgrade the server and move the application to another box. Cue complaint from 'customer' who has hard coded the name of the server into their application.

    5. Perfomance drag. Poorly written queries, et.

    6. They'll then proceed to use Microsoft Access via a VPN connection from another country and complain at you that performance sucks. They'll have unreasonable expectations on what they can do - and they will blame you for your failure to support it. (The fact that you said you weren't going to support it is, of course, completely irrelevant.)

    7. By the look of it, they're actually asking to talk to the database server directly too - something you didn't previously allow. This means a VPN connection to it or putting the database 'naked' on the net. It means you're no longer protected by a firewall; meaning you don't have any time to patch if there is an 0-day attack. There are security implications of all that.

    The real reason why sysadmins say no: It's not the access that costs; it's the support after it. All the other hundred knock on things after it that you can't quite identify now but WILL bite you in twelve months time.

    The cost of granting them access is a lot higher that in seems, it's just you pay that cost in a hundred ways, not a simple single hit.

  231. Poorly Formed Reads Destroy Performance by IBitOBear · · Score: 1

    I don't think you have any real "right" to keep them from what is, essentially, their own data.

    On the other hand, poorly formed reads can kill database performance.

    I would suggest that you keep a hot snapshot slash read only hot backup database and give them ad-hoc access to that.

    I forget the oracle-isms for it. Do that thing where you forward the journals from the live database to the standby database. Since that database is up, they can use it in read-only mode without you having to worry about table locks (etc) boning your tuning.

    If worse comes to waors, you should be able to show them some concrete (if contrived) examples of incomplete transactions costing time and money.

    But really, being territorial about the data itself is unbecoming and unprofessional.

    That being said, I worked for a company that wanted to keep our customers out of our databses full of their data. The main reason was that our database was _awful_. It was dnormal and could have been used as textbook material for how not to "do a database". Columns named Field7 with the single character minus "-" for null values because the code designer didn't understand what null was or why you would want to "SELECT AVG(duration) WHERE..." wen you could put a read loop in the application.

    Seriously...

    What are your exact objections to allowing this access? Those objections are your reasons for disallowing the access. If your reasons are good, your argument is good. If not, not...

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  232. These 4 word incantation to dispell project... by mikelieman · · Score: 4, Insightful

    "Who's paying for this?"

    DBA time ain't exactly cheap, and setting this all up, the needed SysAdmin time to get the firewall/proxy port issues worked out/certificates setup, etc...

    Figure 40 hours of time for the DBA and 30 hours for the Sysadmin..

    160 and 240 per sound good?

    That's $ 13,500.00

    You guys ain't planning on doing 10 grand worth of work for FREE, were you?

    --
    Technology -- No Place For Wimps! Grateful Dead and Jerry Garcia Chatroom -- http://www.wemissjerry.org
    1. Re:These 4 word incantation to dispell project... by pigiron · · Score: 1

      If you are paying your sysadmins more than your senior DBA's then you are in serious trouble.

  233. My??? by Anonymous Coward · · Score: 0

    Its not YOUR database. Grow up and be professional. If you can't handle the challenge of implementing a sound security model and disaster-recovery then get a real job. Joe did, and he's a happy guy now.

  234. I had you all wrong by Anonymous Coward · · Score: 0

    It's surprising to see just how naive slashdotters have become. Never underestimate the idiocy of a client. They want a way to run adhoc queries, they'll do their damndest (although well-intentioned) best to destroy all the data, get bad results, choke themselves with their mouse cord, and burn down their own building on the way out.

    Most customers/clients defy logic by having enough brain power to breathe, while being stupider than a sack of rock salt. (Which is the perfect combination to win a lawsuit when they've destroyed their own business and have you to blame)

    maybe 10% of the replies I've read show any business experience. Is there some college course requiring their graduates to post in slashdot before they've learned they know nothing about practical applications in a customer/client-targetted environment?

    I'm taking any bets that within 15 minutes of giving them adhoc access, they'll call up asking why there are so many duplicate records because they ran a join query on x.[first name]=y.[first name]

  235. It's called a replica!!! by Anonymous Coward · · Score: 0

    Those users know more about their data than you do. Your specialty is running databases, not limiting access to the users' own data.

    But users will be running queries that have not been tested and could therefore put a heavy load on the database. Therefore you should maintain a replica, either through nightly dump and load, or some other technique supported by your database software. Then let them play with the replica.

    Note that you already do this for developers, and since the users are running untested queries, they are de-facto developers.

  236. Ryan Jentzsch by RyanNerd · · Score: 1

    If you truly have super users that are "not stupid" and can craft a SQL statement then create a view of the tables specific to their login and the data they need to see and set the permissions to SELECT only for the view (Disallow UPDATE, INSERT, etc.). The problem then will be customers who think that since you opened up the database to SQL queries you should be their support and mentor when their dumb-@$$ queries don't return the values they expect, or have "errors".

  237. Customer is the reason you are there! by Count_Froggy · · Score: 1

    I've spent most of my multi-decade career providing end-users with access to their data. Several of the previous suggestions are part of the solution. You do need to engineer a solution that allows valid secured access from individuals trained for that that purpose without affecting overall system performance. Some of the good ideas:
    - database replica, hopefully tuned for queries. If the data is not onerous, some user-oriented views can go a long way in preventing Cartesian solutions.
    - an end-user oriented query tool that allows previously-defined queries to be rerun as needed. For eleven years, I've used PeopleSoft's Query (which is proprietary to their systems) as the end-user tool, to give you an idea. This type of tool can also be configured to minimize the number of joins allowed by user id. Many of these tools allow power users and DBA's to define queries for others who can only execute the canned query.
    - require minimum training requirements for the end users like basic Select statements and a copy of the data structure.
    - phase in the end-users. There may only be a few individuals who need the direct access.

    Bad idea: - Try to prevent users from getting to their data. From your comments, you are an external service and the customer owns the data. That is how you lose a customer!

    Worst idea: - They didn't need it before, why do it now? ANY analyst that thinks today's specs aren't already obsolete doesn't belong in business! Go work for the government!

    --
    If I am not for myself, then who will be for me? If I am only for myself, what am I? If not now, when?
  238. Self joining tables by tonyray · · Score: 1

    Have you ever joined a very large table to itself - several times? There can be legitimate reasons to do this (such as finding duplicate entries) but it can also bring a server to its knees for several days before producing results - if it doesn't run out of space and crash first. Letting people submit their own SQL queries is just asking for trouble if they don't understand the consequences of what they are asking the server to do. Your IT needs to rule on all queries before allowing them to be submitted, at the very least.

  239. How on earth is this guy a dba? by Anonymous Coward · · Score: 0

    I can not believe this post made a slashdot news item. It is absolutely trivial to create a schema with views to the customer tables - and even then not expose all table columns. This question is as old as databases itself. You can implement tde(transparent data encryption) - you can build a read-only database using streams or dataguard for them to use. Seriously - this wasn't a question that really deserves the attention it got.

  240. How serious is it? by rastoboy29 · · Score: 1

    I've gotten lots of requests for difficult things from customers that turned out to be mere whims of some random person over there.  So what I do is suggest we have a meeting with myself, the customer, and our managers to discuss the options.

    Half the time, I get a "forget it, it's not important" and go back to surfing Slashdot.

  241. Put a price on your trouble by Anonymous Coward · · Score: 0

    I would suggest you start thinking like a business. By providing the ability to run the "ad-hoc queries" you're essentially providing another service to them. You should be compensated for the value of the service, your time and expertise, as well as the risk that they may screw something up in the database. Figure out what that's worth to you and then counter with an offer to provide the services they want for that price. That's business, pure and simple. In turn, their response will help you gauge how much they really want/need this functionality.

  242. Who_wants_data_access by Anonymous Coward · · Score: 1, Insightful

    I am a very senior level DBA. I am experienced in both Oracle and SQL Server. As a DBA you must develope a firm voice of authority based upon your knowledge, skills and experience. As a DBA, it is both anticipated and expected for an experienced DBA to provide access to the "precious" database" for the paying customer. You simply need to research the best solution before providing access for that client (to access their data only). Of course, depending upon your level of DBA experience, you could easily create limited (least privilege) access with user permissions, application permissions, group or role permissions, views, triggers, & or stored procedures, ect. How many years of production Oracle (DBA) database administrator experience do you have? It sound like the customer thinks they can do a better job pulling back ad hoc reports. Why not ask exactly what type of data the customer may need and get that data set up into a view and also provide the customer with select permissions to access that view of their data? I ask because you stated: "However they have now asked for direct read-only access to our Oracle database, to be able to run ad-hoc queries without consulting us. As a DBA, my heart sinks at the thought of amateurs pawing through my database."

  243. Create Views based on their requirements by Anonymous Coward · · Score: 0

    I would try to work out what they actually need, they probably do not know what it is that they want.

    I would then offer to build any queries that they require using your expertise in the database as a service which can be charged for, and create views based on the queries which they can run whenever required.

    The good thing with this approach is that you still retain the control over what runs on your server and allows you to maintain your DB.

  244. Contract & Quota by slincolne · · Score: 1

    Your problem is that you are doing currently is perfectly sensible in a technical environment, but you are dealing with people who live in a different world. You need to provide them with an asnwer that makes sense to the way they work. Explain to management that there are implications for your infrastructure - that they can potentially create a load that your existing infrastructure may not be able to manage along with existing business focussed work. Then suggest a cost recovery model - implement quotas on machine resources, and associate charges with those resources. Have your legal people draw up a contract, specify a reasonable figure for implementing this facility, a per month figure for monitoring and billing, and ensure that whatever the contract states they pay for what they consume. I would also ensure that the contract has a minimum period so that they can't just try it for a month and then walk away. Make the numbers real - don't try to make them artifically high - and see what happens. I would be quite confident that once your clients see that you are willing to work with them, but that they will have some additional costs, then their management will have issues they can comprehend. Oh, and you can then pray for that nice big cartesian product that will pay for your next new server ;-)

    1. Re:Contract & Quota by Forbman · · Score: 1

      Hmm... they probably just want to hit it with their mad Access skilz...

  245. People like you deserve to be sacked! by Anonymous Coward · · Score: 0

    I've seen too many lazy bums DBA like you. You're a DBA right? where the A in DBA stands for Administrator?

    If the customer wants to have direct query, then your job as a DBA is to make it possible without hassle. As many suggested, Oracle has fine access and resources limit, so do so. Or otherwise setup a copy like others also say.

    Or are you just afraid of the additional work?

    People like you, or like sirgoran (charging customer a ton for a simple work), gives IT a bad-name.

    If you cannot or do not want to do your job properly, how about switch your career, then? Sheeesh !

  246. Re-read your question by NemoinSpace · · Score: 1

    How would you advise me to keep my customer [away from my precious tables]?" there, fixed that for you. Now go show this to president of your company, continue to administer your database (you seem too be doing well) and wait for his phone call.

  247. Is it your decision to make? by dredmon · · Score: 2, Insightful

    There are so many posts, so I am not sure if anyone has posed the question of, "Is this your decision to make?" I trust your DB expertise. Depending on the size of your company, if there are "higher ups" beyond you and they are accessible then you may consider presenting the situation to one of them. Here's why: Sometimes customers ask for things they should not be asking for out of stupidity. On some occasions, they ask out of evil genius. The customer may know they shouldn't ask for this and therefore try to run it through channels that are inappropriate in an effort to pressure an answer they shouldn't get. Then they can argue the "high ground" that their request was agreed to. As a developer I have had this done by various clients by accident and by deception. We all like to be the smart person with the answer one way or the other, but I have learned to "run it up the flagpole" when I felt it appropriate. I have experienced 3 different categories of results: 1. I am concerned about reason A. The higher up simply agrees or disagrees. Either way it is a CYA 2. I am concerned about reason A. The higher up knows about reasons B and C that I was not privy to. The higher up actually provides me more ammo for it not to occur and may actually step in to handle the customer. (I know it is rare, but it happens) 3. I am concerned about reason A. The higher up knows I am right but due to reasons E and F that I may not be privy to. The higher up decides to appease the customer regardless of reason A. That is my humble offer of a way to handle this. Good luck, dredmon

  248. PLOY by Anonymous Coward · · Score: 1, Insightful

    This is so stupid it has to be a hook to get free dba advice!!!

    Uggh.

    With data houses, cubes, replication, log shipping, backups/restores, snap shotting and a score of other things i've probably missed, how do you even ask this question and call yourself a DBA!!!

    Disclaimer i'm not a dba.

  249. Performance by Anonymous Coward · · Score: 0

    If you must give a reason, why not simply say that ad-hoc queries tend to be a performance problem as they are not able to be optimized with indexes and such. We used exactly that reason to prevent ad-hoc access to a large customer database at a telco I once worked for. They were required to specify what they wanted and we used a stored procedure to do the actual work - once it was explained that our process was to first ensure the query would run fast (DBA analysis to create the correct indexes) AND not bring down database performance for other uses, they accepted it.

  250. Quote the Privacy directives by Anonymous Coward · · Score: 0

    Depending on the industry that you are supporting, you could reference SarbOx (Sarbanes-Oxley Act); HIPPA (Health Insurance Portability and Accountability Act), or FINRA (previously known as NASD) security regulations as a reason to surpress direct access.
    Alternatively, permit access only via a 300 Baud modem connection.

    1. Re:Quote the Privacy directives by KevReedUK · · Score: 1

      All great ideas, except...

      The poster is in the UK, where the acts you mention aren't in force!

      --
      Just my $0.03 (At current exchange rates, my £0.02 is worth more than your $0.02)
  251. are you experienced ? by bugs2squash · · Score: 3, Insightful

    ..."Have you experienced a similar situation?"...

    Yes, It frustrates me frequently that useful, non-contentious (ie. not hippa, ssn, pci, DoD etc.) data seems to make a one-way trip into the corporate oracle system to be held hostage there by the dbas for not much good reason than they want to ensure perpetual employment.

    There are plenty of good ways in which this data could be made available. Hell; save it periodically to a flat text file, but don't lock people out of it. You're the guardian of the data, not its gaoler and I'm willing to bet that the people that want access to the data have their reasons.

    --
    Nullius in verba
  252. Been there... by Anonymous Coward · · Score: 0

    Some other factors to consider:

    Network bandwith might be impacted due to huge data unloads.

    The PC client might have a restriction on the number of return rows it can handle making most queries useless. This is specially bad if users use Excel to mine data.

    Ignorance of the database tables cause users to spend much more time reverse-engineering table relationships and their queries will fail if database structure changes over time.

    On the other hand, on some ocasions I HAVE allowed that to happen and it turns out users are inteligent enough to realize what not to do most of the time. Sure, you'll have a couple of spikes on the charts now and then, but in the end it will work fine for everybody.

    I can understand your worry, blame it on IT paradigms :-)

  253. 1990's called by Anonymous Coward · · Score: 0

    they want their data warehouse

  254. Trust, Rapport, and good business by Symb · · Score: 4, Insightful
    The problem you face is trust; not technology. Trust requires rapport. Rapport requires experience. Try to think in terms of resource impact instead of "turf" or "stupidity." Consider these options, some mentioned before...
    • Trust them. Tell them you are trusting them. Give them a trial timeline. Then give them honest feedback after the trial.
    • Bill them. Tell them the resource impact of downtimes, restorals, and performance problems. Tell them they will be charged. Build an appropriate continuity plan.
    • Give them a replica. Then run their releases through your own QA.
    • Incorporate them in the dev cycle. Give them access to dev-test. Then you move their work to prod.
    • Show them they can trust you with a demonstration of the damage that can be done and the techniques you as an expert use to stop that from happening.

    Try not to squelch their enthusiasm to explore. It will likely mean new business opportunities for your company.

    If you are really "hiding" information as its owner and not "protecting" information as its custodian, then you should consider a different business model, one where the value is placed on the data and not the service.

    I am constantly reminded to look away from the monitor for for a few minutes and talk to people by this great quote from an interview of famous programmers I found on slash a few years(?) ago.

    The next big thing in computer programming will be eclipsed by the next-next big thing in programming, and so on, and so on. I'm kinda tired of the endless search for the big things, because while doing it people tend to forget about the real issues: getting the fundamentals right. We need to get a whole lot better at talking with our customers, focussing on delivering value, and taking pride in what we do. A developer who can do these things can deliver great software with any tool set, and won't need to worry about tracking the fads and fashions.
    - Dave Thomas, Author or The Pragmatic Programmer -
  255. who are you? by nguy · · Score: 2, Insightful

    I'm sorry, but who are you to make that decision for your management and your customers? Did you pay for the creation of the database? Do you pay for the machines?

    Your job is to tell people how much it would cost (time, extra load) to support this, nothing more. And you should be honest about it, not make up some silly numbers. The decision on whether to grant the access is between your management and the customer.

  256. Views by Anonymous Coward · · Score: 0

    You could make views for everything they need to hit then either make a web interface or a standalone pre-complied gui that only hits the view then if need be you can even index the views, that way they cant see whats going on in the background.

  257. Just say NO by Anonymous Coward · · Score: 0

    Just say NO.

    Next question please...

  258. Check the DPA by jeremyp · · Score: 1

    As a DBA, my heart sinks at the thought of amateurs pawing through my database.
    Why? What's wrong with it? Are you worried that the customer will post the schema at The Daily WTF?

    Unfortunately, 'because you are stupid' is not considered a valid business reason to reject their request.

    Actually, that is a valid reason if framed in the correct language. You can easily claim that unrestricted ad hoc queries might cause performance issues because it's true. (There are ways to get around this, if the customer is prepared to pay e.g. a replica database). However, that's not your reason for restricting access. Your real reason is you don't want the customer "pawing through the database", so it seems to me that you aren't worried that the customer is too stupid but that they are bright enough to recognise a poor DB design when they see one.

    Anyway, if you are based in the UK and your database contains contains personal data, the point is probably moot since what your customer is asking for may be illegal under the DPA (seek proper legal advice at the customer's expense).

    --
    All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  259. Just let them have access by insomniac8400 · · Score: 1

    Unless you can make a strong argument that them running a bunch of queries will slow the system to a crawl, there is really no reason not to let them have access. Are the systems even shared with other customers? If not, then you really have no good reason.

  260. Find out their motivation by Anonymous Coward · · Score: 0
    I've been in situations like this many times and have found that the best approach (most of them time -- it can definitely depend on the type of person you are interacting with) is to not say yes or no, but to find out *why* they want the ability to do this. If you can get to the root of what they are after, you can offer solutions that fit your desires and still addresses their need.


    I would not recommend a flat out "no" answer as it can definitely piss off the other party. Also, being seen as a road block when someone is paying you for a service is rarely beneficial.


    Having said that, the only times I've found a flat out "No" to be effective for specific types of situations: if the person doesn't really care, if the person doesn't understand the details of their request and are wiling to rely on your answer as a professional, or if the person is the type that functions really well being told what their limitations are without questioning them (aka sheep).

  261. You are a wanker... by Choozy · · Score: 2, Insightful

    If you believe that a couple "adhoc" reports are going to kill your database. It is DBA's like you that shit me to tears. What, are you scared that when they see how badly you've set up the database tables and joins that they are going to laugh at you? Honestly get over yourself and be a professional. If you are really scared that these amateurs are going to put too much demand on your system (although I believe that you are the amateur and don't know how to manage a database) then make a copy of it. Set up an overnight script and create a data warehouse or use the flashback ability that is available in ORACLE 9+.

  262. Is openness not for everyone? by tjstork · · Score: 1

    . But this isn't a sales deal this is a tech issue and that is how the question was phrased.

    How is it that we are on a board praising open systems such as Linux and yet we have so many argue the customers should not see their own data? What's the difference between what you are doing and what Microsoft does - "oh, leave the operating system to the professionals". It seems to me that if we expect our software to be open, it should only be in support of allowing our customer's data to be open too.

    --
    This is my sig.
  263. Pesky customers...! by Anonymous Coward · · Score: 1, Insightful

    Your attitude represents everything that is wrong with typical 'IT' thinking: "Pesky customers/business-stakeholders/clients - life would be much easier if they'd just leave me alone in my office to surf pr0n all day". Give them what they want, or they'll go elsewhere. If you can't figure out how to manage resource usage on whatever your database is, especially when the requested access is R/O, then you should look for another vocation. If you ever wondered why IT orgs get outsourced, look no further than this example.

  264. DO YOUR JOB by Unoti · · Score: 3, Insightful

    You're a DBA. You're supposed to figure out how to give your customers access to the data they want, not to keep them away from it. You have forgotten what your calling is. You should be ashamed of yourself. Stop asking yourself how to restrict access and lock your customer out, and start asking how to give them what they want.

    1. Re:DO YOUR JOB by wagr · · Score: 1

      Long story short: we gave them access and they decided they didn't really want it.

      We had a very similar experience two years ago. We track store information for franchises. One client politely asked to see the raw data for our reports and let them manage their own queries. Note: we have a similar policy of providing answers to one-off questions -- after all, it is their data.

      I explained some of the trouble, but figured out how to protect the data from the most common stupid things.

      Said company came back to us a week later asking us to write a couple new reports for them as they could not even begin to understand the data. Also, their keeping a DBA (or similarly knowledgeable person) on staff was far more expensive than the $100 we charged for a new report.

      Since then, we've given other folks a peek at their data and explain to them that it is our job to make sense of it. And we have lots of custom reports, and we now charge $1 per year per report per store to maintain them. (Ex. a franchise with 500 stores and 6 custom reports pays us $3,000 extra beyond normal service prices.) My boss said we broke even on these requests last year, meaning we'll make a profit on them this year. So my boss is pleased, I'm content, and our customers have what they want.

      Our data is well normalized, so only one capable of keeping multiple tables in their head could get any information beyond simple lists, for example "all stores." Otherwise, one quickly finds views of millions of records, or records with no valuable data.

  265. Been there... by meshe · · Score: 1

    I'm in a similar position in my company, we have multiple people from marketing and sales that have requested direct database access to do their jobs. As much as I don't like it management decrees that they must have that access.

    We have created a couple of interfaces for them to use to do queries directly on the database, one web based, one XML command line based. After one of our sales people ran a query that he wrote and created a cartesian product on two 3 million row tables (It brought the MySQL server to a crawl, but not until it had run for 6 days), I started verbose logging in each of their interfaces. Every query that is run through an interface that they have SQL access to logs:

    query start time
    end time
    rows retrieved
    the query
    username
    hostname

    This gives us a workable balance, the users get what they need and we have a direction in which to point the fingers if someone manages to take our production db again.

    We also replicate to a secondary server which we direct most of our long running queries to.

  266. public Interface by Anonymous Coward · · Score: 0

    As long as you give access via an application and some database exports you have a pretty narrow interface to your customer.
    You are free to change the database scheme behind it whenever you need it - because of your narrow interface you have all applications accessing the scheme under your own control.
    If you give complete access ( even read access ) to the customer you expand your interface. Maybe the customer will have one, maybe he will have 200 different applications accessing the data. Then you will be stuck with your database scheme -- it will become difficult or even impossible to do necessary extensions or improvements because doing so would break the customers applications.

  267. Slashdot approach to Management interfacing by Anonymous Coward · · Score: 0

    1: Avoid saying "No".

    2: Say "Yes, but:"

    3: Write a report; throw in some costs & disaster scenarios; gold plate it to make your life easier all the way.

    4: Offset the time spent writing the report as you mis-spend the hours you would have spent chugging along happily churning out reports manually.

    5: Profit (bigger domain, less work)!

  268. Why not let them run against a semi-static copy? by Anonymous Coward · · Score: 0

    Depending upon how crucial it is to your clients (though they are fellow workers, they're still your clients: no them - no job there for you), to access 'current' data; our finance people could run any kind of query they wanted (though if they didn't provide ANY qualifiers, their query wouldn't run); against a copy that was updated weekly (run over-night from HQ to all regions financial data servers every Thursday night). Was faster than going across the WAN and was reasonably current and their read-only access was not affecting 'precioussssssss'.

    Remember, you're maintaining it so it won't get pooched; it's their data they need, in order to be (more) effective, right? Or is the data simply gathered because that's the way the system was designed or some screwed-up business resumption plan? If it's useful - let them access it. And for the stupid ones - they give-up when they find-out there's no magic 8-ball due to their assinine query parameters (or they become management).

    The rest, may mine some gold or quality 'gems' to help the company and that's a good bottom line. If they get results - why worry over a copy? If they don't; nothing lost but time and the wise ones will move on, or fine-tune. It's all good...

  269. what about security.. by Anonymous Coward · · Score: 0

    One reason to heavily restrict sqlplus style access to an Oracle database is that unless you're completely on top of your patching there's a significant risk that anyone with that access can get their privileges escalated to DBA level using one of the many SQL Injection vulnerabilities in Oracle packages. If you want the really paranoid option you can point out that there are probably zero-days in there as well, even if you are fully patched (AFAIK NGS SQuirreL (a database security scanner) will mention those in any reporting you do).

    If you're looking for examples to show your management, then a quick trip to millw0rm should do the trick http://www.milw0rm.com/exploits/4994 , http://www.milw0rm.com/exploits/4570 etc etc

  270. You must be a sysadmin by Anonymous Coward · · Score: 0

    Really ... you sound like a typical sysadmin. "No" is the first word that comes out of your mouth. Really the dept you work in should be called the No Department. IT departments should be slaves to the business ... they are the ones that keep you employed.

    How about something more creative ... like a second copy of the DB that they query and it does not matter if they issue long running expensive queries.

  271. Replicate but use MS Access, its easier by Anonymous Coward · · Score: 0

    Replicate but use MS Access, its easier and you'll be done with giving them access to their data in 1 hour. That's all they probably need anyway...

  272. A Business Reply by bl1ndsp0t · · Score: 1

    Without knowing the specific relationship and obligations you have with the company, I might proffer a suggestion: Offer access to your data as a service for a price. If you are worried about neophytes causing mass chaos on your well-oiled machine, tell them that you can give certain people access, if they pass your certification program. Certification and training (by you) cost them, which may make them back down. Otherwise, it puts more money in your pockets and minimizes the risk of problems. It also may make your job easier in the long run by having them do the heavy lifting instead of you. More money for less work - sounds like a win.

  273. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  274. It's against your design paradigm by Anonymous Coward · · Score: 0

    Think of the situation as being akin to another programmer requiring that you write all of your classes with only public members and public inheritance. Giving customers unfettered access to your raw data could at some stage in the future seriously inhibit your ability to make changes to the ways in which you hold and manipulate that data.

  275. Link tables using Microsoft Access by GEO2000 · · Score: 1

    Hey there. The way I do this at work is by giving the client an Access database, where using ODBC, I link it to the Oracle/MSSQL database tables. This way, they can use Microsoft Access to create their own ad-hoc queries / reports etc... MS Access is a very powerful and affordable ad-hoc query tool to interface most databases supported by ODBC. If you are concerned with security, you can implement MDW security and password protection against the MS Access database. Your client will be extremely happy with such a solution... He can't complain about this, as you are giving him full access to the tables... You may have to add some security restrictions to to only allow viewing permissions. Regards from Down Under.

  276. How about... by Anonymous Coward · · Score: 0

    ... just not being a petty, territorial dickhead?

  277. Show them a better way by Anonymous Coward · · Score: 0

    If they are asking for read-only access the database then it's likely that that your website/database doesn't fully line up with their business.

    Start by making sure you understand their business requirements. Is their business changing ?

    If they still press for read-only access to the database then they need to understand that they will have to incur the costs for maintaining these ad-hoc SQL queries and updating them for schema changes. N.B. In my experience these on off queries are anything but one off.

    If they understand the costs and still want to proceed then you could try exporting the data to a secondary database but they will probably want the data to be live. Also, I suspect neither you nor your customer wants to look after another database box.
    Instead, I'd recommend defining the logical data model and representing this as a set of read-only views. At least this will allow you to make changes to the physical schema without breaking their "one off" queries.

  278. Why ever not? by cruachan · · Score: 2, Insightful

    You have this completely the wrong way around. I always welcome interested user-access to my databases, except of course I make sure that they have access to read-only views set up so they can extract the maxiumum amount of business information out with the minimal amount of sql and if performance is an issue I give them access to a replicated copy (it's very rare indeed that a business user won't be happy with a nightly update).

    I used to work in blue-chips inhouse as dba, and now I'm an consultant to a mix of large and small businesses. In both positions one thing I always try to do is identify an office worker who is interested in IT and encourage them to act as the local 'expert' for extracting data from their databases. There's always someone in an office who everyone else asks first to fix their computers, if you identify them and take them under your wing not only do they get a lot of status from being the local expert (and possibly a good argument for a pay increment!) but they keep you from having to do mundane sql enquiries and you get a natural ally with your users.

    Don't make the mistake of dismissing office clerks as somehow stupid and not capable of handling the mysteries of IT like you do. Generally these people will be massively familiar with spreadsheets so explaining tables as like spreadsheets is an easy first step. I've encouraged and trained clerks to the level where they can throw around multi-level joins and subqueries quite happily (and taking acount of the indexes!) before now and these people often have an advantage over you in that they probably know the data at a more intimate level then you do. Furthermore having a good fan base of such people tends to work well for you as they then appreciate what a dba actually does and they're sure to make nice noises to their bosses.

  279. Costing the job. by malkavian · · Score: 1

    The simple way to make sure that someone really, really wants to do the job is simple.
    You cost up what's likely to be a realistic cost to yourself for allowing someone access to the database.
    Some of the things to consider are:

    1) Who will be accessing the Database, and what level of qualification do they have with Oracle. The answer "We use Microsoft Access to generate queries" is a bad sign. This effectively means 'little to no Oracle experience". Where I work, I point blank say I don't support Access, as half the Access issues used to end up on my desk as reported Server issues, which investigation (taking time) pointed right back at Access.
    If they don't know SQL enough to be comfortable explaining all the joins and how correlated subqueries work, they don't get to write their own queries (the amount of times I've had to turn round and say to someone
    "You know, that isn't doing what you think it is." is quite incredible).

    2) What is the expected traffic level. If they don't know what kind of queries they're looking at, how many per day they intend to use, and what bandwidth they use, then you let them know that complete ad-hoc usage is very expensive (if you have many customers, you can't afford them ALL to be running round using heavy load queries all day with an arbitrary number of users at the site. That costs in Hardware and support, and someone needs to foot the bill, and you need to make a profit).
    Work in the cost of extra hardware necessary to fulfill this (with extra support costs etc.).

    3) Renegotiation of the Contract for extra staffing levels at your end (and time taken for you). If you agreed that they could have an interface, and you system was designed around that, then by all means, they can have direct access, but it's a change to the terms of the contract, and may mean you'll need extra staff to keep tabs on this (so much more can go wrong with ad-hoc queries that doesn't with well designed interfacing, which needs closer eyes kept on the server, and more debugging time, again, someone has to pay for this, and it's something they want, not you).

    4) Standardised process (Dev -> QA -> Live). If they want to run queries on a live server, then they need to have tested the query (either on a 'test' database local to themselves with anonymised data, or on your test database, again with anonymised data), then have it passed by you for sanity checking, then have it able to be run on Live. Again, QA negotiable if they have someone who actually knows how to use Oracle properly, but the Dev phase should be non-negotiable.

    5) Enhanced debugging costs. If you find a query they have run that causes issues with your server that need fixing (runaways that don't get reaped, etc.) causing issues to other clients on the server (or even just to them), you have a very high cost for fixing this.

    They need to understand they're entering a different ball game by having direct access. They also need to know the ramifications, and that if they screw up, it's not you that'll be carrying the can financially. They need to take responsibility for what they do. If they're good, and have someone qualified to do the job, then for them, it should be quite cheap to have direct access.
    If they're just thinking it'd be good for a PHB to play with access, or tinker with the data import to Excel without really knowing what's going on, it should be extremely expensive.
    With the debugging costs, this could be rather expensive anyway. As long as they're aware of that, and are prepared to pay, then sure. Go ahead. But make sure they pay a very realistic figure.
    Mostly, the figures you arrive at dissuade all the but most deep pocketed 'tinkerers' from playing around, while allowing the people who really can be a boon to you if you manage the relationship well to get extra value from the product.
    Being sensible about it gives you a good reputation (when I've denied access based on realistic evaluation in the past, and explained this, even though client

  280. The answer is simple. by majesty2180 · · Score: 1

    Write some views, be sure you write them well, as to reference everything the customer would EVER need. Then, give them the public role to the database, but do not grant select on the tables... only the views. Now, the customer doesn't see your tables, and only runs (essentially queries you have written as views) what you would approve of through the views. Additionally, you could have the customer purchase something like Crystal Reports to build these reports.

  281. This is the utmost BS. by hummassa · · Score: 1

    But he should never forget (and neither should the GPP) that the customer is always right!!! Maybe in sales the customer is always right. But this isn't a sales deal this is a tech issue and that is how the question was phrased. So in this instance most of the time the customer is wrong. The only truth to your statement is that the customer always knows what they need the end result to be, they are far from always right, though. That is just bullshit sales jargen that managers with no clue use to enforce fake rules.

    The problem is here that the internet made everyone experts on everything and some weekend gamer wants to expand his resume, and his boss was dumb enough to sell it up and now here you are. Don't be silly. If I was your client, and you gave me this BS "only on sales the customer is right, on ops the customer is just a nuisance", you would be out of a job. As many people said below, there are a lot of competitors who would think I'm right and you are never irreplaceable. The client supplies what you need ($$$), not the other way around. Did you know that each satisfied customer generates at most three more sales and each unsatisfied customer BLOCKS at least eleven sales?? [citation needed]

    Get this: every part of a deal is a sales deal. I (and many consumers) only shop where I know I will be well treated before, during, and, most importantly, after a deal.

    One example: I make my car insurance with the same broker for 12 years... because she always gets me a good deal and the insurance company she deals with never failed to deliver in the case of a broken car window (covered by my insurance) or anything else. Once the insurance company made something covered difficult, and one call to the broker, things were solved in the same day: because she knows _I_ make her bottom line, next year I will purchase the insurance for two cars again and she will get the comission... so she can eat.

    Other example: I am a jeans-and-t-shirt kind of guy, but sometimes I have to wear a suit. I bought three different suits in the last 12 years, and in the same period, my weigth varied from 80kg to 100kg (175lb to 220lb), up and down, and _every_ single adjustment I had to do in my current suit was done for free, quickly (saving me to have to buy ten instead of three suits).

    So, don't give me "I only do what the client wants if it's convenient", because your client always has the power to put you out of business.
    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re:This is the utmost BS. by lawn.ninja · · Score: 1

      You missed the most important part of my comment. It was the part where I said the customer is not always right, they instead always know what they need. Sure you can deliver them exactly what they want and when. But the better idea is to sit down and talk with them. The customer always knows what end result he needs, he rarely knows what needs to be done to get it. That is why he is coming to a techinical firm to have his tech stuff taken care of. So while on the very top level of things it is a sales deal, much past the bullshit it takes to hook them and it becomes a technical issue. One that a customer has sought your advice on. They have come to you with an idea of how to get it, and it is because they have some "technical" guy who thinks he knows something about a corporate production environment. It is your job as their provider to ensure that they get the best quality access to their data, and be able to use it efficiently. But I imagine if you had actually read through my whole post you would of caught that. I'm saying you didn't read through my whole post in order to avoid calling you a monkeydick for not comprehending it, sales guy.

      I always deliver what my client wants too, always, without fail. You know how they have surveys that say that most IT projects fall short or go way over budget. Not where I am. Because the first suggestion isn't always the best and the customer is certainly not always right. If I followed that motto I would be pissing my budget and yours out of every gap, chasing after bleeding edge technologies that do nothing but deliver hype. Instead I listen to what my customers want their end result to be and I come up with an educated plan on how to accomplish that for them. They don't want all the data, they want the right shit, which they are not getting now. At best buy the customer is always right, but if you bleed money on the backend they're going to jump ship too. And if the customer wants to stomp his feet about how he needs access to all the data or he'll leave, he can go and get his yes man service somewhere else. He pays me to be technically competent and to make the best decision in that arena for him, that is why I am an expert and he is the customer.

  282. Read locks BY DEFAULT by dlcarrol · · Score: 1

    WITH (NOLOCK) will get around that, with a suitable sacrifice of consistency for long queries.

  283. web services by philci52 · · Score: 1

    I think you need to engage them as to why they want live access, the reason is probably for 1 of 2 reasons: Your support is not fast enough or they want to integrate your data with theirs and do some correlation or unified display. The simple solution is to set up webservices so they can get at the data and you can control the SQL.

  284. Impose many restrictions and rules by TheGreatOrangePeel · · Score: 1

    As a DBA, my heart sinks at the thought of amateurs pawing through my database.

    AMEN! And I say that AS one of those "amateurs" ... I had to work on live, production data on a daily basis. Sometimes it was a simple report, sometimes it was a VERY complex report and somtimes (more often than I'd like) I had to issue updates to the database.

    We had a set of rules we were required to follow. It's been about half a year but here's many of them:

    • Query against a test environment (or yesterdays 'cached' database) first to get the query to be what you need and THEN run it against production
    • Send any queries that run longer than 10 seconds to a DBA to see if they can improve efficency
    • Queries taking longer than 3 seconds should be run on off-peak hours (11-1 and 4pm on)
    • WHERE clauses should use AT LEAST one primary key on each table queried.

    I could go on, but you get the idea. My point is that you could say "Alright, but if we do that, EVERYONE who MIGHT query the database needs to send me an email stating that they agree to the following rules and I will reply with their login credentials. From there, create a script that can search through the log file for habitual rule breakers." It might be enough to get them to say, "You know what? forget it."

    We also had 3 tools. One was just a standard SQL query tool (WinSQL ... this is not an endorsement) and the other two provided access to otherwise inaccessible tables. The idea was that the tools enforced certain rules and restrictions on what information could be retrieved.

  285. No by whitroth · · Score: 1

    First question to them: are they willing to provide signed legal documents making them financially liable should any damage or data theft occur due to their access to the d/b?

    If so, then the next thing you need to do is have your software developers build a website interface for them, that does validation of the queries, and also scan for injection attacks. DO NOT ALLOW THEM UNFILTERED ACCESS.

    If your management doesn't like that, request their written signoff on a document/email that includes the above warnings.

                    mark

  286. You should never say 'No'. by krunk7 · · Score: 1

    There is always a way to implement solution that is safe. Some posters above have mentioned a few with user permissions, virtual tables/views, and complete database replication on a standalone system.

    When I was first getting into administration, a good friend of mine who is very successful in the field said something that has stuck with me throughout my career. Not just in administration/IT, but very generally applicable. I'll pass it on here:

    There's no such thing as an absolute 'No'. There are only solutions and costs.

    What does the customer want? Access to his data. You should not be thinking "Should I or shouldn't I allow this?", rather the question should be "What is an acceptable means of providing this service that will meet my and my companies requirements of security, accessibility, and policy? How much will this solution cost?". If you approach all of your problems this way, it never comes across like you are denying your customer or opposing your company. The decision is always in the hands of the customer/manager/boss. They walk away feeling like they've been given a choice and made the decision that suites them best.

    Not to mention that sometimes you find your initial instinct was wrong. Maybe the customer is fully willing to absorb what you thought would be an outlandish cost. Maybe it doesn't end up costing as much as you thought it would.

    It's always better to be known as a solution finder then a decision maker unless you are the person paying the cost associated with those decisions.

  287. Performance *is* a valid business reason to reject by Toasterboy · · Score: 1

    Most CRM systems (big databases) *NO NOT* allow free query of the production database by the users because random, unoptimized queries will grind the database server to a halt. In fact, even on production servers, usually the template queries are so badly written that the thing runs terribly even without randomization from free queries.

    Read only access to the database to someone writing poorly optimised queries is extremely dangerous. As an example, I've optimized poorly written queries before which previously ran in 45 minutes down to running in 45 seconds, on the same system. If someone runs a stupid query against the live database it can kill the performance for hours, and also may cause denial of service, timing bugs, and race conditions to be exposed in the applications dependent on the database due to the poor performance.

    What most folks do in this situation is to allow free query of a second copy of the database which is not updated in realtime. This allows random queries for research to run against something that is not in production and will not have side effects for the other live database clients. This should be quite acceptable for random one-off research requests.

    Cheers!

  288. We do it all the time by Uerige · · Score: 1

    We do that all the time, and it is not a problem at all. Our customers get periodic reports, we do ad-hoc reports for them, and they all get read-only access to the database. Because that way, everyone saves time and they get exactly what they want.

    They can't bring down the production servers because they only get access to a clone. And each customer query is limited to something like 15 seconds of cpu time, after which it just returns an error code (this is an IBM system but Oracle must have a similar method of enforcing quotas).

    OTOH, if your customer's only reason is wanting the ability for ad-hoc queries you probably just need to explain to them how they can load your csv-reports into a database.

  289. Re:Performance *is* a valid business reason to rej by SuiteSisterMary · · Score: 1

    Also, if your schema is complex enough, or even if the data itself is complex enough, the people who want the queries might not have the knowledge to actually pull meaningful data out of the system.

    Now, that having been said, ''No!' is never a valid response, especially a 'No, MINE!' response, which is exactly what the OP gave.

    'If we do that....' is certainly a valid response, or 'The reservations I have about that request are....' is certainly a valid response, 'That's against best practices; this, this and that are considered bad ideas by the industry, for the following reasons...' or even 'that's against standard practices, because...' are always good ones, too.

    --
    Vintage computer games and RPG books available. Email me if you're interested.
  290. Leave Business Decisions to the Business by Anonymous Coward · · Score: 0

    I am not a regular poster do I didn't bother to register, therefore I guess that makes me a "coward".

    Anyway, I am an IT Security professional in the US and not the UK, I am not a "database" expert. But reading this touches upon a problem I see quite regularly and can be resolved with some tactful information being provided to your business leadership.

    As the title suggest, leave business decisions to the business, the inverse being true as well. The business should leave IT decisions to IT, (if it is in-line with the business requirements!).

    Anyway, your particular instance is a customer requesting something which seems from a technology perspective to not make sense, I am also guessing your business leadership delivered this request to you and not the actual customer. If that is the case then it would be recommended to respond to the business point of contact.

    What is recommended is to identify the IT business risk, (e.g. accidental information disclosure,system unavailability, application failure, and/or non-interested customer impact, etc...). You could also run this past your IT Security organization as it very well could impact the CIA of security (confidentiality, integrity, and availability).

    Also quantify the additional number of man hours required to not only support the request but to also rectify any negative impact from this request. If the numbers are significant enough the business leaders may return to the client with a statement of "we can fulfill this request with no problems but unfortunately this is beyond the scope of our current service agreement and therefore we must charge an additional premium for this service". (This will usually lead the customer to a conclusion they do not really need the request).

    In providing all of this information in your response to the business leadership it is also recommended you offer better alternatives to the initial request which may make far more sense and yet deliver to the customer request.

    While I know it is all too often a pain in the ass, don't forget the actual customer is paying the bills including your salary as such it is in your best interest to attempt to deliver to some sibilance of the request. With that said you must also honor the requirements of your other customers and no one customers requirements should deny another customer of their ability to do business. Unless that customer is willing to absorb the costs, which is usually not an option.

    Sorry for the long monologue and best of luck.

  291. It's not the Information Prevention Department by CurtMonash · · Score: 1

    Too often -- and it sounds as if you're an example of this -- IT thinks it's really the Department of Information Prevention. Your only possible legitimate basis for refusing this effort is cost.

    As somebody already pointed out, you can dump their data into a separate data mart, and let them query away to their heart's content.

    This data mart could, if you like, reside in the cloud. EnterpriseDB/Elastra is an Oracle-compatible solution that would work well for the size range I'm guessing you're in. If it's multi-terabyte, however, I'd look more at Vertica/Amazon.

    Or if the database fits in a single machine's RAM, look at QlikView.

    There are many better ways to answer the question than simply saying "No, because you're/I'm stupid."

    --
    To err is human. To forgive is good system design.
  292. Options you have are: by Anonymous Coward · · Score: 0

    well Ok first of all I would like to answer some people who wrote before me and said "How read only access can screw the DB up?!!!" well for your info as some of our fellows up there mentioned correctly if they write a stupid command which generates millions of lines out put or they join tables in a very very stupid way (which some amateurs will I am sure of that) then you are going to have a problem. A real story, I had a professor at the university who was working for the Federal Government and his job was to write and maintain DB of salaries of all people working for the Federal government in that state! One day one of his subordinates writes a stupid Query. Guess what? He became famous in a day! And every one referred to him as a stupid who brought the DB down!! He had to wait three year for his Boss to retire to get a promotion!!!
    The way I see it you have two may be three options:
    1- Come up with set of valid reasons and convince the other side that giving them an access to the live DB can harm them (Not you THEM).
    2.Give them the access but Restrict them so they can not Generate out put of more than a certain length (I think that is possible to do)
    3- Make an I identical copy of the database on another server which is being fed at the same time with Live DB (or with some delays) and give them access to it.
    I believe these are the options you have to choose from.
    Hope this helped.
    Good luck

  293. Take a step back by ot0ro · · Score: 1

    It's pretty interesting to read (and pick out) the responses written by techies - response ranging from "No way, absolutely not!" to "Sure, come on in, Oracle will take care of your crap SQL".

    The former is the sort of reply that paints IT in a bad light. As technologist, we do not have a particularly good reputation anyway (see The IT Crowd) and by blatantly rejecting a request like this we are not exactly be doing ourselves any favours. The latter response is perhaps a little too cooperative. There are definitely technical issues to consider, first and foremost the priorities of the database and its related systems. Any other services should be evaluated carefully before making a decision.

    My approach on this would be to take a step back from the technology and actually *talk* to the customer. Try to understand their requirements - what exactly are they trying to do here? What is their overal goal/objective with the data? Often you'll find that the user has such a narrow-minded view on the world that they make very specific requests (such as this) when their actual aim is something completely different.

    It may be that they are simply using SQL because historically that is the only tool they have had at their disposal for querying the data. Perhaps what they are really after is a better reporting/MIS tool. Maybe putting Crystal Reports or Business Objects on top of your database is a better way to go.

    If after all this, they really do want direct database access, then the technical discussion would be pertinent. Do it make sense for them to query your database? How about replicating part or all of your database to their site?

    But before you move forward on any action points, depending on the management/ownership structure in your area, you may want to escalate to superiors/team leads before proceeding.

    Hope that helps.
  294. Try Interactive Reporting by Anonymous Coward · · Score: 0

    Setup Interactive Reporting for them. You can allow them to generate their ad hoc queries, without bjorking your database. I'll even give you a much discounted price, if you mention slashdot!

  295. Set up a front end by Anonymous Coward · · Score: 0

    If they want Read-only access, then the only issue you have to worry about is that they'll request TOO MUCH data at one time and bring up the load on the server to an unacceptable level.

    To that end, build a front end so they can put together their own queries. Restrict the "select all" query, add limits.

    If there's a date field, experiment with your engine to determine what the range could be before increasing the load to a crazy level, and set up your gui to return some sort of message to the person along the lines of "You've selected too much data... please try again with a smaller selection or contact the Help Desk for a custom query"...

    Also limit the # of queries that can be executed simultaneously - build that into your GUI as well so they know how many are running and if their requests might be delayed...

    That will probably cover 99% of the crap they want to run on their own, and you can run the other 1% at night when things are more quiescent.

    One thing you can count on is that management is going to make this happen - they never would have asked if they didn't want it to happen. All they want to know is how it's going to impact their profits - tell them the gui will need to be developed - stage 1 will offer X functionality, stage 2 will offer Y functionality...and so on. Each stage is an upgrade - billable hours, and the like... having the GUI frees up the crew to do "whatever" which reduces costs, increases billable hours, etc...

    Start planning now... it's gonna happen - if you make it happen correctly, you're a godlike creature. Make it turn to shit, and you're gone.

  296. Simply write or purchase an ad-hock query tool... by Anonymous Coward · · Score: 0

    Write a quick front end that directs there query construction. This could be a simple browser based tool that allows the customer to pick from acceptable tables and fields in a specific way you decide upon. This enbles you to open up access but not allow the customer to construct dangerous queries. In addition you can tune views specifically for the customers needs making the construction process even easier, more efficient and safer.