NAMED PIPES sql server - sql-server-2000

i know Named Pipes are Protocols. but i have not seen even 1 example how to use them?
can u tell me what are the Named pipes ?

Named pipes are one of many interprocess communication protocol. I think the wikipedia entry http://en.wikipedia.org/wiki/Named_pipes explain them well.
In sql-server named pipes are one of the method of communication between the client and the server, you could specify a connection string that use named pipes to get to the server.
See also this question: What are named pipes?

Related

How do I configure one SQL Server to connect to another, so it appears query data is coming from only one connection?

Somewhere recently I read of a method to connect one SQL Server to another, so clients could connect and run queries that appeared to come only from the first server. I cannot remember the proper terminology for this technique, and Google searches have not helped. I thought it was called "external connection", or "external source", but I cannot find this again.
Have I remembered correctly, and can someone give me an overview how to do this..?
To explain further, my preferred SQL client DBeaver only allows one connection in each query. As such, if I wish to join tables from two different servers, there's no direct way to do it...except perhaps this method which I can't remember how to do.
Take a look at the linked server in MsSQL.
https://www.sqlshack.com/how-to-create-and-configure-a-linked-server-in-sql-server-management-studio/
https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-ver15
Use DBVisualizer instead of Dbeaver, if you are on Linux.

How to set connect URL to connect to more than 1 databases in HSQLDB

I've started the HSQLDB server with two databases open. i'm using the server protocol for connection i.e.
jdbc:hsqldb:hsql://localhost/portdb
portdb is just one database, how can i tweak this URL such that it connects to this and the other db?
I've been referring to hsql user guide but seems nowhere defines this
You cannot open or connect to two databases with the same java.sql.Connection. Use two different connections, each with its URL.
You can have multiple schemas inside a database and access them with a single connection. See http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html

Singleton object for database class - but for multiple databases

Background: I am writing a C# class for a Windows Application that will act as a customized Sql Server class that includes custom error checking. And this class will allow for the general SQL functions: executing queries, connecting to database, closing connections, etc.
My scenario is this: I have two separate databases that I need to connect to at the same time. But I want to implement the Singleton pattern so that only one connection can be established for each database (so a total of two connections open at once, but one to each database). I want to prevent a second connection to either database from being established.
I thought about the Flyweight pattern, but I don't think that would apply in this case and that if I can get the Singleton pattern to work somehow it would be the better solution... I can always just not use Singleton and have two database objects, or I can create an "open" flag in the class to be checked when a new connection is requested to see if an existing connection is open, and handle based on that...
Ideas / How can I do this?
You can use Factory Pattern for this.
http://www.tutorialspoint.com/design_pattern/factory_pattern.htm

Azure - IP filter depending on the database

I have a Azure application that use different databases of different servers. This databases are independent, and each sector of my application uses only one database.
I try make a IP filter. This filter must identify the solicitant's ip, and allow access each database or not depending this filter. This give me a way for allow access to A and not to B for a IP, access to B and not to A for another IP, full access for another diferent IP... using the security of Azure.
It's this possible?
Thanks, I wait a answer!
PD: sorry for my horrible english!
Assuming you are referring to SQL Azure hosted databases, you can use Database-Level Firewall settings, which are documented here.
Create a database-level firewall rule by using the
sp_set_database_firewall_rule stored procedure. Add a new firewall
setting for Internet-based connections by specifying a unique name in
the name parameter of the sp_set_database_firewall_rule stored
procedure. Specify the lowest desired IP address in that range with
the start_ip_address parameter and the highest desired IP address in
that range with the end_ip_address parameter. The name parameter is of
the nvarchar data type and the start_ip_address and the end_ip_address
parameters are of the varchar data type.
Similarly, you can enable connection attempts from Windows Azure by
using the sp_set_database_firewall_rule stored procedure with the
parameters start_ip_address and end_ip_address equal to 0.0.0.0.
I'm sure you'll have already found a solution to this given its a couple of months old now, but just in-case...
Assuming I'm understanding correctly, you have a bunch of clients communicating to your application server, which in turn queries one of many database servers. The firewall suggested by mellamokb isn't an option as the client isn't actually hitting the database, and so what's needed has to sit on the application server.
Selecting the connection string used to access the/a database based on the client's IP address is probably what you're after here. If you also need to lock the database down using its native security, you will need to create a named user account for each of your clients.
Alternatively, you could investigate Federations on the Azure SQL Database and use either the client's IP address or a similar identifier as the distribution key.

can I see all SQL statements sent over an ODBC connection?

I'm working with a third-party application that uses ODBC to connect to, and alter, a database. During certain failure modes, the end-results are not what I expect. To understand it better, I'd like some way of inspecting all the statements sent to the database. Is there a way to do this with ODBC?
I know with JDBC I could use http://www.p6spy.com/ to see all statements sent, for example when debugging hibernate. p6spy is a "proxy" driver that records commands sent and forwards them on to the real JDBC driver.
Another possibility might be a protocol sniffer that would capture statements over the wire. Although, I'm unsure if ODBC includes a standard wire protocol, or only specifieds the API.
Does anyone know of existing tools that would allow me to do either of these things? Alternatively, is there another approach I could take?
ODBC specifies how your program communicates with a local driver, not how the local driver communicates with the remote database. Your proxy driver idea is sound, you just need to find one.
Have you tried the tracing built into ODBC? In ODBC Data Source Administrator, there is a tracing tab. As I remember, the information captured is pretty verbose.
I think it is easier to read the logs on the SQL side, whatever the database. For example, turning on the monitor on SQL Server or viewing the logs in MySQL. It seems that using a sniffer would be more trouble than it is worth, but I guess it depends on the tools available. What RDBMS are you using?