Hi,
I know that BCP.EXE is part of the client tools for SQL2005. Does it also
come as part of a standalone like say SQLCMD.EXE as a standalone from the
feature Pack? We are looking to install the Native client and SQLCMD and BCP
without the other executables.
Thanks
Chris
Hi Chris
I am not sure about the licencing issue with installing the Feature pack
version on it's own! AFAIK BCP.EXE is not available as a standalone install,
although there are example applications using the Bulk Copy API which you
could use to write your own application.
John
"Chris Wood" wrote:
> Hi,
> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> feature Pack? We are looking to install the Native client and SQLCMD and BCP
> without the other executables.
> Thanks
> Chris
>
>
|||That's what I thought John.
We have some non MS SQL servers that don't really need the full Client
Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
had hoped that BCP might be available too but if not then we should just be
able to copy an SQL2005 BCP.EXE onto the server.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> I am not sure about the licencing issue with installing the Feature pack
> version on it's own! AFAIK BCP.EXE is not available as a standalone
> install,
> although there are example applications using the Bulk Copy API which you
> could use to write your own application.
> John
> "Chris Wood" wrote:
|||Hi Chris
You may want to try installing from SQL Express the tools only which will
not install Management studio or Profiler, but I don't know if BCP is
included.
John
"Chris Wood" wrote:
> That's what I thought John.
> We have some non MS SQL servers that don't really need the full Client
> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
> had hoped that BCP might be available too but if not then we should just be
> able to copy an SQL2005 BCP.EXE onto the server.
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>
>
|||That's something worth trying.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
|||John,
I downloaded the SQLExpress and can see, using Winzip, that it has BCP
included as part. I do not have a machine to install this onto so can I just
pick Native client, SQLCMD and BCP from the downloaded package? I would like
to know if this is an option or not?
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
2012年3月8日星期四
BCP for SQL2005
Hi,
I know that BCP.EXE is part of the client tools for SQL2005. Does it also
come as part of a standalone like say SQLCMD.EXE as a standalone from the
feature Pack? We are looking to install the Native client and SQLCMD and BCP
without the other executables.
Thanks
ChrisHi Chris
I am not sure about the licencing issue with installing the Feature pack
version on it's own! AFAIK BCP.EXE is not available as a standalone install,
although there are example applications using the Bulk Copy API which you
could use to write your own application.
John
"Chris Wood" wrote:
> Hi,
> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> feature Pack? We are looking to install the Native client and SQLCMD and BCP
> without the other executables.
> Thanks
> Chris
>
>|||That's what I thought John.
We have some non MS SQL servers that don't really need the full Client
Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
had hoped that BCP might be available too but if not then we should just be
able to copy an SQL2005 BCP.EXE onto the server.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> Hi Chris
> I am not sure about the licencing issue with installing the Feature pack
> version on it's own! AFAIK BCP.EXE is not available as a standalone
> install,
> although there are example applications using the Bulk Copy API which you
> could use to write your own application.
> John
> "Chris Wood" wrote:
>> Hi,
>> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
>> come as part of a standalone like say SQLCMD.EXE as a standalone from the
>> feature Pack? We are looking to install the Native client and SQLCMD and
>> BCP
>> without the other executables.
>> Thanks
>> Chris
>>|||Hi Chris
You may want to try installing from SQL Express the tools only which will
not install Management studio or Profiler, but I don't know if BCP is
included.
John
"Chris Wood" wrote:
> That's what I thought John.
> We have some non MS SQL servers that don't really need the full Client
> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
> had hoped that BCP might be available too but if not then we should just be
> able to copy an SQL2005 BCP.EXE onto the server.
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> > Hi Chris
> >
> > I am not sure about the licencing issue with installing the Feature pack
> > version on it's own! AFAIK BCP.EXE is not available as a standalone
> > install,
> > although there are example applications using the Bulk Copy API which you
> > could use to write your own application.
> >
> > John
> >
> > "Chris Wood" wrote:
> >
> >> Hi,
> >>
> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> >> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> >> feature Pack? We are looking to install the Native client and SQLCMD and
> >> BCP
> >> without the other executables.
> >>
> >> Thanks
> >>
> >> Chris
> >>
> >>
> >>
>
>|||That's something worth trying.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>> That's what I thought John.
>> We have some non MS SQL servers that don't really need the full Client
>> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
>> and
>> had hoped that BCP might be available too but if not then we should just
>> be
>> able to copy an SQL2005 BCP.EXE onto the server.
>> Thanks
>> Chris
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>> > Hi Chris
>> >
>> > I am not sure about the licencing issue with installing the Feature
>> > pack
>> > version on it's own! AFAIK BCP.EXE is not available as a standalone
>> > install,
>> > although there are example applications using the Bulk Copy API which
>> > you
>> > could use to write your own application.
>> >
>> > John
>> >
>> > "Chris Wood" wrote:
>> >
>> >> Hi,
>> >>
>> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
>> >> also
>> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
>> >> the
>> >> feature Pack? We are looking to install the Native client and SQLCMD
>> >> and
>> >> BCP
>> >> without the other executables.
>> >>
>> >> Thanks
>> >>
>> >> Chris
>> >>
>> >>
>> >>
>>|||John,
I downloaded the SQLExpress and can see, using Winzip, that it has BCP
included as part. I do not have a machine to install this onto so can I just
pick Native client, SQLCMD and BCP from the downloaded package? I would like
to know if this is an option or not?
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>> That's what I thought John.
>> We have some non MS SQL servers that don't really need the full Client
>> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
>> and
>> had hoped that BCP might be available too but if not then we should just
>> be
>> able to copy an SQL2005 BCP.EXE onto the server.
>> Thanks
>> Chris
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>> > Hi Chris
>> >
>> > I am not sure about the licencing issue with installing the Feature
>> > pack
>> > version on it's own! AFAIK BCP.EXE is not available as a standalone
>> > install,
>> > although there are example applications using the Bulk Copy API which
>> > you
>> > could use to write your own application.
>> >
>> > John
>> >
>> > "Chris Wood" wrote:
>> >
>> >> Hi,
>> >>
>> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
>> >> also
>> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
>> >> the
>> >> feature Pack? We are looking to install the Native client and SQLCMD
>> >> and
>> >> BCP
>> >> without the other executables.
>> >>
>> >> Thanks
>> >>
>> >> Chris
>> >>
>> >>
>> >>
>>|||Hi Chris
I don't think there is a way of being that selective you would need to use
the ADDLOCAL and specify Connectivity and SQL_Tools90
John
"Chris Wood" wrote:
> John,
> I downloaded the SQLExpress and can see, using Winzip, that it has BCP
> included as part. I do not have a machine to install this onto so can I just
> pick Native client, SQLCMD and BCP from the downloaded package? I would like
> to know if this is an option or not?
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> > Hi Chris
> >
> > You may want to try installing from SQL Express the tools only which will
> > not install Management studio or Profiler, but I don't know if BCP is
> > included.
> >
> > John
> >
> > "Chris Wood" wrote:
> >
> >> That's what I thought John.
> >>
> >> We have some non MS SQL servers that don't really need the full Client
> >> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
> >> and
> >> had hoped that BCP might be available too but if not then we should just
> >> be
> >> able to copy an SQL2005 BCP.EXE onto the server.
> >>
> >> Thanks
> >>
> >> Chris
> >>
> >> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> >> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> >> > Hi Chris
> >> >
> >> > I am not sure about the licencing issue with installing the Feature
> >> > pack
> >> > version on it's own! AFAIK BCP.EXE is not available as a standalone
> >> > install,
> >> > although there are example applications using the Bulk Copy API which
> >> > you
> >> > could use to write your own application.
> >> >
> >> > John
> >> >
> >> > "Chris Wood" wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
> >> >> also
> >> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
> >> >> the
> >> >> feature Pack? We are looking to install the Native client and SQLCMD
> >> >> and
> >> >> BCP
> >> >> without the other executables.
> >> >>
> >> >> Thanks
> >> >>
> >> >> Chris
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
I know that BCP.EXE is part of the client tools for SQL2005. Does it also
come as part of a standalone like say SQLCMD.EXE as a standalone from the
feature Pack? We are looking to install the Native client and SQLCMD and BCP
without the other executables.
Thanks
ChrisHi Chris
I am not sure about the licencing issue with installing the Feature pack
version on it's own! AFAIK BCP.EXE is not available as a standalone install,
although there are example applications using the Bulk Copy API which you
could use to write your own application.
John
"Chris Wood" wrote:
> Hi,
> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> feature Pack? We are looking to install the Native client and SQLCMD and BCP
> without the other executables.
> Thanks
> Chris
>
>|||That's what I thought John.
We have some non MS SQL servers that don't really need the full Client
Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
had hoped that BCP might be available too but if not then we should just be
able to copy an SQL2005 BCP.EXE onto the server.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> Hi Chris
> I am not sure about the licencing issue with installing the Feature pack
> version on it's own! AFAIK BCP.EXE is not available as a standalone
> install,
> although there are example applications using the Bulk Copy API which you
> could use to write your own application.
> John
> "Chris Wood" wrote:
>> Hi,
>> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
>> come as part of a standalone like say SQLCMD.EXE as a standalone from the
>> feature Pack? We are looking to install the Native client and SQLCMD and
>> BCP
>> without the other executables.
>> Thanks
>> Chris
>>|||Hi Chris
You may want to try installing from SQL Express the tools only which will
not install Management studio or Profiler, but I don't know if BCP is
included.
John
"Chris Wood" wrote:
> That's what I thought John.
> We have some non MS SQL servers that don't really need the full Client
> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
> had hoped that BCP might be available too but if not then we should just be
> able to copy an SQL2005 BCP.EXE onto the server.
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> > Hi Chris
> >
> > I am not sure about the licencing issue with installing the Feature pack
> > version on it's own! AFAIK BCP.EXE is not available as a standalone
> > install,
> > although there are example applications using the Bulk Copy API which you
> > could use to write your own application.
> >
> > John
> >
> > "Chris Wood" wrote:
> >
> >> Hi,
> >>
> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> >> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> >> feature Pack? We are looking to install the Native client and SQLCMD and
> >> BCP
> >> without the other executables.
> >>
> >> Thanks
> >>
> >> Chris
> >>
> >>
> >>
>
>|||That's something worth trying.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>> That's what I thought John.
>> We have some non MS SQL servers that don't really need the full Client
>> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
>> and
>> had hoped that BCP might be available too but if not then we should just
>> be
>> able to copy an SQL2005 BCP.EXE onto the server.
>> Thanks
>> Chris
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>> > Hi Chris
>> >
>> > I am not sure about the licencing issue with installing the Feature
>> > pack
>> > version on it's own! AFAIK BCP.EXE is not available as a standalone
>> > install,
>> > although there are example applications using the Bulk Copy API which
>> > you
>> > could use to write your own application.
>> >
>> > John
>> >
>> > "Chris Wood" wrote:
>> >
>> >> Hi,
>> >>
>> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
>> >> also
>> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
>> >> the
>> >> feature Pack? We are looking to install the Native client and SQLCMD
>> >> and
>> >> BCP
>> >> without the other executables.
>> >>
>> >> Thanks
>> >>
>> >> Chris
>> >>
>> >>
>> >>
>>|||John,
I downloaded the SQLExpress and can see, using Winzip, that it has BCP
included as part. I do not have a machine to install this onto so can I just
pick Native client, SQLCMD and BCP from the downloaded package? I would like
to know if this is an option or not?
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>> That's what I thought John.
>> We have some non MS SQL servers that don't really need the full Client
>> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
>> and
>> had hoped that BCP might be available too but if not then we should just
>> be
>> able to copy an SQL2005 BCP.EXE onto the server.
>> Thanks
>> Chris
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>> > Hi Chris
>> >
>> > I am not sure about the licencing issue with installing the Feature
>> > pack
>> > version on it's own! AFAIK BCP.EXE is not available as a standalone
>> > install,
>> > although there are example applications using the Bulk Copy API which
>> > you
>> > could use to write your own application.
>> >
>> > John
>> >
>> > "Chris Wood" wrote:
>> >
>> >> Hi,
>> >>
>> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
>> >> also
>> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
>> >> the
>> >> feature Pack? We are looking to install the Native client and SQLCMD
>> >> and
>> >> BCP
>> >> without the other executables.
>> >>
>> >> Thanks
>> >>
>> >> Chris
>> >>
>> >>
>> >>
>>|||Hi Chris
I don't think there is a way of being that selective you would need to use
the ADDLOCAL and specify Connectivity and SQL_Tools90
John
"Chris Wood" wrote:
> John,
> I downloaded the SQLExpress and can see, using Winzip, that it has BCP
> included as part. I do not have a machine to install this onto so can I just
> pick Native client, SQLCMD and BCP from the downloaded package? I would like
> to know if this is an option or not?
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
> > Hi Chris
> >
> > You may want to try installing from SQL Express the tools only which will
> > not install Management studio or Profiler, but I don't know if BCP is
> > included.
> >
> > John
> >
> > "Chris Wood" wrote:
> >
> >> That's what I thought John.
> >>
> >> We have some non MS SQL servers that don't really need the full Client
> >> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2
> >> and
> >> had hoped that BCP might be available too but if not then we should just
> >> be
> >> able to copy an SQL2005 BCP.EXE onto the server.
> >>
> >> Thanks
> >>
> >> Chris
> >>
> >> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> >> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
> >> > Hi Chris
> >> >
> >> > I am not sure about the licencing issue with installing the Feature
> >> > pack
> >> > version on it's own! AFAIK BCP.EXE is not available as a standalone
> >> > install,
> >> > although there are example applications using the Bulk Copy API which
> >> > you
> >> > could use to write your own application.
> >> >
> >> > John
> >> >
> >> > "Chris Wood" wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I know that BCP.EXE is part of the client tools for SQL2005. Does it
> >> >> also
> >> >> come as part of a standalone like say SQLCMD.EXE as a standalone from
> >> >> the
> >> >> feature Pack? We are looking to install the Native client and SQLCMD
> >> >> and
> >> >> BCP
> >> >> without the other executables.
> >> >>
> >> >> Thanks
> >> >>
> >> >> Chris
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
BCP for SQL2005
Hi,
I know that BCP.EXE is part of the client tools for SQL2005. Does it also
come as part of a standalone like say SQLCMD.EXE as a standalone from the
feature Pack? We are looking to install the Native client and SQLCMD and BCP
without the other executables.
Thanks
ChrisHi Chris
I am not sure about the licencing issue with installing the Feature pack
version on it's own! AFAIK BCP.EXE is not available as a standalone install,
although there are example applications using the Bulk Copy API which you
could use to write your own application.
John
"Chris Wood" wrote:
> Hi,
> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> feature Pack? We are looking to install the Native client and SQLCMD and B
CP
> without the other executables.
> Thanks
> Chris
>
>|||That's what I thought John.
We have some non MS SQL servers that don't really need the full Client
Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
had hoped that BCP might be available too but if not then we should just be
able to copy an SQL2005 BCP.EXE onto the server.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> I am not sure about the licencing issue with installing the Feature pack
> version on it's own! AFAIK BCP.EXE is not available as a standalone
> install,
> although there are example applications using the Bulk Copy API which you
> could use to write your own application.
> John
> "Chris Wood" wrote:
>|||Hi Chris
You may want to try installing from SQL Express the tools only which will
not install Management studio or Profiler, but I don't know if BCP is
included.
John
"Chris Wood" wrote:
> That's what I thought John.
> We have some non MS SQL servers that don't really need the full Client
> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 an
d
> had hoped that BCP might be available too but if not then we should just b
e
> able to copy an SQL2005 BCP.EXE onto the server.
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>
>|||That's something worth trying.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>|||John,
I downloaded the SQLExpress and can see, using Winzip, that it has BCP
included as part. I do not have a machine to install this onto so can I just
pick Native client, SQLCMD and BCP from the downloaded package? I would like
to know if this is an option or not?
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>|||Hi Chris
I don't think there is a way of being that selective you would need to use
the ADDLOCAL and specify Connectivity and SQL_Tools90
John
"Chris Wood" wrote:
> John,
> I downloaded the SQLExpress and can see, using Winzip, that it has BCP
> included as part. I do not have a machine to install this onto so can I ju
st
> pick Native client, SQLCMD and BCP from the downloaded package? I would li
ke
> to know if this is an option or not?
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
>
>
I know that BCP.EXE is part of the client tools for SQL2005. Does it also
come as part of a standalone like say SQLCMD.EXE as a standalone from the
feature Pack? We are looking to install the Native client and SQLCMD and BCP
without the other executables.
Thanks
ChrisHi Chris
I am not sure about the licencing issue with installing the Feature pack
version on it's own! AFAIK BCP.EXE is not available as a standalone install,
although there are example applications using the Bulk Copy API which you
could use to write your own application.
John
"Chris Wood" wrote:
> Hi,
> I know that BCP.EXE is part of the client tools for SQL2005. Does it also
> come as part of a standalone like say SQLCMD.EXE as a standalone from the
> feature Pack? We are looking to install the Native client and SQLCMD and B
CP
> without the other executables.
> Thanks
> Chris
>
>|||That's what I thought John.
We have some non MS SQL servers that don't really need the full Client
Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 and
had hoped that BCP might be available too but if not then we should just be
able to copy an SQL2005 BCP.EXE onto the server.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> I am not sure about the licencing issue with installing the Feature pack
> version on it's own! AFAIK BCP.EXE is not available as a standalone
> install,
> although there are example applications using the Bulk Copy API which you
> could use to write your own application.
> John
> "Chris Wood" wrote:
>|||Hi Chris
You may want to try installing from SQL Express the tools only which will
not install Management studio or Profiler, but I don't know if BCP is
included.
John
"Chris Wood" wrote:
> That's what I thought John.
> We have some non MS SQL servers that don't really need the full Client
> Tools, just the Native Client, SQLCMD and BCP. I could find the first 2 an
d
> had hoped that BCP might be available too but if not then we should just b
e
> able to copy an SQL2005 BCP.EXE onto the server.
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B7EDF30E-63A6-4757-BA3C-A6A8D53600AF@.microsoft.com...
>
>|||That's something worth trying.
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>|||John,
I downloaded the SQLExpress and can see, using Winzip, that it has BCP
included as part. I do not have a machine to install this onto so can I just
pick Native client, SQLCMD and BCP from the downloaded package? I would like
to know if this is an option or not?
Thanks
Chris
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...[vbcol=seagreen]
> Hi Chris
> You may want to try installing from SQL Express the tools only which will
> not install Management studio or Profiler, but I don't know if BCP is
> included.
> John
> "Chris Wood" wrote:
>|||Hi Chris
I don't think there is a way of being that selective you would need to use
the ADDLOCAL and specify Connectivity and SQL_Tools90
John
"Chris Wood" wrote:
> John,
> I downloaded the SQLExpress and can see, using Winzip, that it has BCP
> included as part. I do not have a machine to install this onto so can I ju
st
> pick Native client, SQLCMD and BCP from the downloaded package? I would li
ke
> to know if this is an option or not?
> Thanks
> Chris
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:E207B799-76CE-4FCB-AA42-B9B89CF0F768@.microsoft.com...
>
>
bcp Execution
Hai..
I have two systems. SQL server 2000 is installed in one system (SERVER ) and the client tools are installed in a seperate system (Client)
My question is from which system should i have to execute the bcp command line utility, from the server or from the client. ?
Thanks in advance...
with regards
Sudari would have thought it would be best to run it on the server myself, but it really depends what you are trying to do.|||Hai..
thnks for your reply...
Actually i want to know whether it is possible to execute bcp from client or not and if yes then how.. ?
bcoz there is no argument in bcp to identify the server name..
thnks in advance
With regards
Sudar|||Did you try -s ?|||Thnks kaiowas it's working correctly.....
I have two systems. SQL server 2000 is installed in one system (SERVER ) and the client tools are installed in a seperate system (Client)
My question is from which system should i have to execute the bcp command line utility, from the server or from the client. ?
Thanks in advance...
with regards
Sudari would have thought it would be best to run it on the server myself, but it really depends what you are trying to do.|||Hai..
thnks for your reply...
Actually i want to know whether it is possible to execute bcp from client or not and if yes then how.. ?
bcoz there is no argument in bcp to identify the server name..
thnks in advance
With regards
Sudar|||Did you try -s ?|||Thnks kaiowas it's working correctly.....
2012年3月6日星期二
bcp errors with queryout
I am having problems running bcp with queryout. I believe some of this stems from the fact that I also have the Sybase tools installed on the database servers and it in turn added its binn directory for the Sybase bcp.exe to the environment variables. Seeing this then, I would like to resolve this issue with a solution that does not rely on the order of environment variables.
Here is what is happening:
1) If I just try to run bcp on my server I get...
exec master.dbo.xp_cmdshell 'bcp ?'
/*
output -------------------
'bcp' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/
2) ...so, I add the full path to the location of the bcp program and this command works:
exec master.dbo.xp_cmdshell '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" ?'
/*
output --------------------------usage: C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character type]
[-N keep non-text native] [-V file format version] [-q quoted identifier]
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"]
NULL
*/
3) I then attempt a bcp out of a Northwin table... and this works as well
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" Northwind.dbo.Categories out C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output
------
NULL
Starting copy...
NULL
8 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 31
NULL
*/
4) I then attempt a queryout and it fails, indicating that it no longer understand the long filename
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" "SELECT CategoryID FROM Northwind.dbo.Categories" queryout C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output --------------------
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/been doing some more testing on my own local SQL Server. It seems that even if the environment variables are all fine, if I fully qualify the bcp exe and include a query (with double-quotes) it fails. So, what I am wondering is, can one not fully qualify the bcp.exe and do a query at the same time?:
--the below works
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = 'bcp "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
--...while this does NOT work!
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output ---
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/|||try to
SELECT @.cmdline = 'C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT|||sorry, really not works
Here is what is happening:
1) If I just try to run bcp on my server I get...
exec master.dbo.xp_cmdshell 'bcp ?'
/*
output -------------------
'bcp' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/
2) ...so, I add the full path to the location of the bcp program and this command works:
exec master.dbo.xp_cmdshell '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" ?'
/*
output --------------------------usage: C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character type]
[-N keep non-text native] [-V file format version] [-q quoted identifier]
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"]
NULL
*/
3) I then attempt a bcp out of a Northwin table... and this works as well
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" Northwind.dbo.Categories out C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output
------
NULL
Starting copy...
NULL
8 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 31
NULL
*/
4) I then attempt a queryout and it fails, indicating that it no longer understand the long filename
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" "SELECT CategoryID FROM Northwind.dbo.Categories" queryout C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output --------------------
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/been doing some more testing on my own local SQL Server. It seems that even if the environment variables are all fine, if I fully qualify the bcp exe and include a query (with double-quotes) it fails. So, what I am wondering is, can one not fully qualify the bcp.exe and do a query at the same time?:
--the below works
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = 'bcp "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
--...while this does NOT work!
DECLARE @.cmdline VARCHAR(4000)
SELECT @.cmdline = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe" "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT
/*
output ---
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
NULL
*/|||try to
SELECT @.cmdline = 'C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp.exe "SELECT CategoryID FROM Northwind.dbo.Categories" QUERYOUT C:\test.txt -c -T'
EXEC master..xp_cmdshell @.cmdline--, NO_OUTPUT|||sorry, really not works
2012年2月23日星期四
bcp and xp_cmdshell
Hi Experts,
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
Avi
Hi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have trouble
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>
|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name>)" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
Thanks
Yogish
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
Avi
Hi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have trouble
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>
|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name>)" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
Thanks
Yogish
bcp and xp_cmdshell
Hi Experts,
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
AviHi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have troubl
e
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp
"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name> )" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
Thanks
Yogish
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
AviHi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have troubl
e
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp
"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name> )" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
Thanks
Yogish
bcp and xp_cmdshell
Hi Experts,
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
AviHi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have trouble
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name>)" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
--
Thanks
Yogish
When I execute the command
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
from tempdb..EventsArchive" queryout
"c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
From the command line the bcp works fine. (I need the full path for the
bcp because we have Sybase as well on the machine)
However, when I execute the code below it form a sp it fails.
declare @.statement varchar(2000)
set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
"select Severity from tempdb..EventsArchive" queryout
c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
exec master..xp_cmdshell @.statement
Thanks,
AviHi
What does BOL say about more than one double quote?
Syntax
xp_cmdshell {'command_string'} [, no_output]
Arguments
'command_string'
Is the command string to execute at the operating-system command shell.
command_string is varchar(8000) or nvarchar(4000), with no default.
command_string cannot contain more than one set of double quotation marks. A
single pair of quotation marks is necessary if any spaces are present in the
file paths or program names referenced by command_string. If you have trouble
with embedded spaces, consider using FAT 8.3 file names as a workaround.
no_output
Is an optional parameter executing the given command_string, and does not
return any output to the client.
Regards
Mike
"Avi" wrote:
> Hi Experts,
> When I execute the command
> "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" "select Severity
> from tempdb..EventsArchive" queryout
> "c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210
> From the command line the bcp works fine. (I need the full path for the
> bcp because we have Sybase as well on the machine)
> However, when I execute the code below it form a sp it fails.
> declare @.statement varchar(2000)
> set @.statement = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp"
> "select Severity from tempdb..EventsArchive" queryout
> c:\aaabbbcc.txt" -c -t"," -C -Usa -P1210'
> exec master..xp_cmdshell @.statement
> Thanks,
> Avi
>
>
>|||Hi Avi,
You can also use it the following way;
SET @.conn = '" -U <username> -P <pwd> -c'
SET @.filename = '\\servername\foldername\test'+'.txt')
SET @.sql1 = 'BCP "SELECT * FROM <table name>)" QUERYOUT "'
SET @.sql1 = @.sql1 + @.filename + @.conn
EXEC master..xp_cmdshell @.sql1
You don't have to give full path of BCP utility.
--
Thanks
Yogish
订阅:
博文 (Atom)