Knowledge Base Raw Data - Bulk change content
Sorry if this has been posted elsewhere, I didn't really know what to search for!
We've been using an internal IIS site to host images etc. for our Cireson portal knowledge base, (it was a decision before my time, so not sure why that server was chosen!), that server has now been changed and I need to change hyperlinks typed within hundreds of KBs.
So my question is, does Cireson store the raw data of the knowledge base anywhere (ie in a DB table or text file/s), where I could find and replace the old URL and swap it for the new server address? - the folders and file names are the same, so would be an easy swap if I can get at the data!
Thank you!
Best Answer
-
Tom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
Making a lot of assumptions here, so please point out any that may be wrong.
If you are using the HTML Knowledge Base, then deleteing a knowledge article is as simple as deleting a row from ServiceManagement.dbo.KnowledgeArticle. So I am guessing your question is about how to find the right row(s)? The title and keyword columns in each row could help with that, unless you want to target articles that contain these links. In that case, you would need to be able to read the contents of the article itself.
The good news is that you can. The AnalystContent and EndUserContent columns contain the article body. You may notice that the data type for these columns is varbinary. This means that if you want to limit your results by something contained within the article body, you have to convert it from binary to text before you can make any text comparisons to it.
You can use CONVERT(varchar(max), EndUserContent) LIKE '%https://myserver/somepage.aspx%' in your where clause of your DELETE query to find this fictitious link in the end user content of all your articles, for example.
5
Answers
We've managed to resolve this now without changing the links.
Anyone know how I can remove posts!?
Making a lot of assumptions here, so please point out any that may be wrong.
If you are using the HTML Knowledge Base, then deleteing a knowledge article is as simple as deleting a row from ServiceManagement.dbo.KnowledgeArticle. So I am guessing your question is about how to find the right row(s)? The title and keyword columns in each row could help with that, unless you want to target articles that contain these links. In that case, you would need to be able to read the contents of the article itself.
The good news is that you can. The AnalystContent and EndUserContent columns contain the article body. You may notice that the data type for these columns is varbinary. This means that if you want to limit your results by something contained within the article body, you have to convert it from binary to text before you can make any text comparisons to it.
You can use CONVERT(varchar(max), EndUserContent) LIKE '%https://myserver/somepage.aspx%' in your where clause of your DELETE query to find this fictitious link in the end user content of all your articles, for example.