Showing posts with label sql2000. Show all posts
Showing posts with label sql2000. 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.[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.

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.

Help with BAK file

Hi all,
I'm not an expert with SQL2000 and need some help. I have a full backup "BAK
file" that was produced from an SQL2000 server. Is there any way that I can
use that file to rebuild that database on another SQL2000 server?
Thanks,
Clausdid you try to force the restore over the existing database?
cjobes wrote:
> Thanks for the quick answer.
> Well, I tried everything I can think of. I first created a Database with the
> same name as the database on the old server. Then I tried to restore, first
> selecting Device and pointing to the BAK file. I got a message "Device
> activation error. The physical file name xxx maybe incorect. File
> xxx_Data.mdf cannot be restored to yyy_Data.mdf. Use WITH MOVE to identify a
> valid location for the file." The same error msg follows with regard to the
> xxx_log.ldf file.
> Any idea?
> Claus
> "ilovesql" <ilovesql@.hotmail.com> wrote in message
> news:eFS3oBiSDHA.1724@.TK2MSFTNGP10.phx.gbl...
>>Sure, that what backups are for.
>>If the backup was created using single backup file then restore is even
>>easier.
>>To speedup restore and avoid network traffic, in case your database is
> big,
>>then copy the backup file to 2nd server and use the restore command.
>>One issue that you will face after restoring from different server is
>>security that you can deal with later, once restore is completed.
>>"cjobes" <cjobes@.nova-tech.org> wrote in message
>>news:#HHTC0hSDHA.632@.tk2msftngp13.phx.gbl...
>>Hi all,
>>I'm not an expert with SQL2000 and need some help. I have a full backup
>>"BAK
>>file" that was produced from an SQL2000 server. Is there any way that I
>>can
>>use that file to rebuild that database on another SQL2000 server?
>>Thanks,
>>Claus
>>
>>
>|||Yes I did check the checkbox.
"Maria" <maria.belli@.*nospam*rfsworld.com> wrote in message
news:%236X%232MiSDHA.1688@.TK2MSFTNGP11.phx.gbl...
> did you try to force the restore over the existing database?
> cjobes wrote:
> > Thanks for the quick answer.
> > Well, I tried everything I can think of. I first created a Database with
the
> > same name as the database on the old server. Then I tried to restore,
first
> > selecting Device and pointing to the BAK file. I got a message "Device
> > activation error. The physical file name xxx maybe incorect. File
> > xxx_Data.mdf cannot be restored to yyy_Data.mdf. Use WITH MOVE to
identify a
> > valid location for the file." The same error msg follows with regard to
the
> > xxx_log.ldf file.
> >
> > Any idea?
> > Claus
> >
> > "ilovesql" <ilovesql@.hotmail.com> wrote in message
> > news:eFS3oBiSDHA.1724@.TK2MSFTNGP10.phx.gbl...
> >
> >>Sure, that what backups are for.
> >>If the backup was created using single backup file then restore is even
> >>easier.
> >>To speedup restore and avoid network traffic, in case your database is
> >
> > big,
> >
> >>then copy the backup file to 2nd server and use the restore command.
> >>
> >>One issue that you will face after restoring from different server is
> >>security that you can deal with later, once restore is completed.
> >>
> >>"cjobes" <cjobes@.nova-tech.org> wrote in message
> >>news:#HHTC0hSDHA.632@.tk2msftngp13.phx.gbl...
> >>
> >>Hi all,
> >>
> >>I'm not an expert with SQL2000 and need some help. I have a full backup
> >>
> >>"BAK
> >>
> >>file" that was produced from an SQL2000 server. Is there any way that I
> >>
> >>can
> >>
> >>use that file to rebuild that database on another SQL2000 server?
> >>
> >>Thanks,
> >>Claus
> >>
> >>
> >>
> >>
> >
> >
>|||Have a look at the following KB articles
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
INF: Using the WITH MOVE Option with the RESTORE Statement
http://support.microsoft.com/default.aspx?scid=kb;EN-US;221465
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"cjobes" <cjobes@.nova-tech.org> wrote in message
news:eQK1KTiSDHA.2480@.tk2msftngp13.phx.gbl...
Yes I did check the checkbox.
"Maria" <maria.belli@.*nospam*rfsworld.com> wrote in message
news:%236X%232MiSDHA.1688@.TK2MSFTNGP11.phx.gbl...
> did you try to force the restore over the existing database?
> cjobes wrote:
> > Thanks for the quick answer.
> > Well, I tried everything I can think of. I first created a Database with
the
> > same name as the database on the old server. Then I tried to restore,
first
> > selecting Device and pointing to the BAK file. I got a message "Device
> > activation error. The physical file name xxx maybe incorect. File
> > xxx_Data.mdf cannot be restored to yyy_Data.mdf. Use WITH MOVE to
identify a
> > valid location for the file." The same error msg follows with regard to
the
> > xxx_log.ldf file.
> >
> > Any idea?
> > Claus
> >
> > "ilovesql" <ilovesql@.hotmail.com> wrote in message
> > news:eFS3oBiSDHA.1724@.TK2MSFTNGP10.phx.gbl...
> >
> >>Sure, that what backups are for.
> >>If the backup was created using single backup file then restore is even
> >>easier.
> >>To speedup restore and avoid network traffic, in case your database is
> >
> > big,
> >
> >>then copy the backup file to 2nd server and use the restore command.
> >>
> >>One issue that you will face after restoring from different server is
> >>security that you can deal with later, once restore is completed.
> >>
> >>"cjobes" <cjobes@.nova-tech.org> wrote in message
> >>news:#HHTC0hSDHA.632@.tk2msftngp13.phx.gbl...
> >>
> >>Hi all,
> >>
> >>I'm not an expert with SQL2000 and need some help. I have a full backup
> >>
> >>"BAK
> >>
> >>file" that was produced from an SQL2000 server. Is there any way that I
> >>
> >>can
> >>
> >>use that file to rebuild that database on another SQL2000 server?
> >>
> >>Thanks,
> >>Claus
> >>
> >>
> >>
> >>
> >
> >
>|||Thanks for the help. This was exactly what I was looking for and it worked.
Claus
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ePqDfmiSDHA.2256@.TK2MSFTNGP11.phx.gbl...
> Have a look at the following KB articles
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
> INF: Using the WITH MOVE Option with the RESTORE Statement
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;221465
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "cjobes" <cjobes@.nova-tech.org> wrote in message
> news:eQK1KTiSDHA.2480@.tk2msftngp13.phx.gbl...
> Yes I did check the checkbox.
>
> "Maria" <maria.belli@.*nospam*rfsworld.com> wrote in message
> news:%236X%232MiSDHA.1688@.TK2MSFTNGP11.phx.gbl...
> > did you try to force the restore over the existing database?
> >
> > cjobes wrote:
> > > Thanks for the quick answer.
> > > Well, I tried everything I can think of. I first created a Database
with
> the
> > > same name as the database on the old server. Then I tried to restore,
> first
> > > selecting Device and pointing to the BAK file. I got a message "Device
> > > activation error. The physical file name xxx maybe incorect. File
> > > xxx_Data.mdf cannot be restored to yyy_Data.mdf. Use WITH MOVE to
> identify a
> > > valid location for the file." The same error msg follows with regard
to
> the
> > > xxx_log.ldf file.
> > >
> > > Any idea?
> > > Claus
> > >
> > > "ilovesql" <ilovesql@.hotmail.com> wrote in message
> > > news:eFS3oBiSDHA.1724@.TK2MSFTNGP10.phx.gbl...
> > >
> > >>Sure, that what backups are for.
> > >>If the backup was created using single backup file then restore is
even
> > >>easier.
> > >>To speedup restore and avoid network traffic, in case your database is
> > >
> > > big,
> > >
> > >>then copy the backup file to 2nd server and use the restore command.
> > >>
> > >>One issue that you will face after restoring from different server is
> > >>security that you can deal with later, once restore is completed.
> > >>
> > >>"cjobes" <cjobes@.nova-tech.org> wrote in message
> > >>news:#HHTC0hSDHA.632@.tk2msftngp13.phx.gbl...
> > >>
> > >>Hi all,
> > >>
> > >>I'm not an expert with SQL2000 and need some help. I have a full
backup
> > >>
> > >>"BAK
> > >>
> > >>file" that was produced from an SQL2000 server. Is there any way that
I
> > >>
> > >>can
> > >>
> > >>use that file to rebuild that database on another SQL2000 server?
> > >>
> > >>Thanks,
> > >>Claus
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> >
>
>

Monday, March 12, 2012

help with 2005 profiler

i'm trying to use the sql2005 profiler to run traces against both
sql2000 and sql2005 databases. i created a trace template when
connected to a sql2000 db. i want to use the exact same template for
traces against sql2005. how do i get that template so that i can use it
when connected to a sql2005 instance? i've tried exporting, importing,
saving as a trace file, etc. i can't get that trace template to load
when connected to sql2005.ch wrote:
> i'm trying to use the sql2005 profiler to run traces against both
> sql2000 and sql2005 databases. i created a trace template when
> connected to a sql2000 db. i want to use the exact same template for
> traces against sql2005. how do i get that template so that i can use
> it when connected to a sql2005 instance? i've tried exporting,
> importing, saving as a trace file, etc. i can't get that trace
> template to load when connected to sql2005.
The trace templates are saved according to the SQL Server version. I'm
not sure exactly where they are saved. I did a quick check and could not
find them on the local PC or in the registration database - unless they
were exported.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Local machine, it seems:
C:\Program Files\Microsoft SQL Server\90\Tools\Profiler\Templates\Microsoft SQL Server\80
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:eNbokIw7FHA.3984@.TK2MSFTNGP11.phx.gbl...
> ch wrote:
>> i'm trying to use the sql2005 profiler to run traces against both
>> sql2000 and sql2005 databases. i created a trace template when
>> connected to a sql2000 db. i want to use the exact same template for
>> traces against sql2005. how do i get that template so that i can use
>> it when connected to a sql2005 instance? i've tried exporting,
>> importing, saving as a trace file, etc. i can't get that trace
>> template to load when connected to sql2005.
> The trace templates are saved according to the SQL Server version. I'm not sure exactly where they
> are saved. I did a quick check and could not find them on the local PC or in the registration
> database - unless they were exported.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Tibor Karaszi wrote:
> Local machine, it seems:
> C:\Program Files\Microsoft SQL
> Server\90\Tools\Profiler\Templates\Microsoft SQL Server\80
Tibor,
I checked in that folder and did not see the (user) templates. I created
two custom templates for SQL 2000 and SQL 2005 with the same name and
did not see either in the templates folder (I did not physically export
them to disk). I think that the "Templates" folder stores the default
templates that are delivered with SQL Server (for SQL 2000 and SQL
2005). But it's not clear to me where the user templates are stored. I'm
guessing they are in encrypted format either in the registration
database or in another file. Searching all files that contained the
string representing the template name revealed nothing on my server.
Still searching...
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Maybe in your "My Documents" under the "SQL Server Management Studio"
folder?
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:eHShgB47FHA.3224@.TK2MSFTNGP09.phx.gbl...
> Tibor Karaszi wrote:
>> Local machine, it seems:
>> C:\Program Files\Microsoft SQL
>> Server\90\Tools\Profiler\Templates\Microsoft SQL Server\80
> Tibor,
> I checked in that folder and did not see the (user) templates. I created
> two custom templates for SQL 2000 and SQL 2005 with the same name and did
> not see either in the templates folder (I did not physically export them
> to disk). I think that the "Templates" folder stores the default templates
> that are delivered with SQL Server (for SQL 2000 and SQL 2005). But it's
> not clear to me where the user templates are stored. I'm guessing they are
> in encrypted format either in the registration database or in another
> file. Searching all files that contained the string representing the
> template name revealed nothing on my server. Still searching...
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Sorry, David. I just noticed some files in that directory and incorrectly assumed that user defined
templates would also be stored there.
However, after some searching, I did find the location for user defined trace templates:
C:\Documents and Settings\Tibor\Application Data\Microsoft\SQL Profiler\9.0\Templates\Microsoft SQL
Server\90
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:eHShgB47FHA.3224@.TK2MSFTNGP09.phx.gbl...
> Tibor Karaszi wrote:
>> Local machine, it seems:
>> C:\Program Files\Microsoft SQL
>> Server\90\Tools\Profiler\Templates\Microsoft SQL Server\80
> Tibor,
> I checked in that folder and did not see the (user) templates. I created two custom templates for
> SQL 2000 and SQL 2005 with the same name and did not see either in the templates folder (I did not
> physically export them to disk). I think that the "Templates" folder stores the default templates
> that are delivered with SQL Server (for SQL 2000 and SQL 2005). But it's not clear to me where the
> user templates are stored. I'm guessing they are in encrypted format either in the registration
> database or in another file. Searching all files that contained the string representing the
> template name revealed nothing on my server. Still searching...
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

Wednesday, March 7, 2012

help typical error inner join

hi, all

i am having what is considered to be typical error, i have two tables in sql2000 database

(options) orderid, productid, productname,optionvalue
(orderitems) orderid, quantity, unitprice,productcode,productid

I'd like to join these 2 tables and be able to display in a repeater. the problem is that i keep getting some duplicates with sql statement

"SELECT DISTINCT
options.orderid,options.productname,options.optionvalue,orderitems.quantity,orderitems.productcode
FROM options INNER JOIN on orderitems on
options.[orderid] = orderitems.[orderid] "

PLEEEASE HELP ME SLEEP AT NIGHT:)
thanksAdd this and remove the DISTINCT:

