Connecting to sqlserver using named pipe
I would like to connect to mssql (running on same PC as SQL Developer) using named pipes.
The host is listed in the Windows Service Manager as \\SX3102971\SIMSLOCAL
I have gone to the 'Oracle' tab, selected 'Advanced' and in the 'Custom JDBC URL'
entered
jdbc:jtds:sqlserver:\\SX3102971\SIMSLOCAL;namedPipe=true;user=<username>;password=<password>
where <username> and <password> are the true values.
I receive a message
Staus : Failure -Invalid connection information specified. Verify the URL format for the specified driver.
Can anyone advise on what may be wrong?
Also, can SQLDeveloper handle blank passwords?
The database is installed as part of a third party application, which sets the default dba logon with no password. SQL Developer states that a password is required. For the example above I have created my own log on.
Hi,
I managed to solve the problem. So don't worry about it.
For others who are looking for the solution...
- I have referred to the http://www.qint.de/joria/doc/jdbc/jtds.html.
- I have changed the URL element in IDEConnections.xml file located under where SQLDEVELOPER software is installed.
- The URL must look like the following ...
<URL>jdbc:jtds:sqlserver://\\.\;namedPipe=true;instance=<name of the database - without the server name>;</URL>
Hope this helps.
Regards
Raja
Message was edited by:
rajaram_r
Similar Messages
-
Export and Import using Named Pipes
Hai,
I need an clarification in export, import and compress of dumps using named pipes.I am using Oracle 9i RAC 9.2.0.4 in AIX 5.3. Every month i have to move list of tables from one database to another database after taking export dumps. The list of activities done by me at present are given below.
1. Taking export and gziping the dump file at the same time using named pipes.
2. Doing uncompress and import in the second database using named pipes.
We are doing compress for space constraints. Now my doubt is whether using named pipes, we can do both operation of import and compress of dump file at the same time. i.e, at the time of export itself , using named pipes, i need both import in the another database and compress the zip file. Is it possible?mknod exp.out p
exp dbadmin/admindb file=exp.out owner=scott log=export.log statistics=none &
imp dbadmin/admindb file=exp.out fromuser=scott touser=foobar log=import.log
rm exp.out
cat import.log
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and UTF8 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing SCOTT's objects into FOOBAR
. . importing table "BONUS" 0 rows imported
. . importing table "DEPT" 4 rows imported
. . importing table "EMP" 14 rows imported
. . importing table "SALGRADE" 5 rows imported
About to enable constraints...
Import terminated successfully without warnings.Edited by: sb92075 on Jan 1, 2010 1:42 PM -
Mxi includes on localhost using named pipes
hello all,
why does my addt "server side includes" didn't work when using localhost server using named pipes? my port is 8080 and i access the server using http//localhost:8080...
if i access mysql query browser im using "."(a dot)as my server host.
there is always a folder permission error but i can use php includes fine.
can anyone help in making the "server side includes" work?There is no use for testing named pipes. As I said - it is an excellent method for IPC. It is slow and unscalable for networking, especially WANs.
A few minutes of googling this subject and doing some bit of research, would highlight this quite clearly.
BTW - if you think named pipes are better for tcp, then don't you think Oracle would have recommended its use? Heck, Oracle recommends using the RDS protocol for the RAC Interconnect. A protocol not widely known outside the HPC environment. So surely they would have sung the praises of more commonly known named pipes for tcp if it was any good?
Which again points to the fact that it ain't good and your wasting your time by trying to be "clever" and barking up the wrong tree. -
How can I connect using named pipes ( NMP ) ?
Hi all,
I'd like to do compare the availablke protocol (TCP, IPC, BEQ, NMP ) connect to my db, but I'm not able to configure named pipes.
My *.ora files contain:
tnsnames.ora:
ORA10_NMP=
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = NMP)
(SERVER = 10.10.1.1)
(PIPE = ORApipe)
(CONNECT_DATA =
(SID = ORA10)
listener.ora:
LISTENER_ORA10 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 10.10.1.1)
(PORT = 1522)
(ADDRESS =
(PROTOCOL = IPC)
(KEY = ORA10)
(ADDRESS =
(PROTOCOL = NMP)
(SERVER = 10.0.0.1)
(PIPE = ORApipe)
SID_LIST_LISTENER_ORA10 =
(SID_LIST=
(SID_DESC=
(SID_NAME=ORA10)
(ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
)The network adapter used to connect to 10.10.1.1 is a microsoft loopback adapter , and I installed the "microsoft client ".
When I try to use the ORA10_NMP alias I always get errors like:
C:\>c:\oracle\product\10.2.0\db_1\bin\TNSPING.EXE ORA10_NMP
TNS Ping Utility for 32-bit Windows: Version 10.2.0.5.0 - Production on 24-JUN-2011 14:06:39
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = NMP) (SERVER = 10.10.1.1) (PIPE = ORApipe)) (CONNECT_DATA =
(SID = ORA10)))
TNS-12560: TNS:protocol adapter error
C:\>c:\oracle\product\10.2.0\db_1\bin\sqlplus system/foo@ORA10_NMP
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jun 24 14:06:44 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:Any suggestion?
Thanks,
AndreaThere is no use for testing named pipes. As I said - it is an excellent method for IPC. It is slow and unscalable for networking, especially WANs.
A few minutes of googling this subject and doing some bit of research, would highlight this quite clearly.
BTW - if you think named pipes are better for tcp, then don't you think Oracle would have recommended its use? Heck, Oracle recommends using the RDS protocol for the RAC Interconnect. A protocol not widely known outside the HPC environment. So surely they would have sung the praises of more commonly known named pipes for tcp if it was any good?
Which again points to the fact that it ain't good and your wasting your time by trying to be "clever" and barking up the wrong tree. -
Connecting to SQLServer 2k named Instance
Hey guys, this time i need some URGENT help, i swapped from windows to linux platform and using CF9, when i create a DSN in windows using SERVER_NAME\INSTANCE_NAME for the Server field, filling user name and password with a Microsoft SQL Server native DSN works perfectly, but when i do this same thing on Linux i get this nasty error:
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.
So i tryed to create a connection using the "Other" as DSN type and filled out this info:
CF Data Source Name: Test
JDBC URL: jdbc:sqlserver://SERVER_NAME\INSTANCE_NAME:1433;DatabaseName=MyDatabase
Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver Name: SQL Server JDBC
User name: myuser
Password: mypass
i get this error:
Connection verification failed for data source: test
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host FULLSQL, port 1433 has failed. Error: "Connection refused. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
This was done after downloading sqljdbc_3.0.1301.101_enu.tar.gz from microsoft's web site and placing the sqljdbc4.jar file inside the /opt/coldfusion9/runtime/lib directory.
So basically the first way to create the connection works on windows but not on linux, and the second way does not work in any place even tho it's supposed to be working...
Please send me some help ASAP, need this thing working BADLY!Okay, just solved the mistery... i will NEVER connect since every time you install a new SQL Server instance THAT new instance will listen to a different port, in this case the default 1433 was working but for the first instance and i was trying to connect to a second one listening in some other port i can't remember ATM.
Thanx for that help ne way Adam....! -
Java Connection to SqlServer using SQLServerDatasource
Please HELP,
I have this
import javax.sql.DataSource;
import java.io.IOException;
import java.sql.Connection;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.sql.SQLException;
import javax.naming.*;
import java.rmi.RemoteException;
import java.rmi.Remote;
import com.microsoft.sqlserver.jdbc.*;
public class AvocatData
private SQLServerConnectionPoolDataSource dataSource;
private Connection conn;
public AvocatData()
public void init() throws SQLException
try{
Context lContext = new InitialContext();
dataSource=(SQLServerConnectionPoolDataSource)lContext. lookup("java:comp/env/jdbc/vladHotel");
conn=dataSource.getConnection();
}catch(Exception ex){ex.printStackTrace();
}and give this error:
javax.naming.NoInitialContextException:Need to specify class name in enviroment or system property,or as an applet paramater,or in an application resource file:java.naming.factory.initialGateway for ODBC 10g or 11g is only supported with SQL Server Authentication, not Windows authentication.
If your SQL Server is only configured for Windows authentication, you have no other way to change the configuration of the SQL Server to support the Mixed Mode (both Windows authentication and SQL Server authentication).
Regards,
--Mireille -
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
This was originally posted in the SSIS Forum, but a member of the IS team suggested it be moved here. "Most recently I got this error (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) so does this mean that SQL Server is still trying to use named pipes even if I only have TCP/IP enabled in SQL Server Configuration Manager?"
I'm having the same issue, and here's our scenario:
Installed SQL Server 2005 Developer Edition on a machine with WinXP SP2 and enabled remote connections over TCP/IP
Installed SQL Server 2005 Standard Edition on a machine with Win2003 SP1 (remote connections over TCP/IP enabled by default)
Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'Detach and Attach' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'SQL Management Objects' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
Reinstalled Standard Edition on the Win2003 SP1 machine
Checked all the settings on both machines several times, restarted services etc., and read every post I could find referencing the error.
Same error
Lost my last hair
Thanks in advance,
SteveNan,
Before I get on with this post - thank you for your reply.
The XPSP2 machine actually had the firewall disabled, and I verified that it could accept connections on the the associated ports with the Shields Up utility. I tested this on both machines.
I can connect to the server from the XPSP2 machine, Import / Export, manage, view logs, and do everything EXCEPT get the Copy Database package to run. SQL Server Agent always fails on the last step with the following error:
Event Type: Error
Event Source: SQLISPackage
Event Category: None
Event ID: 12550
Date: 1/10/2006
Time: 1:34:15 PM
User: NT AUTHORITY\SYSTEM
Computer: 401SERVER
Description:
Event Name: OnError
Message: Failed to connect to server BETHESDA.
StackTrace: at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.OpenConnection(Server& server, ServerProperty serverProp)
InnerException-->An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
StackTrace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
Operator: NT AUTHORITY\SYSTEM
Source Name: BETHESDA_401SERVER_Transfer Objects Task
Source ID: {86F355AD-3B74-4D7B-8D2D-C743C790A269}
Execution ID: {91B7C32C-C439-4EDB-8A0F-9F8BF207BC06}
Start Time: 1/10/2006 1:34:15 PM
End Time: 1/10/2006 1:34:15 PM
Data Code: 0
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Have you (or anyone else) successfully executed a Copy Databse task?
Steve -
Hey all, i need help
I have a job which was running quite peacefully for the last EVER, but since last Saturday it keeps failing and then run successfully and then fails. . . . .and gives me the below error.
Executed as user: Sx\xxx. Microsoft (R) SQL Server Execute Package Utility Version 10.0.5500.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 9:00:00 PM Progress: 2014-03-11
21:00:02.16 Source: {122F32F1-F99F-4A5A-BA70-F5426B2747DA} Executing query "DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp...".: 100% complete End Progress Progress: 2014-03-11 21:00:02.19
Source: Manually replicate tables Executing query " USE DBNAME ".: 50% complete End Progress Error: 2014-03-11 21:00:22.35 Code: 0xC002F210 Source: Manually replicate
tables Execute SQL Task Description: Executing the query " exec usp_ReplicateEsourceTable 'Ebase'; ..." failed with the following error: "Named Pipes Provider: Could not open a connection to SQL
Server [53]. OLE DB provider "SQLNCLI10" for linked server "ServerName" returned message "Login timeout expired". OLE DB provider "SQLNCLI10" for linked server "ServerName" returned message "A
network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
see SQL Server Books Online.".". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error Progress: 2014-03-11
21:00:22.45 Source: Notify on failure Executing query "exec msdb.dbo.sp_notify_operator @profile_name =...".: 100% complete End Progress DTExec: The package execution returned DTSER_FAILURE (1).
Started: 9:00:00 PM Finished: 9:00:23 PM Elapsed: 22.25 seconds. The package execution failed. The step failed.
I have already tested the linked server connection between those servers and its fine. And what is weird is that when i run the job manually it runs successfully.
Any ideas?Hi,
How often does the job run? Does the query fail intermittently?
I suggest you check the following configuration on both servers:
1. In SQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click
Client Protocols, and then click Properties. What’s the order of protocol?
2. Check if the default port of TCP/IP is set to 1433.
By default, the top protocol is to use TCP/IP and then Named Pipes. There are two possible situations:
1. Connection fails and client protocol is using TCP/IP 1433.
When server A remotes to server B, it will use TCP/IP connection. If it encounters some issue during connecting (such as network issues), it will use Named Pipes instead. If the Name Pipes 445 still fails, thus the above error message will
be thrown out. It will use Name Pipes afterwards until the SQL Server service is restarted.
2. The port number is not 1433.
However, the remote machine is listening 1433. Then, the linked server will trying to use TCP/IP first. Because of the port error, it will change to Name Pipes.
Thanks.
Tracy Cai
TechNet Community Support -
Named Pipes using mkfifo and Cocoa
I have a C++ application that uses named pipes by calling mkfifo and I would like to use them to connect to a Cocoa app. I have taken a look at NSPipe but there isn't an option to connect to a named pipe. Does anyone know how to connect NSPipes or something else I can tie into the NSNotificationCenter that can talk to named pipes?
Thank you for your time,
Tom-(void)SomeFunc
const char * path = "/tmp/tom21";
if(mkfifo(path, 0666) == -1 && errno !=EEXIST){
NSLog(@"Unable to open the named pipe %c", path);
NSFileHandle * filehandleForReading;
int fd = open(path, O_RDWR | O_NDELAY);
filehandleForReading = [[NSFileHandle alloc] initWithFileDescriptor:fd closeOnDealloc: YES];
NSNotificationCenter *nc;
nc = [NSNotificationCenter defaultCenter];
[nc removeObserver:self];
[nc addObserver:self
selector:@selector(dataReady:)
name:NSFileHandleReadCompletionNotification
object:filehandleForReading];
[filehandleForReading readInBackgroundAndNotify];
And then here is the func that gets called by the Notification server
- (void)dataReady:(NSNotification *)n
NSData *d;
d = [[n userInfo] valueForKey:NSFileHandleNotificationDataItem];
NSLog(@"dataReady:%d bytes", [d length]);
if ([d length]) {
[self appendData:d];
//Tell the fileHandler to asychronusly report back
[filehandleForReading readInBackgroundAndNotify];
} -
Hi,
we use MDT 2013 in conjunction with a local SQL Express 2012 database. I configured MDT to use Named Pipes but I want to switch to TCP/IP sockets. Is it possible to change that Network Library for an existing database? Am I going to loose the contents of
the existing db? Thanks for your insights.
PaulJust did a testrun with a test deployment share. Made a db with Named Pipes, filled in some values. Created a new db and I was able to choose between some existing databases. I chose the test db and yes all the values are in it.
Next I tried it with my main db and indeed nothing is lost. Pfjew.
Paul -
I am trying to write a script for AE and I want to use named pipes to communicate. My pipe server is working fine and it's functioning great in .NET when both sides are .NET programs.
When I connect my AE javascript to the pipe as the client, the server side sees the connection, but the javascript side immediately closes it. The server reports that the pipe is broken. For the record, the server is set up for only one client and the .NET client program has been shut down.
I am just getting started with this, so the code is only a few lines:
var f = new File("\\\\.\\pipe\\MYPIPE");
b=f.open ("r");
$.writeln (b);
$.writeln (b);
What's interesting is that the value of "b" is immediately false, and the error is simply "I/O error".
Anyone have any experience with this?
Thanks in advance.At this point we do not have specific plans for adding shared memory or named pipes support but we appreciate your feedback, and will take it into consideration when planning future release(s).
This posting is provided "AS IS" with no warranties, and confers no rights. -
what folder does the jar file for the sqlserver jdbc drivers go? The documentation says [JRE_HOME]/lib, but the Oracle drivers are in oc4j\jdbc\lib folder.
Hi JD;
I didn't install SQLServer 2000/2005 BUT what I installed in my laptop was small version of SQLServer called "SQLServer Express" same as Oracle XE.
This is what I did to accomplish the task on SQLServer Express:
1) Downloaded latest version of SQLServer JDBC driver from Microsoft website
2) Set up login connection to SQLServer using "SQLServer Authenication" NOT windows.
3) Create AdventureWorks or Nortwind schema downloaded from Microsoft website.
4) Create a user thru SQLServer Management Studio is like ORACLE DB console.
5) test the connection from SQLServer
6) test the connextion using XMLP JDBC connection
Also to make more spicier I did the connection to MS-ACCESS using ODBC:JDBC driver BUT the Query Builder didn't work but my small sqlscript worked for a demo to clients.
Here are the link to achieve:
http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm
http://www.oracle.com/technology/products/jdev/howtos/bc4j/bc_psqlserverwalkthrough.html
HTH
Shaun S -
WCF based named pipe naming convention.
I found the following msdn article http://blogs.msdn.com/b/rodneyviana/archive/2011/03/22/named-pipes-in-wcf-are-named-but-not-by-you-and-how-to-find-the-actual-windows-object-name.aspx
which states how to acquire the memory mapped file name in order to infer the actual pipe name, however my results are not proving successful. Further, the screen caps that the author took don't jive with my results either. I do not reveal the mmap file name
but the actual named pipe (obviously) when listing pipes.
Does anyone know how to infer the name of the pipe accepting input? I am required to provide access to code written in Python which is why I need the actual pipe name.
Thanks!Long answer in "teaching to fish" style of how to actually get the pipe name:
I attached WinDbg to a program hosting a WCF service using named pipe transports and ran the following commands:
.loadby sos clr
!DumpHeap -type Pipe
I clicked through several of the objects and ultimately found this one whose relevant properties are also dumped below:
0:009> !DumpHeap /d -mt 00007ffd7b23de38
Address MT Size
0000004409939f28 00007ffd7b23de38 64
Statistics:
MT Count TotalSize Class Name
00007ffd7b23de38 1 64 System.ServiceModel.Channels.PipeConnectionListener
Total 1 objects
0:009> !DumpObj /d 0000004409939f28
Name: System.ServiceModel.Channels.PipeConnectionListener
MethodTable: 00007ffd7b23de38
EEClass: 00007ffd7ac778a8
Size: 64(0x40) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll
Fields:
MT Field Offset Type VT Attr
Value Name
00007ffd907886d0 4000653 8 System.Uri 0 instance 00000044098eaba8 pipeUri
00007ffd917837c8 4000654 28 System.Int32 1 instance 8192 bufferSize
00007ffd7b23ab28 4000655 2c System.Int32 1 instance 0 hostNameComparisonMode
00007ffd9177f370 4000656 34 System.Boolean 1 instance 0 isDisposed
00007ffd9177f370 4000657 35 System.Boolean 1 instance 1 isListening
00007ffd7aaf9040 4000658 10 ...em.ServiceModel]] 0 instance 0000004409939f68 pendingAccepts
00007ffd9177f370 4000659 36 System.Boolean 1 instance 1 anyPipesCreated
00007ffd7b239320 400065a 18 ....PipeSharedMemory 0 instance 000000440993bb38 sharedMemory
00007ffd42824968 400065b 20 ...ifier, mscorlib]] 0 instance 0000000000000000 allowedSids
00007ffd9177f370 400065c 37 System.Boolean 1 instance 1 useCompletionPort
00007ffd917837c8 400065d 30 System.Int32 1 instance 255 maxInstances
0:009> !DumpObj /d 00000044098eaba8
Name: System.Uri
MethodTable: 00007ffd907886d0
EEClass: 00007ffd90364db0
Size: 72(0x48) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
Fields:
MT Field Offset Type VT Attr
Value Name
00007ffd91780bd8 40012d6 8 System.String 0 instance 00000044097e1190 m_String
00007ffd91780bd8 40012d7 10 System.String 0 instance 0000000000000000 m_originalUnicodeString
00007ffd90786c30 40012d8 18 System.UriParser 0 instance 00000044097e6088 m_Syntax
00007ffd91780bd8 40012d9 20 System.String 0 instance 0000000000000000 m_DnsSafeHost
00007ffd90757ba8 40012da 30 System.UInt64 1 instance 54766272512 m_Flags
00007ffd90787390 40012db 28 System.Uri+UriInfo 0 instance 00000044098eb328 m_Info
00007ffd9177f370 40012dc 38 System.Boolean 1 instance 1 m_iriParsing
00007ffd91780bd8 40012c9 cd8 System.String 0 static 00000044097e5530 UriSchemeFile
00007ffd91780bd8 40012ca ce0 System.String 0 static 00000044097e5510 UriSchemeFtp
00007ffd91780bd8 40012cb ce8 System.String 0 static 00000044097e5558 UriSchemeGopher
00007ffd91780bd8 40012cc cf0 System.String 0 static 00000044097e5480 UriSchemeHttp
00007ffd91780bd8 40012cd cf8 System.String 0 static 00000044097e54a8 UriSchemeHttps
00007ffd91780bd8 40012ce d00 System.String 0 static 00000044097e54d0 UriSchemeWs
00007ffd91780bd8 40012cf d08 System.String 0 static 00000044097e54f0 UriSchemeWss
00007ffd91780bd8 40012d0 d10 System.String 0 static 00000044097e55d0 UriSchemeMailto
00007ffd91780bd8 40012d1 d18 System.String 0 static 00000044097e55a8 UriSchemeNews
00007ffd91780bd8 40012d2 d20 System.String 0 static 00000044097e5580 UriSchemeNntp
00007ffd91780bd8 40012d3 d28 System.String 0 static 00000044097e5670 UriSchemeNetTcp
00007ffd91780bd8 40012d4 d30 System.String 0 static 00000044097e5698 UriSchemeNetPipe
00007ffd91780bd8 40012d5 d38 System.String 0 static 00000044097e60d8 SchemeDelimiter
00007ffd90749608 40012dd d40 ...etSecurityManager 0 static 0000000000000000 s_ManagerRef
00007ffd917811b8 40012de d48 System.Object 0 static 00000044097e60f8 s_IntranetLock
00007ffd9177f370 40012df a94 System.Boolean 1 static 0 s_ConfigInitialized
00007ffd9177f370 40012e0 a95 System.Boolean 1 static 0 s_ConfigInitializing
00007ffd907442f0 40012e1 a90 System.Int32 1 static 0 s_IdnScope
00007ffd9177f370 40012e2 a96 System.Boolean 1 static 1 s_IriParsing
00007ffd917811b8 40012e3 d50 System.Object 0 static 0000000000000000 s_initLock
00007ffd91781ed8 40012e4 d58 System.Char[] 0 static 00000044097e6110 HexLowerChars
00007ffd91781ed8 40012e5 d60 System.Char[] 0 static 00000044097e6190 _WSchars
0:009> !DumpObj /d 00000044097e1190
Name: System.String
MethodTable: 00007ffd91780bd8
EEClass: 00007ffd91111aa8
Size: 94(0x5e) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String: net.pipe://localhost/WCFPS_14840-0
Fields:
MT Field Offset Type VT Attr
Value Name
00007ffd917837c8 40000ab 8 System.Int32 1 instance 34 m_stringLength
00007ffd91781f38 40000ac c System.Char 1 instance 6e m_firstChar
00007ffd91780bd8 40000ad 18 System.String 0 shared static Empty
>> Domain:Value 0000004408b16a10:NotInit <<
0:009> !DumpObj /d 000000440993bb38
Name: System.ServiceModel.Channels.PipeSharedMemory
MethodTable: 00007ffd7b239320
EEClass: 00007ffd7ac76498
Size: 48(0x30) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll
Fields:
MT Field Offset Type VT Attr
Value Name
00007ffd7b239398 400066a 8 ...FileMappingHandle 0 instance 000000440993bb18 fileMapping
00007ffd91780bd8 400066b 10 System.String 0 instance 000000440993aa58 pipeName
00007ffd91780bd8 400066c 18 System.String 0 instance 0000000000000000 pipeNameGuidPart
00007ffd907886d0 400066d 20 System.Uri 0 instance 00000044098eaba8 pipeUri
0:009> !DumpObj /d 000000440993aa58
Name: System.String
MethodTable: 00007ffd91780bd8
EEClass: 00007ffd91111aa8
Size: 116(0x74) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String:
\\.\pipe\987a898d-7980-4703-b03e-8830a8a5a24c
Fields:
MT Field Offset Type VT Attr
Value Name
00007ffd917837c8 40000ab 8 System.Int32 1 instance 45 m_stringLength
00007ffd91781f38 40000ac c System.Char 1 instance 5c m_firstChar
00007ffd91780bd8 40000ad 18 System.String 0 shared static Empty
>> Domain:Value 0000004408b16a10:NotInit <<
I then ran !gcroot 0000004409939f28 to see where it came from:
-> 000000440990aba0 System.ServiceModel.Dispatcher.ChannelDispatcher
-> 0000004409901868 System.ServiceModel.Channels.NamedPipeDuplexChannelListener
-> 0000004409939ee8 System.Action
-> 0000004409921ff8 System.ServiceModel.Channels.ExclusiveNamedPipeTransportManager
-> 000000440993a0d8 System.ServiceModel.Channels.ConnectionDemuxer
-> 000000440993a1f8 System.ServiceModel.Channels.ConnectionAcceptor
-> 0000004409939fb0 System.ServiceModel.Channels.BufferedConnectionListener
-> 0000004409939f28 System.ServiceModel.Channels.PipeConnectionListener
Running !gcroot 000000440990aba0 System.ServiceModel.Dispatcher.ChannelDispatcher shows that one of the ways it is bound is through the class in the program that I used to create the service host(WCFPS from
my blog post here):
-> 00000044097e1220 WCFPSExecutor.WCFPS
-> 00000044097e6ae0 System.ServiceModel.ServiceHost
-> 000000440981d960 System.ServiceModel.Dispatcher.ChannelDispatcherCollection
-> 000000440981d988 System.Collections.Generic.List`1[[System.ServiceModel.Dispatcher.ChannelDispatcherBase, System.ServiceModel]]
-> 000000440990d0f8 System.Object[]
-> 000000440990aba0 System.ServiceModel.Dispatcher.ChannelDispatcher
So now that I knew that, I did a !do on the ServiceHost object and found that the ChannelDispatcherCollection was contained in a member named channelDispatchers. Doing that again on that member, I saw that the collection came from a member named items.
One more time, and now I knew that System.Object[] came from items. Finally, the first element in that array was the ChannelDispatcher. At that point, I subsequently repeated the process of off ChannelDispatcher to get to PipeConnectionListener
and ultimately PipeSharedMemory which resulted in the following path to getting the pipe name:
(ServiceHost that the program opened).channelDispathers.items.items ->For each ChannelDispatcher until PipeSharedMemoryIsFound -> (ChannelDispatcher).listener.messageReceivedCallback.target.connectionDemuxer.acceptor.listener.connectionListener.sharedMemory
One will have to use System.Reflection (or something even more complicated) to access all of that at runtime, but there's a string member named pipeName at that point with an actual name, and a fileMapping member whose handle member contains a handle that
you can use to get/verify the pipe name as well with
GetFileInformationByHandleEx.
WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/ -
I have a program which uses named pipes to communicate with a (third party) named pipe server. I call CreateFile to open the pipe, then Readfile and Writefile to read and write data. If I get an error, e.g. due to a network fault, I call CancelIo, then
CloseHandle to close the pipe, then Createfile to re-open it. I have tested this by unplugging/replugging the network cable. However, on site in a 'real' environment, I have had a couple of occasions where I have received a 'ERROR_NETNAME_DELETED' from the
pipe I/O, and when I close the handle and call CreateFile to try and recover, I get the error 'ERROR_SEM_TIMEOUT' from the CreateFile call. Can anyone think why this might be? I guess a difference between my testing and what is happening 'for real' might be
that my testing involved disconnecting the network cable, whereas the 'live' incident may have been just a temporary glitch on the network.Yes, unpluggin a network cable is entirely different from communication glitches, lost packets and firewall issues.
One of the big reasons is that unplugged network cables are detected by windows, and the port is shut down. In network management in control panel you'll see the red cross. resources associated with that port will be freed, and communications will be aborted.
However, if the network port stays up, Windows will not know that anything went wrong. It still sees an active port, so it will just keep waiting for data to arrive. Communications that were in process may still be waiting when you retry them, so you have
to be careful with the error handling, and verify that a) you handle all problems, and b) you cancel all necessary things.
If you want to test such scenarios, you could play with the firewall on the target computer to simulate lost packets and timeouts. -
Unload/load to/from named pipe
Hi,
I want to unload data to a named pipe and
load data from that pipe.
Is there any way for this.
Kind RegardsSome KMs are using named pipe.
take this KM as example : IKM SQL to Teradata (piped TPUMP-FAST-MULTILOAD)
This only work for unix pipe! not for window...
Maybe you are looking for
-
Error while installing the client
Hi, While installing the CRM Mobile client I get the following error "Requisite Version of JRE not found". The JDK version which I have installed is 1.4.2_13 and my class path settings seems to be fine. Kindly suggest regards, Arun
-
Highlighter add-on not working in windows 8.1 thunderbird 31.4.0
I installed Highlighter add-on to Thunderbird 31.4.0 with Windows 8.1. If I select text in composition, pull down the Highlighter menu and click on a color, the selected text color does not change. Stays with default. Same result if I just pick a col
-
I seem to encounter an issue regularly wih safari on the new ipad3. If clicking on a link from an email to open a website, Safari starts to launch the requested site, then diverts to www.facebook.com/plugins/likebox.php...... This then shows a text f
-
I have downloaded Adobe Digital Editions, but when I open my file on my desktop my Sony PRS-T1 ereader is not showing up on the left hand side for me to download ebooks into. I do have it plugged into my computer via my usb cable.
-
First time capsule backup never stops and shows insane progress numbers
We've bought a 1TB time capsule and are trying to get the first backup done. It's backed up a lot of the first Mac (a MacBook Pro with a 200GB drive with about 170GB used). Because we did it over the wireless LAN this took a long time, and it went aw