The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.



Go to last post Go to first unread
#1 Posted : Wednesday, November 2, 2016 3:55:31 PM(UTC)

Rank: Newbie

Joined: 10/21/2014(UTC)
Posts: 2
Location: Mülheim-Kärlich

Hi all,

I tried migrating out Screenconnect database from SQLite to MSSQL.
The server successfully runs on a MSSQL instance now, but I need to migrate historic session data too, since we need to access this information on customer request.
I was able to create a SQL dump from the SQLite database, but the import fails due to several issues:

1. Table names in the dump are enclosed as ``(INSERT INTO `Session` VALUES …) => this can automatically adjusted

2. In front of several dump entries there´s a “X” which cannot be processed (INSERT INTO `Session` VALUES (X'f31b0e8677244e4aa428005210ce26cd',1, …)
Is this a known issue? I can eliminate these tokens, but I´d like to know what they mean.

3. IDs in the dump are in binary form (INSERT INTO `Session` VALUES ('E�ř| F�]m�׉Թ',0,'test'), but MSSQL expects them as hexadecimal strings.
How can I convert these IDs? If you can tell me how the binary form translates to the string representation I´ll be able to do the conversion myself.

Thanks in advance for your help!

#2 Posted : Wednesday, November 2, 2016 10:00:01 PM(UTC)

Rank: Administration

Medals: Level 3: Shirt off your back! Received 25 Thanks!

Joined: 7/23/2013(UTC)
Posts: 715
Location: Raleigh, NC

Was thanked: 66 time(s) in 63 post(s)
X'…' is a blob literal; the equivalent in MSSQL is 0x… (without the quotes).
It looks like the value in #2 is actually a guid, though 0xf31b0e8677244e4aa428005210ce26cd still works for that. It's also in a different order than you'd normally see; an equivalent literal is '860e1bf3-2477-4a4e-a428-005210ce26cd', with the order of the pairs of digits (bytes) reversed in the first 3 sections.

Getting all the guids to output like #2 rather than #3 would be ideal (something like UPDATE Session SET SessionID = CAST(SessionID AS BLOB) maybe?).

You could try pasting a #3-style string from a known session into something like this utility and see if the UTF-8 or UTF-16 code units output looks anything like the session ID. It probably won't be exactly the same, though, unless those � characters are my computer/browser's fault rather than what you actually got.

Though if your customers aren't asking for stuff based on session IDs, it probably doesn't matter much what they are specifically, so long as every instance of a given session ID ends up as the same thing.
ScreenConnect Team
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.