Showing posts with label single. Show all posts
Showing posts with label single. Show all posts

Tuesday, March 27, 2012

Database Collation: Chinese, Japanese, Korean

My application supports multiple languages/locales in a single database. Some of our new customers want to support Chinese, Japanese, Korean, Italian, Spanish, and German in addition to English. Supporting the Latin based languages is not a problem. But I am having trouble finding a collation sequence that allows me to store the other double byte languages in the same database correctly.

I have found changing the data types from text, char, varchar to ntext, nchar, nvarchar and adding an N in front of the various strings that getting inserted seems to work:

insert into CONTENTDATA (recordid, xml)
values (newid(), N'<CHANNEL1><FILE1/><TEXT1><![CDATA[和红魔拉拉队的动感精神
]]></TEXT1><TEXT3><![CDATA[和红魔拉拉队的动感精神]]></TEXT3></CHANNEL1>');

But this is not going to be a practical solution for us. Is there a collation sequence that would allow us to store multiple locales like we do in Oracle (AL32UTF8)?

Thanks in advance

Dov RosenbergYou can store multiple languages in SQL Server (since version 7.0) using the Unicode data types as you have noted. In Setup, you can also choose the default Server collation.If you need a finer level of collation control subsequently, you can use the multiple collations per column feature in SQL Server 2000 / 2005. More details at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da_6ttf.asp, http://msdn.microsoft.com/SQL/2000/learn/internat/default.aspx.

Sunday, March 25, 2012

Database Backups & Restores: an in-depth knowledge required

