Integration to SQL Server Express 2012
-
- 2 stars
- Posts: 44
- Joined: Sat 10 Nov 2012, 07:31
Integration to SQL Server Express 2012
What is the easiest/best way to transfer the data source values in real-time to local SQL Server Express 2012 64bit..? Any good examples? I would like to keep only couple of days data in Switch King database and make deeper analysis with SQL Server.
Last edited by pekkak on Sun 06 Jan 2013, 06:22, edited 2 times in total.
-
- 2 stars
- Posts: 44
- Joined: Sat 10 Nov 2012, 07:31
Re: Integration to SQL Server Express 2012
Is it possible to modify DSVWriterPlugin.dll to write to SQL Server like MYSQL?
viewtopic.php?f=23&t=558&start=10#p5081
viewtopic.php?f=23&t=558&start=10#p5081
-
- 3 stars
- Posts: 161
- Joined: Wed 11 Jan 2012, 16:40
- Contact:
Re: Integration to SQL Server Express 2012
It's exactly what it does.pekkak wrote:Is it possible to modify DSVWriterPlugin.dll to write to SQL Server like MYSQL?
viewtopic.php?f=23&t=558&start=10#p5081

If you use Google Trasnslate I think that you can understand the config... shouldn't be too hard.
http://switchqueen.snowland.se/ - Every king needs his queen
-
- 2 stars
- Posts: 44
- Joined: Sat 10 Nov 2012, 07:31
Re: Integration to SQL Server Express 2012
I already downloaded the RAR included in the first message, but I didn't realize that the mysql.dll works also for MS SQL Server. Is it really so, aren't there any MySQL specific procedures? How should I modify the connection string (surely no port for instance and do I need to do this with ODBC?):
dbConnectString="Database=utv;Data Source=localhost;Port=3306;User Id=root;Password=mysql"
-
- 3 stars
- Posts: 161
- Joined: Wed 11 Jan 2012, 16:40
- Contact:
Re: Integration to SQL Server Express 2012
It isn't written for MS SQL Server... it's for MySQL so my guess is that you can't use MS SQL.pekkak wrote:I already downloaded the RAR included in the first message, but I didn't realize that the mysql.dll works also for MS SQL Server. Is it really so, aren't there any MySQL specific procedures? How should I modify the connection string (surely no port for instance and do I need to do this with ODBC?):
dbConnectString="Database=utv;Data Source=localhost;Port=3306;User Id=root;Password=mysql"
If you know your way around (any) SQL server you should be good to go with MySQL.

... on the other hand, it would be nice with a plugin that writes to MsSQL instead (I use it a for storing my statistics). Or why not ODBC and then you should be able to use "any" database engine.
http://switchqueen.snowland.se/ - Every king needs his queen
-
- 2 stars
- Posts: 44
- Joined: Sat 10 Nov 2012, 07:31
Re: Integration to SQL Server Express 2012
I have MySQL database, but it is in a web hotel and with Switch King I would like to use local SQL Server Express which I already have installed for other purposes (mainly for Windows performance counters). I wish I had any clue how to make these plugins but coding DLLs (with C#?) is little bit too hard core for me.. 

-
- 5 stars
- Posts: 637
- Joined: Tue 09 Nov 2010, 21:51
- Location: Västervik
Re: Integration to SQL Server Express 2012
What is the information that you wanna save in the db?
Time - Device name - Device ID - Value
or is there any other information that you need to have saved in the ms sql server?
Time - Device name - Device ID - Value
or is there any other information that you need to have saved in the ms sql server?
-
- 2 stars
- Posts: 44
- Joined: Sat 10 Nov 2012, 07:31
Re: Integration to SQL Server Express 2012
I think those are exactly what I need. I'm not sure what other useful information is available. In the MySQL integration the MySQL table has these columns:
`switchking_logid` int(11) NOT NULL AUTO_INCREMENT,
`id` int(11) DEFAULT NULL,
`value` double DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`local_timestamp` datetime DEFAULT NULL,
`expires` datetime DEFAULT NULL,
`failure` varchar(45) DEFAULT NULL
I suppose someone uses "expires" and "failure" information. Maybe "device group" too?
`switchking_logid` int(11) NOT NULL AUTO_INCREMENT,
`id` int(11) DEFAULT NULL,
`value` double DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`local_timestamp` datetime DEFAULT NULL,
`expires` datetime DEFAULT NULL,
`failure` varchar(45) DEFAULT NULL
I suppose someone uses "expires" and "failure" information. Maybe "device group" too?
Who is online
Users browsing this forum: No registered users and 4 guests