Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Datalog DB driver help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can someone help me with how to use the Datalog DB driver. Some like a "Datalog DB for dummies" would be the level I need

I have no database experience, but my machine is running MySQL from a WSUS (Windows Services Update Server) install that I did - at least I think thats where it came from (too long a go to remember). OS is W2k3 server.

Mick
I put this text on page 7 of the datalogdb thread. I've had difficulties getting mySQL to work.

jscheller Wrote:Okay, here's a stab at steering everybody to the right place to get installers for SQL Server Express.

If for any reason you haven't already installed .Net 2.0, you'll need to do that first...

http://msdn.microsoft.com/netframework/

The two links below should be the direct file downloads you need to install everything for the DataLogDB or ReminderDB driver. The first link is the actual database, and the second is the management console app:

http://go.microsoft.com/fwlink/?LinkId=65212

http://go.microsoft.com/fwlink/?LinkId=65110

These links for SP1, which is the current released version. I'd stick with this unless you need the SP2 update for some reason (like you're running Vista apparently). The download page for SQL Server 2005 SP2 Beta is here...

http://www.microsoft.com/sql/ctp.mspx

Quote:Step 1) Download & install the SQLServerExpress db & mgmt studio linked to earlier. (it's free)

(Steps 2->4 are in Mgmt Studio)
Step 2) Create a new db. Doesn't matter what you call it. AA
Step 3) Use the "execute" button to create 2 new tables using the commands jscheller put in the HTML page on the first post.
Step 4) "Open" the datalogschedule table, add however many rows for fields you want to actually log just like mine above.

Step 5) In XP, go to start.control panel.AdministrativeTools.DataSources, and add a new data source using the SQLServer datasource, select the db you installed above

Step 6) In CQC, Import the Datalogdb driver, add a new driver named whatever, pointed at probably the only data source you see. You'll have to do this on the same machine that you installed the sqlserver db on, as that's the only machine with the ODBC DSN on it.

I believe that's pretty much it. Try it out, post back if issues.

Finally, my values for the DataLog Schedule table:
[Image: datalogdb-schedule.JPG]
Thanks

None of that matches with what I am seeing with what I have. I will have to do a lot of reading I think.

All I can find is this

[Image: OBDC.JPG]

Nothing that I can find about creating tables. I keep at it

Mick
ah, part of step 5 (add a new data source, aka dsn).

seps 2-4 are what you do in sql server express (or mysql, if you can get that to work). Once you actually have a database to go against, you setup the DSN. User or System means who should have access to it, just the user you're logged in with or anyone on that system.

It's a bit of a PITA to create a new db and tables in mysql if you don't have some background in it. SQL Server Express may be from the Evil Empire, but at least they've created a nice GUI for you to use. That's where you do steps 2-4.
Hi Mick -

The driver documentation page has the SQL commands used to create the tables the driver needs... Once you get the database setup and the tables created, you just need to add one row to the schedule table and it should start collecting for you... It'll take it a minute or two to pick up the schedule, or you can force it to reload the schedule immediately by writing 'Reload' to the driver's 'Command' field.

Really, the toughest nut to crack is getting your database talking. If you're trying to use MySQL, something's out of sorts already because your screen shot shows your DSN using the driver for SQL Server...

If the database is installed on a different machine then where the driver is running, you've got other issues to contend with. For SQL Server 2005, make sure the firewall is open for TCP port 1433 and UDP port 1434 between those machines. Also, there's a setting to allow SQL Server 2005 to allow for remote connections (it's configured to not accept connections by default for security purposes). You configure this using the "Surface Area Management" tool in the admin tools under everything off the start menu. Look for the 'Remote Connections' entry under your server instance (there's not that much stuff there).

Keep at it, and let me know where you're getting hung up...

Jim
Thanks Guys
Quote:If you're trying to use MySQL, something's out of sorts already because your screen shot shows your DSN using the driver for SQL Server...
If I add a source I get to choose what driver I want. So the existing one is SQL Server, but I can add any of those that are listed by the CQC driver as they are availabel drivers to MySQL.

I'll keep plugging

mick
I finally got somewhere.

I already had the database running (MSSQL, not MySQL) and I loaded the Server Manager Studio. That allowed me to create a new database.

I put in the info from the datalog learn page
Code:
CREATE TABLE [dbo].[DataLogSchedule](
    [CQCMoniker] [varchar](50) NOT NULL,
    [CQCField] [varchar](50) NOT NULL,
    [UpdateInterval] [smallint] NOT NULL,
    [ChangesOnly] [bit] NOT NULL,
    [Descriptor] [varchar](50) NOT NULL ) ON [PRIMARY]

CREATE TABLE [dbo].[DataLogValues](
    [Descriptor] [varchar](50) NOT NULL,
    [Value] [varchar](50) NOT NULL,
    [TimeStamp] [datetime] NOT NULL ) ON [PRIMARY]

CREATE CLUSTERED INDEX [IX_DataLogValues] ON [dbo].[DataLogValues]
    ([Descriptor] ASC, [TimeStamp] ASC )
     WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF,
     DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]

and it works on one machine running the above database (the one linked to), but when I try it one tha machine that has my WSUS database I get this error
Code:
Msg 170, Level 15, State 1, Line 15
Line 15: Incorrect syntax near '('.

line 15 is the second last line. I have no clue as to what to fix so I am hoping someone might know. I think Dean said he was using MSSQL

Thanks

Mick
Hi Mick -

You only need to create the database and the tables once on the one machine that will host the database... If you've got it created once on your SQL server machine, you don't need to execute all the SQL anywhere else... This may be exceedingly obvious, but I couldn't quite follow why you were doing this one two different machine with different databases... ;-)

If for some reason you're trying to actually host the database on your WSUS server (and not that first box you mentioned) you may want to consider a completely separate SQL Server instance. If you haven't explicitly installed SQL Server, you may have something odd (like MSDE) running as your WSUS database. The syntax there is probably not compatible with whatever underlying database is being used. Either way, you're probably better of running a separate database instance instead of trying to host this inside the same database instance WSUS uses...

Regardless, the error seems to be complaining about trying to create the clustered index. You can simplify the SQL that creates the index by removing the options so that it looks like this...

Code:
CREATE CLUSTERED INDEX [IX_DataLogValues] ON [dbo].[DataLogValues]
    ([Descriptor] ASC, [TimeStamp] ASC )
     ON [PRIMARY]

Jim
Thanks Jim

I am building a server up for a mate and used his box as a test platform because I could easily repair it if I stuffed it up. He doesn't have WSUS, hence I installed the SQL server linked to.

As for my server (with WSUS), yes I created a database inside the existing instance (I think that terminology is correct). As it is W2K3 server, and WSUS is the newer version of the updater, (and it says MSSQL) I ampretty sure its a SQL server.

When you say seperate database instance, do you mean I should install the freebe SQL server and use that?

Mick

Are you saying that
Also how do I check if there has been anything collected?

Sorry for the dumb questions - I know very little about modern databases

Mick
Pages: 1 2