# SQL database structure recommendations

**URL:** <https://forum.inductiveautomation.com/t/sql-database-structure-recommendations/33234>\
**Category:** Ignition\
**Created:** [March 19, 2020, 1:52am UTC](https://forum.inductiveautomation.com/t/sql-database-structure-recommendations/33234 "2020-03-19T01:52:45Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [July 8, 2024, 8:40pm UTC](https://forum.inductiveautomation.com/t/sql-database-structure-recommendations/33234/8 "2024-07-08T20:40:11Z")

</div>

And this is where I have a question or two:

I am attempting to use tag history with MSSQL, but I am not sure how. I get errors stating that the table (sqlth\_drv) cannot be created.

In this particular development environment, I have a user (Ignition) that is also used for the Perspective to access the DB.

Can I, or should I, use this same user?  
Can I change the schema the tag historian will write to, instead of `dbo`?  
Are there any specific permissions required for the user, in the `Securables` tab in the SSMS?  
And besides being a member of the `ddladmin` group, (so that Ignition can create the necessary tables), does it require any other memberships?

I have been playing with the permissions and memberships but I keep getting the same error, `TagHistoryDataSourceLink`; albeit this one occurs even after disabling the tag history on the tag I am testing with. Other errors included `DatasourceForwardTransaction` and `MemoryForwardTransaction`. These two, obviously, stopped by disabling the tag history.

EDIT:  
I should also ask if I need to create a `Database Table Historian` in the `Tag History` on the Gateway, or can I just use a normal DB connection?

EDIT 2:  
Without using the `Database Table Historian`, I am able to get Ignition to create a partitioned table in the DB, but the `DatasourceForwardTransaction` error and it's table (`sqlth_drv`) still cannot be created.

EDIT 3:  
Well, it seems that the error in EDIT 2 must be related to another DB. I refreshed the tables in my working DB and found  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/0785cbd46d63dd37c865fe56aa6a22cb3e22d7b5.png)  
So, it appears to be working. However, I am going to test using a separate MSSQL user login rather than the same one used for actual users.

---

_[View the full topic](https://forum.inductiveautomation.com/t/sql-database-structure-recommendations/33234)._
