6Feb/100
Deleting from and editing the spiceworks database
Posted by: David
Why edit the spiceworks database?
- You need to correct an error you made
- You need to delete an old item
- You feel more comfortable navigating the database
WARNING
- If you don't understand what you are trying to do before you attempt to do this you might as well not bother. If you delete something in your database that was included as a foreign key for something else you could really mess things up. Be careful!
How to edit the database
- First thing you need is the ability to edit the database. The one prerequisite for this walk through is that you have Firefox. I find it hard to believe someone in IT wouldn't have this browser right now, but if not, download it.
- The next thing you need to do is open up Firefox browser and go to tools > add ons.

- After the Firefox add on window is up, search for "sqlite manager" and it should be the first result. Compare to the image below and hit "Add to Firefox".

- With Firefox you will get a confirmation window asking you to hit "install now" to install the add on. Do it.

- Once it is installed, it will ask that you restart Firefox. Do it. You can just click the "Restart Firefox" button.

- Once Firefox is restarted the add ons window should come back up saying that 1 add on had been installed. You can just close this window.

- Now you need to go to the Firefox menu bar and click on Tools > SQLite Manager.

- It might take a moment to load it, so be patient. Once it does load it should look like this.

- To view your data base click on File > Connect Database.

- Now you should see a file explorer asking you to find the database you want to open. The first thing you want to do is change your file type to "All Files" because you won't see the spiceworks database with the default selection. Next you will need to browse to C:\Program Files\Spiceworks\db and select the spiceworks_prod.db file and hit open.

- Once the database is open you should see this.

- On the left you see an expandable list of tables that contain your information. In this example I am going to edit the information in a ticket. Browse down the table list and click on the "tickets" table. Click the "Browse & Search" tab.

- The rows that are displayed to the right in the "Browse & Search" tab are the actual rows of information in your database. To delete a row, just right click the row and select delete. To edit a row, right click the row and select edit.

- To edit the information, change what you like in the text boxes and save your changes by clicking "OK".

- Now your information in the database has been successfuly manipulated. Congratulations.