I have two servers.
Server A:
Dual 2.8 Xeon Processor
4 GB RAM
SQL Server 2000 Enterprise
Server B
Single 3.0 Xeon Processor
2.5 GB RAM
SQL Server 2000 Standard
I have an identical database on both. The backup file is 1.22 GB, the data
file is 1.44 GB and the log file is 504 KB.
When I restore these databases, the restore on server A takes 2.58 minutes,
but on server B it takes 6.48 minutes (over twice as long).
Similar discrepancies are found when I backup these databases.
I don't understand why!
Studying task manager shows that the CPU usage is minimal and the amount of
memory used is minimal, presumably ruling out the speed of the processors
and the amount of RAM available. If I had multiple data devices then I
could see the Enterprise version being quicker because it could create more
threads for parallel processing, but I don't so this should rule out the
Enterprise/Standard differences. Oh and both servers run on multiple
spindle, fast RAID5+1 disks, and these are identical.
So...what is occurring that actually takes the ~ 3 minutes or ~ 7 minutes?
Many thanks
GriffWhat are the server manufacturer and model numbers? What are the FSB
speeds? What are the I/O controller speeds? What is the System:Worker
Queue counter throughput? What are the Physical/Logical disk counter
throughput?
Sincerely,
Anthony Thomas
"Griff" <Howling@.The.Moon> wrote in message
news:%23wUo43l8EHA.1564@.TK2MSFTNGP09.phx.gbl...
I have two servers.
Server A:
Dual 2.8 Xeon Processor
4 GB RAM
SQL Server 2000 Enterprise
Server B
Single 3.0 Xeon Processor
2.5 GB RAM
SQL Server 2000 Standard
I have an identical database on both. The backup file is 1.22 GB, the data
file is 1.44 GB and the log file is 504 KB.
When I restore these databases, the restore on server A takes 2.58 minutes,
but on server B it takes 6.48 minutes (over twice as long).
Similar discrepancies are found when I backup these databases.
I don't understand why!
Studying task manager shows that the CPU usage is minimal and the amount of
memory used is minimal, presumably ruling out the speed of the processors
and the amount of RAM available. If I had multiple data devices then I
could see the Enterprise version being quicker because it could create more
threads for parallel processing, but I don't so this should rule out the
Enterprise/Standard differences. Oh and both servers run on multiple
spindle, fast RAID5+1 disks, and these are identical.
So...what is occurring that actually takes the ~ 3 minutes or ~ 7 minutes?
Many thanks
Griff|||> What are the server manufacturer and model numbers? What are the FSB
> speeds? What are the I/O controller speeds? What is the System:Worker
> Queue counter throughput? What are the Physical/Logical disk counter
> throughput?
Gosh !
Not sure I can provide these answers. I know that they're both using RAID
5+1 10,000 RMP disks with independent raid controllers. The only
significant difference between the two could be the FSB (one is 800, other
is likely to be 533, but not sure how to identify this).
Whilst I could spend time providing these statistics, I may be more
profitable if I could identify what the real bottle-necks really are (if all
the ones you've mentioned, then in which order) and would they account for a
doubling of time?
Thanks
Griff|||Well perhaps it's your specs
btw u can run CPUZ to identify bus speeds etc.
If the machines have same quality of equipment and are configured similarly
then I would suggest your ram and dual CPU vs single CPU
If you run the profiler on them as they are backing perhaps you will see
something like mem utilisation etc.
Another thought is how much are the files fragmented the dbs arent huge but
there may be a degree of fragmentation on the file system which slows things
down.
Also how are you restoring from Server A to Server B?
"Griff" <Howling@.The.Moon> wrote in message
news:%23wUo43l8EHA.1564@.TK2MSFTNGP09.phx.gbl...
> I have two servers.
> Server A:
> Dual 2.8 Xeon Processor
> 4 GB RAM
> SQL Server 2000 Enterprise
> Server B
> Single 3.0 Xeon Processor
> 2.5 GB RAM
> SQL Server 2000 Standard
> I have an identical database on both. The backup file is 1.22 GB, the
data
> file is 1.44 GB and the log file is 504 KB.
> When I restore these databases, the restore on server A takes 2.58
minutes,
> but on server B it takes 6.48 minutes (over twice as long).
> Similar discrepancies are found when I backup these databases.
> I don't understand why!
> Studying task manager shows that the CPU usage is minimal and the amount
of
> memory used is minimal, presumably ruling out the speed of the processors
> and the amount of RAM available. If I had multiple data devices then I
> could see the Enterprise version being quicker because it could create
more
> threads for parallel processing, but I don't so this should rule out the
> Enterprise/Standard differences. Oh and both servers run on multiple
> spindle, fast RAID5+1 disks, and these are identical.
> So...what is occurring that actually takes the ~ 3 minutes or ~ 7
minutes?
> Many thanks
> Griff
>
>|||Well, you asked for possibilities, these are only a few, and they were
static, physical configuration differences. Then you have the runtime
environment differences.
I guess my point is that you are trying to compare apples to oranges. If
you run the backups several times in a row, over and over, on both boxes,
and then average out the times, do you then still see the same magnitude of
difference?
I would be concerned if you were running two identical servers with the
identical work load, but, in this case, you are running under very different
circumstances and it is these differences that will add up to what you are
experiencing.
Howerver, I suspect that the larger server has more robust subsystem
components. CPU speed is only one criterion you look at one analyzing a
server's performance. Moreover, what is the memory bus speed and flavor of
memory? DDR at 2800 or higher vs. only a PC 233. Obviously, they are
probably very similar, but I hope you get my point.
Sincerely,
Anthony Thomas
"Griff" <Howling@.The.Moon> wrote in message
news:O$1a2Xm8EHA.3236@.TK2MSFTNGP15.phx.gbl...
> What are the server manufacturer and model numbers? What are the FSB
> speeds? What are the I/O controller speeds? What is the System:Worker
> Queue counter throughput? What are the Physical/Logical disk counter
> throughput?
Gosh !
Not sure I can provide these answers. I know that they're both using RAID
5+1 10,000 RMP disks with independent raid controllers. The only
significant difference between the two could be the FSB (one is 800, other
is likely to be 533, but not sure how to identify this).
Whilst I could spend time providing these statistics, I may be more
profitable if I could identify what the real bottle-necks really are (if all
the ones you've mentioned, then in which order) and would they account for a
doubling of time?
Thanks
Griff|||Got the latest version of CPU-Z
The slow machine...it won't report the BUS speeds (in fact, it reports very
little).
As for how I restore...I just use Enterprise Manager and do it from there.
Griff|||Griff,
What I was referring to was where is the backup device you're restoring
from?
If one is local (ie on disk) and the other is over the network then you will
see slower restores.
TBH I suspect the single CPU job is not upto the same performance and you
are realising this in what you're doing.
evan
"Griff" <Howling@.The.Moon> wrote in message
news:edUZHjn8EHA.3640@.tk2msftngp13.phx.gbl...
> Got the latest version of CPU-Z
> The slow machine...it won't report the BUS speeds (in fact, it reports
very
> little).
> As for how I restore...I just use Enterprise Manager and do it from there.
> Griff
>|||> What I was referring to was where is the backup device you're restoring
> from?
> If one is local (ie on disk) and the other is over the network then you
will
> see slower restores.
Oh, sorry. Everything is local...I tried to make the two tests as
identical as possible
> TBH I suspect the single CPU job is not upto the same performance and you
> are realising this in what you're doing.
Okay. Thanks for your help with this Evan
Griffsql

Monday, March 19, 2012

Database automatically resetting to Single User Mode frequently

