Hi,
I am creating a text file using bcp in SQL2000. When I open the text
file which was created the =A3 sign has been replaced with something
else. WHen I look at the results in a query, the pound sign is there,
it's only when bcp'd to a text file.
It is running on Windows 2003 Server.
ANy help would be appreciated.This is a char, varchar, or text code page issue. The ascii value for pPound
sterling is 163m, which is greater than 127. If you don't want any
conversation, try to use -C RAW on the bcp command line.
Linchi
"nomad" wrote:
> Hi,
> I am creating a text file using bcp in SQL2000. When I open the text
> file which was created the £ sign has been replaced with something
> else. WHen I look at the results in a query, the pound sign is there,
> it's only when bcp'd to a text file.
> It is running on Windows 2003 Server.
> ANy help would be appreciated.
>|||On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> This is a char, varchar, or text code page issue. The ascii value for pPo=
und
> sterling is 163m, which is greater than 127. If you don't want any
> conversation, try to use -C RAW on the bcp command line.
> Hi,
Thanks for your response. I have tried setting the '=A3' to CHAR(163)
within the view, and the BCP is set to -c but still no joy. Could it
be something to do with the character set of the Server? as I am in
the UK, but it seems not to recognise '=A3', as if it is in America
ascii set.[vbcol=seagreen]
> Linchi
> "nomad" wrote:
>
>
>|||On 26 Jun, 13:43, nomad <d.bedg...@.ntlworld.com> wrote:[vbcol=seagreen]
> On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
> wrote:
>
Pound[vbcol=seagreen]
> Thanks for your response. I have tried setting the '=A3' to CHAR(163)
> within the view, and the BCP is set to -c but still no joy. Could it
> be something to do with the character set of the Server? as I am in
> the UK, but it seems not to recognise '=A3', as if it is in America
> ascii set.
>
>
>
>
>
Linchi, scrap that last reply, I wasn't adding -C RAW coorectly. It
worked a dream. Thank you very much for your answer. Much
appreciated.
Showing posts with label bcp. Show all posts
Showing posts with label bcp. Show all posts
Monday, March 26, 2012
Help with BCP!
Hi,
I am creating a text file using bcp in SQL2000. When I open the text
file which was created the =A3 sign has been replaced with something
else. WHen I look at the results in a query, the pound sign is there,
it's only when bcp'd to a text file.
It is running on Windows 2003 Server.
ANy help would be appreciated.This is a char, varchar, or text code page issue. The ascii value for pPound
sterling is 163m, which is greater than 127. If you don't want any
conversation, try to use -C RAW on the bcp command line.
Linchi
"nomad" wrote:
> Hi,
> I am creating a text file using bcp in SQL2000. When I open the text
> file which was created the £ sign has been replaced with something
> else. WHen I look at the results in a query, the pound sign is there,
> it's only when bcp'd to a text file.
> It is running on Windows 2003 Server.
> ANy help would be appreciated.
>|||On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> This is a char, varchar, or text code page issue. The ascii value for pPo=und
> sterling is 163m, which is greater than 127. If you don't want any
> conversation, try to use -C RAW on the bcp command line.
> Hi,
Thanks for your response. I have tried setting the '=A3' to CHAR(163)
within the view, and the BCP is set to -c but still no joy. Could it
be something to do with the character set of the Server? as I am in
the UK, but it seems not to recognise '=A3', as if it is in America
ascii set.
> Linchi
> "nomad" wrote:
> > Hi,
> > I am creating a text file using bcp in SQL2000. When I open the text
> > file which was created the =A3 sign has been replaced with something
> > else. WHen I look at the results in a query, the pound sign is there,
> > it's only when bcp'd to a text file.
> > It is running on Windows 2003 Server.
> > ANy help would be appreciated.|||On 26 Jun, 13:43, nomad <d.bedg...@.ntlworld.com> wrote:
> On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
> wrote:
> > This is a char, varchar, or text code page issue. The ascii value for p=Pound
> > sterling is 163m, which is greater than 127. If you don't want any
> > conversation, try to use -C RAW on the bcp command line.
> > Hi,
> Thanks for your response. I have tried setting the '=A3' to CHAR(163)
> within the view, and the BCP is set to -c but still no joy. Could it
> be something to do with the character set of the Server? as I am in
> the UK, but it seems not to recognise '=A3', as if it is in America
> ascii set.
> > Linchi
> > "nomad" wrote:
> > > Hi,
> > > I am creating a text file using bcp in SQL2000. When I open the text
> > > file which was created the =A3 sign has been replaced with something
> > > else. WHen I look at the results in a query, the pound sign is there,
> > > it's only when bcp'd to a text file.
> > > It is running on Windows 2003 Server.
> > > ANy help would be appreciated.
Linchi, scrap that last reply, I wasn't adding -C RAW coorectly. It
worked a dream. Thank you very much for your answer. Much
appreciated.
I am creating a text file using bcp in SQL2000. When I open the text
file which was created the =A3 sign has been replaced with something
else. WHen I look at the results in a query, the pound sign is there,
it's only when bcp'd to a text file.
It is running on Windows 2003 Server.
ANy help would be appreciated.This is a char, varchar, or text code page issue. The ascii value for pPound
sterling is 163m, which is greater than 127. If you don't want any
conversation, try to use -C RAW on the bcp command line.
Linchi
"nomad" wrote:
> Hi,
> I am creating a text file using bcp in SQL2000. When I open the text
> file which was created the £ sign has been replaced with something
> else. WHen I look at the results in a query, the pound sign is there,
> it's only when bcp'd to a text file.
> It is running on Windows 2003 Server.
> ANy help would be appreciated.
>|||On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> This is a char, varchar, or text code page issue. The ascii value for pPo=und
> sterling is 163m, which is greater than 127. If you don't want any
> conversation, try to use -C RAW on the bcp command line.
> Hi,
Thanks for your response. I have tried setting the '=A3' to CHAR(163)
within the view, and the BCP is set to -c but still no joy. Could it
be something to do with the character set of the Server? as I am in
the UK, but it seems not to recognise '=A3', as if it is in America
ascii set.
> Linchi
> "nomad" wrote:
> > Hi,
> > I am creating a text file using bcp in SQL2000. When I open the text
> > file which was created the =A3 sign has been replaced with something
> > else. WHen I look at the results in a query, the pound sign is there,
> > it's only when bcp'd to a text file.
> > It is running on Windows 2003 Server.
> > ANy help would be appreciated.|||On 26 Jun, 13:43, nomad <d.bedg...@.ntlworld.com> wrote:
> On 22 Jun, 16:47, Linchi Shea <LinchiS...@.discussions.microsoft.com>
> wrote:
> > This is a char, varchar, or text code page issue. The ascii value for p=Pound
> > sterling is 163m, which is greater than 127. If you don't want any
> > conversation, try to use -C RAW on the bcp command line.
> > Hi,
> Thanks for your response. I have tried setting the '=A3' to CHAR(163)
> within the view, and the BCP is set to -c but still no joy. Could it
> be something to do with the character set of the Server? as I am in
> the UK, but it seems not to recognise '=A3', as if it is in America
> ascii set.
> > Linchi
> > "nomad" wrote:
> > > Hi,
> > > I am creating a text file using bcp in SQL2000. When I open the text
> > > file which was created the =A3 sign has been replaced with something
> > > else. WHen I look at the results in a query, the pound sign is there,
> > > it's only when bcp'd to a text file.
> > > It is running on Windows 2003 Server.
> > > ANy help would be appreciated.
Linchi, scrap that last reply, I wasn't adding -C RAW coorectly. It
worked a dream. Thank you very much for your answer. Much
appreciated.
Help with BCP
NOTE: Addresses, usernames, and passwords have been changed.
I am trying to do a Batch Backup of my SQL Server (sql6.alpha.net) to (sql4.alpha.net). So I go onto sql6, get to a dos prompt and type the following (in order to backup the first table, "Accounts").
BCP "AlphaOffice.sa.Accounts" out "AOBackup-Tuesday.Accounts" -S"sql4.alpha.net,10775" -U"username" -P"password"
I get the following Error:
SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'AlphaOffice'. Login fails.
Now - I Know for a fact that the database "AlphaOffice" exists. My question is: the -P and -U parameters are for a username and password. Is this the username/password for the source DB (housed on the computer I am running BCP from), or the username/password for the destination server (Where the backup will eventually be housed)? If I use the User/Pass from the source, I get the above message. If I used the User/Pass of the destination, I get an error which states Access is Denied. Any thought?The -U -P refers to the server you are exporting data from or importing data to. In the example you have listed the -U -P is for sql4.alpha.net. When you bcp data to sql6.alpha.net you will use a uid/pwd for that box. You might also want to through a "-n" to extract the data in native mode.
Having said all that, DTS would be an easier way to go. You could DTS the data out of sql4 and then DTS the data into sql6 or go directly from sql4 to sql6.
btw, the error message you are getting suggests that the DB you are referencing does not exsist rather than a login problem.|||Personally I'd still prefer BCP over DTS (unless it's a Yukon DTS) simply because you can touch and feel the resulting file before you can send it to the destination. The trick there is to know whether the table contains an IDENTITY field on the destination, and if you need to retain the values from the source,- specify -E switch. And you definitely need to include either "-n" or "-c" switch, otherwise the utility would take you through a series of "employment application" type questions and offer to save the answers in a format file before you get to see the actual extraction process.
I am trying to do a Batch Backup of my SQL Server (sql6.alpha.net) to (sql4.alpha.net). So I go onto sql6, get to a dos prompt and type the following (in order to backup the first table, "Accounts").
BCP "AlphaOffice.sa.Accounts" out "AOBackup-Tuesday.Accounts" -S"sql4.alpha.net,10775" -U"username" -P"password"
I get the following Error:
SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'AlphaOffice'. Login fails.
Now - I Know for a fact that the database "AlphaOffice" exists. My question is: the -P and -U parameters are for a username and password. Is this the username/password for the source DB (housed on the computer I am running BCP from), or the username/password for the destination server (Where the backup will eventually be housed)? If I use the User/Pass from the source, I get the above message. If I used the User/Pass of the destination, I get an error which states Access is Denied. Any thought?The -U -P refers to the server you are exporting data from or importing data to. In the example you have listed the -U -P is for sql4.alpha.net. When you bcp data to sql6.alpha.net you will use a uid/pwd for that box. You might also want to through a "-n" to extract the data in native mode.
Having said all that, DTS would be an easier way to go. You could DTS the data out of sql4 and then DTS the data into sql6 or go directly from sql4 to sql6.
btw, the error message you are getting suggests that the DB you are referencing does not exsist rather than a login problem.|||Personally I'd still prefer BCP over DTS (unless it's a Yukon DTS) simply because you can touch and feel the resulting file before you can send it to the destination. The trick there is to know whether the table contains an IDENTITY field on the destination, and if you need to retain the values from the source,- specify -E switch. And you definitely need to include either "-n" or "-c" switch, otherwise the utility would take you through a series of "employment application" type questions and offer to save the answers in a format file before you get to see the actual extraction process.
Subscribe to:
Posts (Atom)