GROUP BY option.orderid, options.productname,option.optionvalue,orderitems.quantity,orderitems.productcode

Sunday, February 26, 2012

Help SP3a installation error

I have just installed a new Win2000 server, and loaded
SQL2000 Standard Edition. As soon as I try to install sp3a
I get the following error:
"Setup Initialization error.
Access is denied.
Source: D:\installs\SP3a-SQL2000\x86\setup\sqlspre.ini
Target: ...path\temp\setupsql.ini"
I am running the installation as administrator.| I have just installed a new Win2000 server, and loaded
| SQL2000 Standard Edition. As soon as I try to install sp3a
| I get the following error:
| "Setup Initialization error.
| Access is denied.
| Source: D:\installs\SP3a-SQL2000\x86\setup\sqlspre.ini
| Target: ...path\temp\setupsql.ini"
|
| I am running the installation as administrator.
--
Hi Sean,
Check c:\winnt\temp folder and see if setupsql.ini already exists. If it
does,
delete it. This should allow setupsql to complete successfully.
Hope this helps,
--
Eric Cárdenas
SQL Server support

Help setting up SQL2000

I am assigned to setup a small (less than 15 PC) network, accessing a
database server(SQL2000). I am wondering if I can use XP Home (which
we already have)for the clients and setting them all (including the
server -WS2003-) as workgroup? Or do I need a domain to setup the
connection to the database server? In that case we will have to
upgrade to Pro.