The problem was with the SQL server that authenticates
users' access to the Intranet. For some reason, the SQL
server put itself in single-use mode, which prevents users
from accessing the database- hence denying logon. This
happens once every few months- for reasons we cannot
explain. This time, it also looked like the SQL server had
depleted resources. I rebooted the server and everything
came back immediately.
Frequency - Once in 10 days or a week.
Any Idea why this is happening?
Thanks.Perhaps the main plan? Remove the option to "fix minor problems", this is the cause. And if this is
your problem, make sure you are current on service pack.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Scott London" <anonymous@.discussions.microsoft.com> wrote in message
news:0afc01c3996f$7d736540$a401280a@.phx.gbl...
> The problem was with the SQL server that authenticates
> users' access to the Intranet. For some reason, the SQL
> server put itself in single-use mode, which prevents users
> from accessing the database- hence denying logon. This
> happens once every few months- for reasons we cannot
> explain. This time, it also looked like the SQL server had
> depleted resources. I rebooted the server and everything
> came back immediately.
> Frequency - Once in 10 days or a week.
>
> Any Idea why this is happening?
> Thanks.|||Scott,
I would bet you have a job or process that sets the db to
single user mode temporarily in order to perform some
function. If that job fails then the db may be left in
single user mode until the server is restarted. Check
the sql error logs and the windows application log around
the times this happens and see if you can find any clues.
Sincerely,
Invotion Engineering Team
Advanced Microsoft Hosting Solutions
http://www.Invotion.com
>--Original Message--
>The problem was with the SQL server that authenticates
>users' access to the Intranet. For some reason, the SQL
>server put itself in single-use mode, which prevents
users
>from accessing the database- hence denying logon. This
>happens once every few months- for reasons we cannot
>explain. This time, it also looked like the SQL server
had
>depleted resources. I rebooted the server and everything
>came back immediately.
>Frequency - Once in 10 days or a week.
>
>Any Idea why this is happening?
>Thanks.
>.
>|||Tibor,
a recent SP eliminates that problem?
Quentin
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:eg6riEXmDHA.360@.TK2MSFTNGP12.phx.gbl...
> Perhaps the main plan? Remove the option to "fix minor problems", this is
the cause. And if this is
> your problem, make sure you are current on service pack.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Scott London" <anonymous@.discussions.microsoft.com> wrote in message
> news:0afc01c3996f$7d736540$a401280a@.phx.gbl...
> > The problem was with the SQL server that authenticates
> > users' access to the Intranet. For some reason, the SQL
> > server put itself in single-use mode, which prevents users
> > from accessing the database- hence denying logon. This
> > happens once every few months- for reasons we cannot
> > explain. This time, it also looked like the SQL server had
> > depleted resources. I rebooted the server and everything
> > came back immediately.
> >
> > Frequency - Once in 10 days or a week.
> >
> >
> > Any Idea why this is happening?
> >
> > Thanks.
>|||Yep. I think the problem occurred with SQL7, and fixed in sp3. Not 100% sure though. Note that
removing the fix option (which is a bad option in the first place) eliminates this problem.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Quentin Ran" <ab@.who.com> wrote in message news:uBVlkbXmDHA.1408@.TK2MSFTNGP11.phx.gbl...
> Tibor,
> a recent SP eliminates that problem?
> Quentin
>
> "Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> wrote in message news:eg6riEXmDHA.360@.TK2MSFTNGP12.phx.gbl...
> > Perhaps the main plan? Remove the option to "fix minor problems", this is
> the cause. And if this is
> > your problem, make sure you are current on service pack.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at:
> http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> > "Scott London" <anonymous@.discussions.microsoft.com> wrote in message
> > news:0afc01c3996f$7d736540$a401280a@.phx.gbl...
> > > The problem was with the SQL server that authenticates
> > > users' access to the Intranet. For some reason, the SQL
> > > server put itself in single-use mode, which prevents users
> > > from accessing the database- hence denying logon. This
> > > happens once every few months- for reasons we cannot
> > > explain. This time, it also looked like the SQL server had
> > > depleted resources. I rebooted the server and everything
> > > came back immediately.
> > >
> > > Frequency - Once in 10 days or a week.
> > >
> > >
> > > Any Idea why this is happening?
> > >
> > > Thanks.
> >
> >
>

Friday, February 24, 2012

data types help?

Which data type do I need to assign to my field to let users enter characters such as +=-_|\ etc...pretty much every single character from a standard keyboard...
thanksAny of the CHAR() related types, such as CHAR(), VARCHAR(), NCHAR(), NVARCHAR(), or TEXT should do nicely.

-PatP|||I have varchar now (on a web site with sql server as a database) but only save the letter and number for this example ab+ not the plus...

But I do have function, that I will probably have to customize,that is causing it only to save letters and numbers,

Thanks for your help once again