How do you create an ITRS/Geneos alert for MSSQL DB - sql-server

I'm new to ITRS Monitoring, and I am wondering if I could create a Geneos alert that can connect to a MSSQL DB and run a simple select to make sure connectivity is good. Is this possible with Geneos? Are there any plugins needed?

Yes - you can use sql toolkit plug-in. It supports Db2, Oracle, SQL Server, MySql and Sybase. It will look something like this:

Related

How to connect SQL Views to HTML 5 Webpage

I have a question I was hoping to get some feedback on being that it is my first time doing something like this.
I am building an intranet site and need to display a SQL view from SQL Server. I've done some research online and I've seen some people say use PHP to connect to the DB, then HTML to build a table... but those scenarios have been for MySQL or Access databases, not SQL Server.
My question is: what is the best way to to go about connecting and displaying a SQL Server view to an HTML 5 page? (I'm mainly just asking for some suggestions on where to start, any good documentation to look at, etc. not looking for someone to code it for me or anything like that)
First of all, you do not want to connect to the database directly from client side code, direct database queries should always be done on the server side.
I'd recommend using PHP because it's fairly simple, lightweight and widely supported.
You can query SQL Server with PHP, although you may need to download and install the PHP PDO drivers from Microsoft in order to do this. (Google 'sql server php pdo driver' and you'll be able to find them for your particular platform)
Alternatively you may be able to use an ODBC driver instead, although I haven't tried that personally.
In PHP you can use PDO to open a connection to your database, select from the view into an associative array using something like the following:
$pdo_object = new PDO($dsn, $user, $password);
$statement = $pdo_object->prepare("SELECT column1, column2 FROM view1");
$statement->execute();
$data = $statement->fetchAll(PDO::FETCH_ASSOC);
From here you can iterate over this data to render a table or pass it into javascript and have that populate a data grid.

SymmetricDS missing its node_identity

I use symmetricds 3.8.0 to sync data between Oracle 12.1 and Mysql 5.5. Oracle is the Master Server. I use the demo properties to configure with modifying its db connection information.But when I execute command : bin/sym, there show the message below:
This node is configured as a registration server, but it is missing its node_identity. It probably needs configured
It only occur when the master server is Oracle, nothing with Mysql and Mssql, I try it many times but it still show this issue, Do someone meet this problem and help me?
sym_node_identity table has to be populated with one row describing the identity of the root DB on oracle

Metasploit msfrpcd with database

I have a problem, I want to run Metasploit framework as a service, but it can not connect database if use "msfrpcd" tool. If I use msfconsole and "load msgrpc" is ok. So can you help me connect to the database when I use the "msfrpcd" tool. Thanks for your supports.
Try starting the postgres service.
Try running these commnands
service postgres start
msfdb init
msfconsole
This should do the trick.

codeception with ms sql? Behat support for mssql?

Has anyone got this working?
I know the docs say that ms sql support is not tested, so I wonder if anyone had it working?
I have enabled the Db module in acceptance.suite.yml
And my credentials in codeception.yml look like this:
modules:
config:
Db:
dsn: 'mssql:host=******.db.8876686.hostedresource.com;dbname=*******'
user: '*******'
password: '******'
dump: app/tests/_data/dump.sql
In my cest file, I have the following function:
public function testUserDb(WebGuy $I)
{
$I->seeInDatabase('Users',['Email' => 'someguy#email.com']);
}
But I get the following error when running:
[Codeception\Exception\Module]
(Exception in Db) could not find driver while creating PDO connection
So I'm guessing ms sql doesn't work..
It looks like I'm not going to have any joy - anyone know if Behat has ms sql / sql server support?
Thanks
Jon.
Behat itself doesn't have anything to do with databases. If you need connecting to one from a Behat context file, you just use whatever is used in your application.
I've successfully used Doctrine with Behat for example, also with mssql.
For mssql integration you will need the doctrine-pdo-dblib package.

Query SQL Server from Oracle - force metadata refresh

I am a SQL Server developer, with a task in Oracle. DBA set up a DBLink in Oracle that points at a SQL Server database. I am writing a view on the SQL Server data and then a view on the Oracle side to join it with additional Oracle data.
Problem: if I change the definition of the view on SQL Server, even "Select * From myview#dblink" errors with "Invalid column." Closing TOAD and reopening seems to correct the problem, but the real question is how to force Oracle to re-read the metadata without resetting the connection?
This sounds like an issue with TOAD, not oracle. What happens if you do it in SQL*Plus?
I dont know if I understand you but if you got a dblink that points to a SQL server DB in your Oracle DB and you need data in SQL server just do:
SELECT *
FROM TABLE#dblink
SELECT "COL", "COL2", "COL3
from TABLE#dblink
SELECT T."COL", H."COL"
FROM TABLE1#dblink T, TABLE2#dblink H
WHERE T."ID" = H."ID"
Maybe you can do?:
alter view <<view_name>> compile;
I haven't tested this because I have no db link from Oracle to MSSQL.
This seems to be an issue with the Oracle 10g client. The current solution is to disconnect and reconnect. Given that I haven't been able to find anyone else with this problem, i will assume that it is a problem with my client config.

Resources