Showing posts with label least. Show all posts
Showing posts with label least. Show all posts

Thursday, March 8, 2012

Code Page

I read text files in ASP on server side, then try to enter data into a
database in SQL Server. The files are in ibm852 (1250) coding - at least
that's the code page with which they are shown properly when putting the
lines read on the output.
However, when I enter them into the SQL Server (currently simply by setting
a string to an "INSERT INTO T1(6, 'hello')"-like statement and then execute
it through the connection such as oConn.Execute sSQL), the special
characters (Hungarian) are all changed to meaningless characters, such as
'hell:' for 'helló' etc.
The texty columns are of type varchar(n). I also tried nvarchar, but nothing
has changed.
So, how can I set the appropriate code page in SQL Server or transform the
strings so that the special characters don't get messed up when entered?Agoston,
Try changing the column type to nvarchar(n) and executing this query:
INSERT INTO T1(6, N'helló')
Perhaps you simply forgot to type the N required to signify a Unicode
string.
Steve Kass
Drew University
Agoston Bejo wrote:
>I read text files in ASP on server side, then try to enter data into a
>database in SQL Server. The files are in ibm852 (1250) coding - at least
>that's the code page with which they are shown properly when putting the
>lines read on the output.
>However, when I enter them into the SQL Server (currently simply by setting
>a string to an "INSERT INTO T1(6, 'hello')"-like statement and then execute
>it through the connection such as oConn.Execute sSQL), the special
>characters (Hungarian) are all changed to meaningless characters, such as
>'hell:' for 'helló' etc.
>The texty columns are of type varchar(n). I also tried nvarchar, but nothing
>has changed.
>So, how can I set the appropriate code page in SQL Server or transform the
>strings so that the special characters don't get messed up when entered?
>
>|||"Steve Kass" <skass@.drew.edu> wrote in message
news:%23xM75ETpEHA.1712@.tk2msftngp13.phx.gbl...
> Agoston,
> Try changing the column type to nvarchar(n) and executing this query:
> INSERT INTO T1(6, N'helló')
> Perhaps you simply forgot to type the N required to signify a Unicode
> string.
It doesn't change a thing. The same messy characters are in the db. Any
other ideas?
> Steve Kass
> Drew University
> Agoston Bejo wrote:
> >I read text files in ASP on server side, then try to enter data into a
> >database in SQL Server. The files are in ibm852 (1250) coding - at least
> >that's the code page with which they are shown properly when putting the
> >lines read on the output.
> >
> >However, when I enter them into the SQL Server (currently simply by
setting
> >a string to an "INSERT INTO T1(6, 'hello')"-like statement and then
execute
> >it through the connection such as oConn.Execute sSQL), the special
> >characters (Hungarian) are all changed to meaningless characters, such as
> >'hell:' for 'helló' etc.
> >The texty columns are of type varchar(n). I also tried nvarchar, but
nothing
> >has changed.
> >
> >So, how can I set the appropriate code page in SQL Server or transform
the
> >strings so that the special characters don't get messed up when entered?
> >
> >
> >
> >|||I don't do ASP programming, but is the string "INSERT INTO T1 ..." a
Unicode string? If not, it will not preserve the accented characters.
There ought to be some way to specify that it be Unicode, similar to the
way you do in SQL Server with the N prefix. If that fails to produce
the right result, I'm not sure what could be happening, since Unicode
strings shouldn't be affected by code page settings, but I'd probably
try specifying the 1250 code page somewhere on the ASP page - maybe the
ASP programmers have a better idea.
SK
Agoston Bejo wrote:
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:%23xM75ETpEHA.1712@.tk2msftngp13.phx.gbl...
>
>>Agoston,
>> Try changing the column type to nvarchar(n) and executing this query:
>>INSERT INTO T1(6, N'helló')
>>Perhaps you simply forgot to type the N required to signify a Unicode
>>string.
>>
>
>It doesn't change a thing. The same messy characters are in the db. Any
>other ideas?
>
>
>>Steve Kass
>>Drew University
>>Agoston Bejo wrote:
>>
>>I read text files in ASP on server side, then try to enter data into a
>>database in SQL Server. The files are in ibm852 (1250) coding - at least
>>that's the code page with which they are shown properly when putting the
>>lines read on the output.
>>However, when I enter them into the SQL Server (currently simply by
>>
>setting
>
>>a string to an "INSERT INTO T1(6, 'hello')"-like statement and then
>>
>execute
>
>>it through the connection such as oConn.Execute sSQL), the special
>>characters (Hungarian) are all changed to meaningless characters, such as
>>'hell:' for 'helló' etc.
>>The texty columns are of type varchar(n). I also tried nvarchar, but
>>
>nothing
>
>>has changed.
>>So, how can I set the appropriate code page in SQL Server or transform
>>
>the
>
>>strings so that the special characters don't get messed up when entered?
>>
>>
>>
>
>|||Steve Kass wrote:
> I don't do ASP programming, but is the string "INSERT INTO T1 ..." a
> Unicode string? If not, it will not preserve the accented characters.
> There ought to be some way to specify that it be Unicode, similar to
> the way you do in SQL Server with the N prefix. If that fails to
> produce the right result, I'm not sure what could be happening, since
> Unicode
> strings shouldn't be affected by code page settings, but I'd probably
> try specifying the 1250 code page somewhere on the ASP page - maybe
> the ASP programmers have a better idea.
>
Good thought, but vbscript is unicode by default.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Friday, February 24, 2012

