How to backup database into pipe

  • Hi.

    I have MS SQLServer 2005

    I'm trying to backup database to named pipe.

    I use SQL statement

    BACKUP DATABASE [mydb] TO  DISK = N'\\.\pipe\mytest1' WITH NOFORMAT, NOINIT,  NAME = N'mydb-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

     

    Obviously when I tried to execute this command I received an error

    "Cannot open backup device '\\.\pipe\mytest1'"

    I think this is because the pipe was not created.

    I wrote command line application that creates pipe '\\.\pipe\mytest1'.

    I used CreateNamedPipe() Windows API function

    I executed this command line application and immediately after this executed BACKUP DATABASE SQL statement

    I received another error

    "Cannot open backup device '\\.\pipe\mytest1'. Operating system error 231(All pipe instances are busy.). "

     

    What is the problem?

    May be I opened pipe a wrong way?

    May be problem is in SQL statement?

    Is there another way to backup database into named pipe?

     

    Thanks for advance.

  • This was removed by the editor as SPAM

  • Try it like this.  When connecting to the server, force a Named Pipe connection.  Afterwards, just do you're backup to the drive\path.

    Instead of <servername>

    try

    np:<servername>

    in the Connect To dialog box.

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply