Showing posts with label detail. Show all posts
Showing posts with label detail. Show all posts

Sunday, February 19, 2012

5GB memory for SQL server

We are having 6GB of memory on SQL server. How do we ensure that SQL server
uses at least 5 GB of memory?
S/w detail
SQL 2000 with sp3
Windows 2003 (32 bit) no spThis is a multi-part message in MIME format.
--060402090907040201010607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
boot.ini needs the /pae switch to access memory over 4GB (and /3gb
wouldn't hurt either in this case). You need to reboot for that switch
to take affect.
Also, you need to enable AWE memory for your SQL instance with
sp_configure. That is:
exec sp_configure 'awe enabled', 1
reconfigure
go
Then restart the SQL instance (with the Services Control Manager or NET
STOP/NET START). When you use AWE memory SQL Server won't swap out
pages to disk if you're running low on memory (like it does with dynamic
memory management when the memory is less than 4GB). So Microsoft
recommends to set an upper limit on SQL memory usage with the "max
server memory" sp_configure option. For example, to set a max limit of
5GB for the SQL instance (so you don't kill the O/S and other apps on
the box) you would execute this SQL statement:
exec sp_configure "max server memory" 5120
reconfigure
go
You may as well do the 2 sp_configure statements in the same batch and
then restart the SQL instance to save you restarting SQL twice (minimise
downtime). SQL Books Online has a fair bit of stuff on using AWE memory:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asp
It's a bit unusual to request that SQL uses "at least" 5GB. SQL will
consume the memory as it needs it (starting at < 100MB), caching data
that's accessed and query plans that get compiled. Why not just let it
do it's thing?
This is a very common question on the sqlserver newsgroups. Maybe I
should blog it (like about a hundred other people already have I'm sure).
--
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Amar wrote:
>We are having 6GB of memory on SQL server. How do we ensure that SQL server
>uses at least 5 GB of memory?
>S/w detail
>SQL 2000 with sp3
>Windows 2003 (32 bit) no sp
>
>
>
--060402090907040201010607
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>boot.ini needs the /pae switch to access memory over 4GB (and /3gb
wouldn't hurt either in this case). You need to reboot for that switch
to take affect.<br>
<br>
Also, you need to enable AWE memory for your SQL instance with
sp_configure. That is:<br>
</tt>
<blockquote><tt>exec sp_configure 'awe enabled', 1</tt><br>
<tt>reconfigure</tt><br>
<tt>go</tt><br>
</blockquote>
<tt>Then restart the SQL instance (with the Services Control Manager or
NET STOP/NET START). When you use AWE memory SQL Server won't swap out
pages to disk if you're running low on memory (like it does with
dynamic memory management when the memory is less than 4GB). So
Microsoft recommends to set an upper limit on SQL memory usage with the
"max server memory" sp_configure option. For example, to set a max
limit of 5GB for the SQL instance (so you don't kill the O/S and other
apps on the box) you would execute this SQL statement:<br>
</tt>
<blockquote><tt>exec sp_configure "max server memory" 5120</tt><br>
<tt>reconfigure</tt><br>
<tt>go</tt><br>
</blockquote>
<tt>You may as well do the 2 sp_configure statements in the same batch
and then restart the SQL instance to save you restarting SQL twice
(minimise downtime). SQL Books Online has a fair bit of stuff on using
AWE memory:<br>
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asp</a><br>">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asp</a><br>
<br>
It's a bit unusual to request that SQL uses "at least" 5GB. SQL will
consume the memory as it needs it (starting at < 100MB), caching
data that's accessed and query plans that get compiled. Why not just
let it do it's thing?<br>
<br>
This is a very common question on the sqlserver newsgroups. Maybe I
should blog it (like about a hundred other people already have I'm
sure).<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Amar wrote:
<blockquote cite="mid6D049C2F-5D53-482C-B076-C0BA30770687@.microsoft.com"
type="cite">
<pre wrap="">We are having 6GB of memory on SQL server. How do we ensure that SQL server
uses at least 5 GB of memory?
S/w detail
SQL 2000 with sp3
Windows 2003 (32 bit) no sp
</pre>
</blockquote>
</body>
</html>
--060402090907040201010607--|||Hi
You need Enterprise Edition of SQL Server 2000 and Enterprise Edition of
Windows Server 2003
And read KB 274750
http://support.microsoft.com/default.aspx?scid=kb;en-us;274750 on how to
configure it.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Amar" wrote:
> We are having 6GB of memory on SQL server. How do we ensure that SQL server
> uses at least 5 GB of memory?
> S/w detail
> SQL 2000 with sp3
> Windows 2003 (32 bit) no sp
>
>|||Thanks Mike for pointing towards right direction
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> You need Enterprise Edition of SQL Server 2000 and Enterprise Edition of
> Windows Server 2003
> And read KB 274750
> http://support.microsoft.com/default.aspx?scid=kb;en-us;274750 on how to
> configure it.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
>
> "Amar" wrote:
> > We are having 6GB of memory on SQL server. How do we ensure that SQL server
> > uses at least 5 GB of memory?
> >
> > S/w detail
> > SQL 2000 with sp3
> > Windows 2003 (32 bit) no sp
> >
> >
> >|||Thanks Mike. Great info. Yes a blog would be ver good.
Amar
"Mike Hodgson" wrote:
> boot.ini needs the /pae switch to access memory over 4GB (and /3gb
> wouldn't hurt either in this case). You need to reboot for that switch
> to take affect.
> Also, you need to enable AWE memory for your SQL instance with
> sp_configure. That is:
> exec sp_configure 'awe enabled', 1
> reconfigure
> go
> Then restart the SQL instance (with the Services Control Manager or NET
> STOP/NET START). When you use AWE memory SQL Server won't swap out
> pages to disk if you're running low on memory (like it does with dynamic
> memory management when the memory is less than 4GB). So Microsoft
> recommends to set an upper limit on SQL memory usage with the "max
> server memory" sp_configure option. For example, to set a max limit of
> 5GB for the SQL instance (so you don't kill the O/S and other apps on
> the box) you would execute this SQL statement:
> exec sp_configure "max server memory" 5120
> reconfigure
> go
> You may as well do the 2 sp_configure statements in the same batch and
> then restart the SQL instance to save you restarting SQL twice (minimise
> downtime). SQL Books Online has a fair bit of stuff on using AWE memory:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asp
> It's a bit unusual to request that SQL uses "at least" 5GB. SQL will
> consume the memory as it needs it (starting at < 100MB), caching data
> that's accessed and query plans that get compiled. Why not just let it
> do it's thing?
> This is a very common question on the sqlserver newsgroups. Maybe I
> should blog it (like about a hundred other people already have I'm sure).
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
> Amar wrote:
> >We are having 6GB of memory on SQL server. How do we ensure that SQL server
> >uses at least 5 GB of memory?
> >
> >S/w detail
> >SQL 2000 with sp3
> >Windows 2003 (32 bit) no sp
> >
> >
> >
> >
> >
>

547 error: help decoding

Can someone explain in more detail, or in plain english, what this error is trying to say.. ?

"An SQL error occured - 547 error: INSERT conflicted with column Foreign Key constraint 'Employee_FK00'. The conflict occured in database NAME, table 'Union', column 'UnionName'. "

I get this error aftering trying to add a new row in my .Net Winform i'm developing. Thanks!It looks like you are trying to insert a row in a child table without a parent row. Make sure that there is a row in the table that 'Employee_FK00' is referencing before you do the insert.|||Well.. more specifically, there are two tables 1. Employee and 2. tbl_Union. In the employee table there is Lastname, firstname, EmployeeID, and Union. All the different Unions are in the tbl_Union, with a Union# and Union Name field. Both tables have rows in them.

The vb.net Application was taking the Union# from the tbl_Union and inserted the value in Union under Employee. But i keep getting that SQL error.|||According to the error message, the foreign key is trying to match on UnionName, not Union#. Can you provide the DDL for the tables, including the foriegn key constraint definition?|||Sure can, but i need your help. What is the best way to get this information? I'm new to this... :p|||It depends. I just need the column names of the tables and the foreign key definition. I suspect that you are populating the union#, but for some reason, the foreign key is trying to point to UnionName.|||Well there is the "EMPLOYEE" table, which has fields Employee# (Primary Key), lastname, firstname, union. Then, there is the "UNION" table with fields, Union# (Foreign key), and UnionName. That's the basics...|||What DBMS are you using? What columns in the UNION table is the Foreign Key constraint 'Employee_FK00' referencing?|||I'm using MS SQL 2000...

What columns in the UNION table is the Foreign Key constraint 'Employee_FK00' referencing?

It is the Union# column.|||I think you have your foriegn key defined incorrectly. If you look at the error message, it is trying to find a parent record with matching column 'UnionName' instead of Union#.|||Actually, that is a error on my part, its not the 'UnionName', but the 'Union#'. I typed that wrong in my original statement. :(

I'm currently in the SQL Server enterprise design area on the tables, looking at the indexes/keys tabs, etc. I guess this is the area I need to play in to figure it out. Thanks!|||I also found this thread that deals with the same situation I think.. http://www.dbforums.com/t700898.html

I did upgrade from access 2000 to ms sql as well, if that messed something up - I dont know.

Thursday, February 16, 2012

547 error: help decoding

Can someone explain in more detail, or in plain english, what this error is trying to say.. ?

"An SQL error occured - 547 error: INSERT conflicted with column Foreign Key constraint 'Employee_FK00'. The conflict occured in database NAME, table 'Union', column 'UnionName'. "

I get this error aftering trying to add a new row in my .Net Winform i'm developing. Thanks!This might be because you are trying to inserting a detail record that expects a header record to exist in another table.

For example, say you are trying to insert 'Union_1' into column in a table (employee?), but that table has a constraint where 'Union_1' MUST exist in table union in column unionname. If 'Union_1' does not exist in union, it is not going to allow you to insert it into the other table.

BTW, Union is a keyword so I'd be careful with using it as a table name.

Select * from a
union
select * from b

Saturday, February 11, 2012

4 SQL instances in Cluster on 2 windows server?

Is it possible to have 4 SQL instances in Cluster on 2 windows server.
Active/passive set-up.
In detail, what i mean is:
I have 2 windows OS - WinClustA with WinClustB
On WinClustA - SQLInstA (active) and SQLInstY (passive)
On WinClustB - SQLInstB (passive) and SQLInstX (active)
In case of failure,
SQLInstA will failover to SQLInstB and
SQLInstX will failover to SQLInstY
Is this possible to configure?
This is called a multi instance cluster setup, but the way it work sis
SQLInstA on WinClustA will failover to SQLInstA on WinClustB, and vice
versa.
Please post such questions to microsoft.public.sqlsever.clustering
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:DE047808-6379-45C9-85BF-1FC5D3C0A646@.microsoft.com...
> Is it possible to have 4 SQL instances in Cluster on 2 windows server.
> Active/passive set-up.
> In detail, what i mean is:
> I have 2 windows OS - WinClustA with WinClustB
> On WinClustA - SQLInstA (active) and SQLInstY (passive)
> On WinClustB - SQLInstB (passive) and SQLInstX (active)
> In case of failure,
> SQLInstA will failover to SQLInstB and
> SQLInstX will failover to SQLInstY
> Is this possible to configure?
>

4 SQL instances in Cluster on 2 windows server

Is it possible to have 4 SQL instances in Cluster on 2 windows server.
Active/passive set-up.
In detail, what i mean is:
I have 2 windows OS - WinClustA with WinClustB
On WinClustA - SQLInstA (active) and SQLInstY (passive)
On WinClustB - SQLInstB (passive) and SQLInstX (active)
In case of failure,
SQLInstA will failover to SQLInstB and
SQLInstX will failover to SQLInstY
Is this possible to configure?
You have a misunderstanding of how clustering works. What you want is 2 SQL
instances: SQLInstA and SQLInstB. With SQL clustering, each instance can
run on any host node, but only on one node at a time. Normally you will
have SQLInstA running on WinClustA and SQLInstB on WinClustB. Should either
node fail, the other node runs both instances. That is how clustering works
and yes, it is possible.
Geoff N. Hiten
Microsoft SQL Server MVP
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:E4D2C97A-8B60-4E64-A5E3-37215C1456FE@.microsoft.com...
> Is it possible to have 4 SQL instances in Cluster on 2 windows server.
> Active/passive set-up.
> In detail, what i mean is:
> I have 2 windows OS - WinClustA with WinClustB
> On WinClustA - SQLInstA (active) and SQLInstY (passive)
> On WinClustB - SQLInstB (passive) and SQLInstX (active)
> In case of failure,
> SQLInstA will failover to SQLInstB and
> SQLInstX will failover to SQLInstY
> Is this possible to configure?
>
|||While my SQLInstB instance is passive on windows machine WinclustB, I do not
want to waste the resource on winClustB, I want to install another instance
called SQLInstX (active), and host another set of databases from this
instance.
Hence each WinclustA and WinclustB I will have one active SQL Instance and
one passive SQL Instance.
I have not worked with clustering too much, so please inform if this is
possible. I did read all the content in SQL BOL fro clustering.
"Geoff N. Hiten" wrote:

> You have a misunderstanding of how clustering works. What you want is 2 SQL
> instances: SQLInstA and SQLInstB. With SQL clustering, each instance can
> run on any host node, but only on one node at a time. Normally you will
> have SQLInstA running on WinClustA and SQLInstB on WinClustB. Should either
> node fail, the other node runs both instances. That is how clustering works
> and yes, it is possible.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "Pari" <Pari@.discussions.microsoft.com> wrote in message
> news:E4D2C97A-8B60-4E64-A5E3-37215C1456FE@.microsoft.com...
>
>
|||Active and Passive are obsolete terms used to describe SQL 7.0 clustering.
They do not apply to SQL 2000 clustering. Even then, "Active" and "Passive"
referred to host nodes, not instances. An clustered instance of SQL Server
2000 does not have any "active" or "passive" context. It is an instance,
period.
You want two SQL instances which will each run on separate nodes (host
computers) except during failure. That is what I described to you under SQL
2000 clustering. Node A runs one instance and Node B runs another instance.
Should one node fail, the other node starts running both instances of SQL
server. There is no "passive" instance anywhere. The "Active" instance
simply changes host nodes. Again, this is possible. You can have up to 4
host nodes and 16 SQL instances in a SQL 2000 cluster. You can choose the
normal host node and the failure path of each SQL instance separately.
Geoff N. Hiten
Microsoft SQL Server MVP
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:EF0D86F1-EEBF-48F7-A92A-CAFE5531DB05@.microsoft.com...[vbcol=seagreen]
> While my SQLInstB instance is passive on windows machine WinclustB, I do
> not
> want to waste the resource on winClustB, I want to install another
> instance
> called SQLInstX (active), and host another set of databases from this
> instance.
> Hence each WinclustA and WinclustB I will have one active SQL Instance and
> one passive SQL Instance.
> I have not worked with clustering too much, so please inform if this is
> possible. I did read all the content in SQL BOL fro clustering.
>
> "Geoff N. Hiten" wrote:
|||This may help also:
http://support.microsoft.com/default...b;en-us;260758
Geoff N. Hiten
Microsoft SQL Server MVP
"Pari" <Pari@.discussions.microsoft.com> wrote in message
news:EF0D86F1-EEBF-48F7-A92A-CAFE5531DB05@.microsoft.com...[vbcol=seagreen]
> While my SQLInstB instance is passive on windows machine WinclustB, I do
> not
> want to waste the resource on winClustB, I want to install another
> instance
> called SQLInstX (active), and host another set of databases from this
> instance.
> Hence each WinclustA and WinclustB I will have one active SQL Instance and
> one passive SQL Instance.
> I have not worked with clustering too much, so please inform if this is
> possible. I did read all the content in SQL BOL fro clustering.
>
> "Geoff N. Hiten" wrote:
|||This clarifies it, thanks.
"Geoff N. Hiten" wrote:

> Active and Passive are obsolete terms used to describe SQL 7.0 clustering.
> They do not apply to SQL 2000 clustering. Even then, "Active" and "Passive"
> referred to host nodes, not instances. An clustered instance of SQL Server
> 2000 does not have any "active" or "passive" context. It is an instance,
> period.
> You want two SQL instances which will each run on separate nodes (host
> computers) except during failure. That is what I described to you under SQL
> 2000 clustering. Node A runs one instance and Node B runs another instance.
> Should one node fail, the other node starts running both instances of SQL
> server. There is no "passive" instance anywhere. The "Active" instance
> simply changes host nodes. Again, this is possible. You can have up to 4
> host nodes and 16 SQL instances in a SQL 2000 cluster. You can choose the
> normal host node and the failure path of each SQL instance separately.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "Pari" <Pari@.discussions.microsoft.com> wrote in message
> news:EF0D86F1-EEBF-48F7-A92A-CAFE5531DB05@.microsoft.com...
>
>