r/DatabaseHelp • u/keg504 • Jun 10 '21
Does using an ODBC driver with Excel write to the database server?
I have pulled data from a MYSQL DB into Excel using the ODBC driver after setting up a DSN. I disabled transactions, but the person who uses the DB to maintain a website is saying that the specific table that is being pulled from is being altered in ways that are bad for the website.
There are data manipulations being done and saved in the Excel file. I recognise that Excel is not the best way to manage the data from the MySQL server, but it's been set up for someone senior in the company who is not not comfortable with anything other than Excel, including the website that displays the same information as in Excel.
My question is: does altering the Excel file and saving it send changes to the server, even when transactions are disabled? If not, how would I prevent changes being made server-side?
Edit: Only one user is allowed by the DB host
1
u/Sparkybear Jun 10 '21
Pull the data and copy the output a new spreadsheet that isn't connected? It shouldn't be writing back to the database though. You should only be able to read the data and any changes shouldn't propagate back unless you actually go through the process of exporting the changes
1
u/BinaryStar1011 Jun 11 '21
If the DBA does not want the data being updated then he should create a DB userid with only select rights to only the tables that you need. This is really easy to do and he should have done or suggested that already. This way you connect with this new userid and Excel will not be able to update any data.
1
u/BinaryStar1011 Jun 11 '21
The simple solution is to grant only the minimum rights needed to the userid. If this requires creating a new userid then this should not be a restriction set by the DB host and should be fought or negotiated.