Clustering with 2 active nodes and 1 passive node

Normally, clustering is setup as a 1-to-1 relationship between active and
passive nodes, at least that is my understanding. We have a situation where
we are being asked to setup a 2 active node, 1 passive node environment.
Here's the question - if one of the active nodes fails, it fails over to the
passive node. Now what happens if the 2nd active node fails? Will the other
active node (originally the passive node) handle the failover or will it try
to failover to the first active node that failed or will the whole thing just
grind to a screeching halt? I know we can setup a 2 active/ 2passive node
setup, but we wanted to research the 2-to-1 possibility as well.
Thanks!
Message posted via http://www.droptable.com
Hi
You don't need a 1:1 relationship between nodes.
And forget the terms active / passive, it is totally out of date and does
not describe SQL Server 2000/2005 clustering.
You have an instance of SQL Server running on an node.
If you have 2 nodes, it could run on any of those nodes at any one time. If
you had 3 nodes, it could run on any of those nodes, at any one time.
If you have 2 nodes, one sits around waiting for a failover. If you have 3
nodes, 2 sit around waiting for a failover.
If you have more than one SQL Server instance running on the cluster, then
the instances can run on any of the nodes.
The instances could be all running on the same node, or dispersed over the
various nodes.
Quite often, people run with 3 nodes and 2 instances or 4 nodes with 3
instances. There is nothing stopping you running 3 instances on 3 nodes, 4
instances on 4 nodes, or any combination of up to 16 instances over 4 nodes.
You just need to make sure that you have enough resources, that in worst
case, one node could run all instances.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Michael G via droptable.com" <forum@.droptable.com> wrote in message
news:541CE6C54F90F@.droptable.com...
> Normally, clustering is setup as a 1-to-1 relationship between active and
> passive nodes, at least that is my understanding. We have a situation
> where
> we are being asked to setup a 2 active node, 1 passive node environment.
> Here's the question - if one of the active nodes fails, it fails over to
> the
> passive node. Now what happens if the 2nd active node fails? Will the
> other
> active node (originally the passive node) handle the failover or will it
> try
> to failover to the first active node that failed or will the whole thing
> just
> grind to a screeching halt? I know we can setup a 2 active/ 2passive node
> setup, but we wanted to research the 2-to-1 possibility as well.
> Thanks!
>
> --
> Message posted via http://www.droptable.com
|||Very helpful. Question: So now, even with RAID 10, the single point of
failure becomes the shared drive array? How does one go about creating a
failover for this?
Respectfully,
Michael Wiederhold
michael@.auctionarms.com
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%230j6BCZtFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Hi
> You don't need a 1:1 relationship between nodes.
> And forget the terms active / passive, it is totally out of date and does
> not describe SQL Server 2000/2005 clustering.
> You have an instance of SQL Server running on an node.
> If you have 2 nodes, it could run on any of those nodes at any one time.
> If you had 3 nodes, it could run on any of those nodes, at any one time.
> If you have 2 nodes, one sits around waiting for a failover. If you have 3
> nodes, 2 sit around waiting for a failover.
> If you have more than one SQL Server instance running on the cluster, then
> the instances can run on any of the nodes.
> The instances could be all running on the same node, or dispersed over the
> various nodes.
> Quite often, people run with 3 nodes and 2 instances or 4 nodes with 3
> instances. There is nothing stopping you running 3 instances on 3 nodes, 4
> instances on 4 nodes, or any combination of up to 16 instances over 4
> nodes. You just need to make sure that you have enough resources, that in
> worst case, one node could run all instances.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Michael G via droptable.com" <forum@.droptable.com> wrote in message
> news:541CE6C54F90F@.droptable.com...
>
|||Hi
Most high end SAN's have a block level copy mechanism so that you can
"mirror" that data to another SAN, preferably at another location.
EMC has SRDF that can run synchronous or asynchronous over fast WAN links.
Tape backups must never be forgotten either.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"michael wiederhold" <michael@.auctionarms.com> wrote in message
news:%23RhSzuztFHA.3068@.TK2MSFTNGP14.phx.gbl...
> Very helpful. Question: So now, even with RAID 10, the single point of
> failure becomes the shared drive array? How does one go about creating a
> failover for this?
> Respectfully,
> Michael Wiederhold
> michael@.auctionarms.com
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%230j6BCZtFHA.3236@.TK2MSFTNGP14.phx.gbl...
>
|||Thanks. Really do appreciate your participation in this newsgroup.
Respectfully,
Michael Wiederhold
michael@.auctionarms.com
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:ONHGyz8tFHA.2540@.TK2MSFTNGP09.phx.gbl...
> Hi
> Most high end SAN's have a block level copy mechanism so that you can
> "mirror" that data to another SAN, preferably at another location.
> EMC has SRDF that can run synchronous or asynchronous over fast WAN links.
> Tape backups must never be forgotten either.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "michael wiederhold" <michael@.auctionarms.com> wrote in message
> news:%23RhSzuztFHA.3068@.TK2MSFTNGP14.phx.gbl...
>