Everything short of the customer data can be opened up, and even then the customer data can often be partially scrubbed and then shared for the benefit of all your customers.<p>One example was a Point of Sale system I worked on, we were able to simplify adding new products by creating a community database of UPC/other barcode formats that would have the name, description and other attributes of an item along with an average price. Very useful way to creatively transform this data, and help our clients do less work while accomplishing more.<p>With regard to opening proprietary code, we did a few credit/debit/EBT integrations, and one of the best choices made was to release our code and do development in the open.<p>When working with each vendor we could highlight exactly where our code was running into issues with their buggy hardware, and we were able to create straightforward non-NDAed documentation for these devices, which helped other projects that never had credit/debit integration. Additionally, our competitors didn't even end up fixing the bugs we highlighted in our documentation, I really thought they'd at least try to be a bit more competitive/feature complete.
Open source the software (in my opinion, you should release all of the code under a GPL compatible license (or public domain)), but not the contents of the databases that include private data (although the database schemas may be made available, and, depending what you are doing, maybe also the contents of the sqlite_stat1 table (or the equivalent for other database systems) if you are willing to include that information). Databases containing public data should be made available though, if you have such thing.
I've seen it happen when a company decides to close it's doors.<p>Assuming you mean an active company, a lot can be open source that deals with customer data, because their data is not in the source code. At Hofstadter, we are open sourcing some today with a plan to open source our core tool. There is a path for a gradual transition. We also have some projects in the works that will form our always free tier and become open sourced early in their life. OSS is important to us for many reasons, one is that we have benefited a lot from them, another is our focus on developers.