ThanksHi

I would go for the domain as you are at a level where it could well help for
administrative and other tasks. It will also be more secure. This is also
better as you already have a server! Even if you didn't go this route you
can access the server (at worse case by IP address, assuming the firewalls
are not blocking the ports!!!) and SQL authentication.

You will have to check the licencing to make sure that you have the right
CALs.

John

"lankids" <lankids@.brandalls.net> wrote in message
news:191285ee.0405280538.1b29cd43@.posting.google.c om...
> I am assigned to setup a small (less than 15 PC) network, accessing a
> database server(SQL2000). I am wondering if I can use XP Home (which
> we already have)for the clients and setting them all (including the
> server -WS2003-) as workgroup? Or do I need a domain to setup the
> connection to the database server? In that case we will have to
> upgrade to Pro.
> Thanks

Sunday, February 19, 2012

Help relation Between Xml and SQL2000

HI,
I have a xml file and would like to Make Relation Between
it and table Or View in SQl2000
can some one say how?
Thanks
You should look into using either OpenXML or the annotated schema. Check out
the SQL Server Books Online section on XML or
http://msdn.microsoft.com/sqlxml
Best regards
Michael
"Abdallah Salah" <a_elsabbahi2000@.yahoo.com> wrote in message
news:a8cb01c487d8$c1801960$a401280a@.phx.gbl...
> HI,
> I have a xml file and would like to Make Relation Between
> it and table Or View in SQl2000
> can some one say how?
>
> Thanks
>