Hi all, I needed to load some tables in memory on startup because of performance reasons. I'm using "select * from <table>", but there are few questions: 1. How to pin already selected data in memory ? (DBCC PINTABLE doesn't work for 2005) 2. How to put index data in memory ? (do you read document(s) for advance memory management - index data caching ?) 3. How to pin index data in memory ? (otherwise sound very bad - table data in fast memory, index data - in slow disks)
I've read and noticed SQL 2005 handles memory differently then 2000. In 2000 if I told a server it had 6GB to use, it allocated the memory. In 2005 I have one 32-bit server with 6GB of memory and one 64-bit server with 32 GB. If Target Server Memory is the amount of memory SQL Server would like to have, how does that correspond to Maximum Server Memory? Also, how is Target Server Memory determined?
32-bit Physical Memory = 8GB Target Server Memory = 6GB (Willing to consume) Total Server Memory = 690MB (Currently consuming) Minimum Server Memory = 2GB Maximum Server Memory = 6GB
For the 32-bit server the Target Server Memory matches Maximum Server Memory
64-bit Physical Memory = 32GB Target Server Memory = 28GB (Willing to consume) Total Server Memory = 397MB (Currently consuming) Minimum Server Memory = 4GB Maximum Server Memory = 30GB
For the 64-bit server the Target Server Memory is less then the Maximum Server Memory
Lock Pages in Memory is set for the service account. Neither server above has yet to be released to production and only the 32-bit server has any users. In 2000 when SQL Server started I could count on it using about 1.72GB of memory immediately. Seeing the servers above consume only only 690MB and 397MB has me concerned. Is this just a case of SQL Server 2005 handling memory better then 2000?
I have a few questions about the behavior of the CLR host within SQL Server 2005. We are using a UDT (call it MyDateTime) created in C# that represents the COM FILETIME type, in order to have single millisecond resolution. MyDateTime values are stored in the database as binary(8), with the UDT itself being used primarily for display and reporting purposes. I am running performance tests using a prototype (written in C# as well) that runs 20 threads which repeatedly call a stored procedure, which accepts two MyDateTime's, and queries a table based on those MyDateTime's binary string representation. After a certain amount of time (depending on the particular system's resources), threads will start to be aborted. Most of the time the reason is "SQL Exception: .NET Framework execution was aborted by escalation policy because of out of memory." Sometimes, eventually the appdomain will be unloaded, and if I restart the prototype, the process starts over. Sometimes, I will have to restart the server before any more CLR processing can occur (no automatic appdomain unload). While the prototype is running, I'll check the MEMORYCLERK_SQLCLR rows in sys.dm_os_memory_clerks, and see the columns for pages and virtual memory ever increasing, until a threshold is hit (on my system, approximately 225 megs of virtual memory committed), resulting in all 20 threads being aborted, one by one, within 30-45 seconds. During that time some of the remaining threads will still have successful calls, while others are aborted.
I understand the necessity for the CLR in SQL Server to monitor and abort threads, in order to preserve the database server itself, as well as the importance of exception handling client-side, but unless the UDT code itself has a leak in it (I'm fairly confident it doesn't), this behavior confuses me. X amount of stored procedure calls (on my system, approximately 65,000 within an hour) can occur before SQL Server runs out of memory, and will constantly abort any thread trying to use the UDT, until it decides to unload the appdomain? Is it entirely up to the client to catch any threadaborts and retry those transactions, and is there any way to facilitate or predict if/when the appdomain is going to unload? Am I missing something about how garbage collection is functioning within SQL Server, or the CLR itself? Even simple CLR code slowly eats up the memory and causes the same results, if enough transactions are made. Does a long running or high transaction system have to anticipate a regular intervention by the escalation policy?
Any insight you could give me would be greatly appreciated. Have a good day.
-Dan
P.S. I'm running the September CTP of SQL Server and the Release Candidate of Visual Studio, based on our current development requirements--I will upgrade when I can.
I have some SQL CE database .sdf file on my handheld, and I was trying to connect to that file via SQL Server 2005 Management Studio, and it does not work. I am wondering if there is any good tool that I can use on desktop to connect to sqlce .sdf database file on my handheld?
Hi all, quick question. A while back I developed a website that allowed upload of photos. At the time, I used ASP and VBasic-behind and wrote code to store and retrieve all photos in an SQL database in binary format. I am looking at a new project, very similar, and was wondering if anybody had any idea how this method might compare to simply storing the image files on the server and using the database to simply point to their location. I am wondering how the two methods compare spped wise and hard drive space they may consume. Does anybody have any idea on a direct comparison?? Any benchmark tests anybody has seen or ran? Thanks all, Chris
* Windows 2003 32bit Enterprise with 10gb RAM * SQL 2005 32bit Enterprise * boot.ini - have added /3GB /PAE switches * Confirmed which account SQL Server is running under and added that account to Local Policies/User Rights Assignment/Lock pages in memory * Enabled AWE in SQL SERVER * set minimum and maximum server memory to 9gb * Rebooted.
Task manager says the following: sqlservr.exe - 95MB usage * I know this is normal when using AWE right? The actual physical memory used is 3.13GB and never goes higher. So this leads to believe that SQL is utilizing 3GB because of the /3GB switch, but it's not using the rest like it should be. I tried it without the /3GB switch and it only went up to about 2.1GB usage.
I've turned on performance monitor and SQL server target memory says 8.65 GB while the Total Server Memory says 2.45GB.
I've run: EXEC sp_configure 'show advanced options' RECONFIGURE GO
EXEC sp_configure 'awe enabled' RECONFIGURE GO
And it confirms that the running value for both is 1
I would like to know how much of memory is taken by sql server 2005 entprise edition 64 bit during sql server startup in default configuration.....(4GB RAM being used).
i also want to know about montioring the performance of sql server 2005.Should i continue to use performance monitor (perfmon) or is there any new feature in slq server 2005 which provides performance monitoring.
Hi, I am getting error while opening the Data Base Engine in Sql server Management Studio. We applied SP2. and restarted the server but no luck. Error Message:Attempted to read or protected memory. This is often an indication that other memory is corrupt(mscorlib).
I'm running Windows Small Business Server 2003 Premium R2. I installed SQL Server 2005 Standard Edition on this PC. I'm using Std Edition instead of the Workgroup Edition that comes with SBS since I like the additional features in the Std Edition.
I'm a kind of a newbie to Windows Server administration and SQL Server administration although I've written lots of SQL queries, stored procedures, etc.
I have 2GB of RAM on this PC. When I looked in Task Manager, I saw that SQL Server was using somewhere over 1GB of RAM. So, I opened up SQL Management Studio, right clicked on the server node, clicked to get to the memory configuration page and saw that SQL Server was set to use all 2GB of RAM on the PC. I changed that to 500MB(500000000, or 476MB) and decided to reboot the server. When the server came back up, I forgot to check SQL Server's new RAM usage. The server ran without interruption for over 24 hours. Now, when I checked SQL Server's memory usage in Task Manager, I can see it's using over 750MB of RAM.
How do I fix this?
I have Exchange Server 2003 running on this PC as well.
We have an application that we currently run on SQL Server 2000 that works by creating a DTS package that it then executes.
Due to performance reasons, we have been considering switching to 2005, for a few reasons. Can anyone confirm clarify the following?
1) SQL Server 2000 caps RAM usage at 2GB, whereas SQL Server 2005 is only limited by the OS - RAM usage is a big current issue for us, so if upgrading to 2005 would solve this it would help a lot. Can anyone confirm my understanding of this? 2) Would using the legacy DTS in SQL Server 2005 take advantage of this RAM difference, or is it running on the old 2000 engine and only able to use the 2GB?
My server is a dual AMD x64 2.19 GHz with 8 GB RAM running under Windows Server 2003 Enterprise Edition with service pack 1 installed. We have SQL 2000 32-bit Enterprise installed in the default instance. AWE is enabled using Dynamically configured SQL Server memory with 6215 MB minimum memory and 6656 maximum memory settings.
I have now installed, side-by-side, SQL Server 2005 Enterprise Edition in a separate named instance. Everything is running fine but I believe SQL Server2005 could run faster and need to ensure I am giving it plenty of resources. I realize AWE is not needed with SQL Server 2005 and I have seen suggestions to grant the SQL Server account the 'lock pages in memory' rights. This box only runs the SQL 2000 and SQL 2005 server databases and I would like to ensure, if possible, that each is splitting the available memory equally, at least until we can retire SQL Server 2000 next year. Any suggestions?
A query was taking 20 seconds and consuming 70% CPU takes only 1 second after setting Maximum Memory property to 2048 MB - why?
Server: OS Microsoft(R) Windows(R) Server 2003, Enterprise Edition Version5.2.3790 Service Pack 1 Build 3790 8 GB memory Two Dual-core AMD Opteron 285 2.6GHz Processors Server is not configured for AWE Fiber channel connection to EMC Clarion - two LUNs - one for MDF, one for LDF
SQL 2005 SQL 2005 32 bit Standard Edition - SP1 (version 9.0.2047) Three instances installed on server - only one instance in use Binaries and system databases on local mirrored disk Database file (MDF) on one EMC LUN - dedicated physical drives Log file (LDF) on one EMC LUN - dedicated physical drives
Query in question:
SELECT TOP 10 Address.Address1, Address.Address2, Address.City, Address.County, Address.State, Address.ZIPCode, Address.Country, Client.Name, Quote.Deleted, Client.PrimaryContact, Client.DBA, Client.Type, Quote.Status, Quote.LOB, Client.ClientID, Quote.QuoteID, Quote.PolicyNumber, Quote.EffectiveDate, Quote.ExpirationDate, Quote.Description, Quote.Description2, Quote.DateModified, Quote.DateAccessed, Quote.CurrentPremium, Quote.TransactionDate, Quote.CreationDate, Quote.Producer FROM ((Client INNER JOIN Address ON Client.ClientID = Address.ClientID) INNER JOIN Quote ON Client.ClientID = Quote.ClientID) WHERE (Quote.Deleted = 0) AND ((Address.AddressType)='Mailing') ORDER BY Client.Name
With default maximum memory setting (2,147,483,647 MB) - query runs in 20 seconds and consumes over 70 % of the CPU.
After changing maximum memory setting to 2048 MB, query runs in less than 1 second.
Question is: What is the best practice for setting the minimum and maximum memory settings for SQL 2005? What can be monitored to identify the cause of these type of issues - using profiler, PerfMon, other tool?
I was browsing Microsoft's SQL Server site, looking forsome details about SQL Server 2005. Didn't find whatI was looking for...I'm thinking about moving an existing SQL Server 2000workload to a new box, using SQL Server 2005, andmaybe the 64-bit version.My questions are:1. What is the current target date for release of SQL Server 2005?Will 64-bit ship when 32-bit ships?2. Will 64-bit SQL Server 2005 require a special versionof Windows Server 2003 (e.g. Windows Server 2003 Enterprise x64)?Will it work with both Intel and AMD processors?3. How many CPUs, and how much memory, will be supported bySQL Server 2005, 32-bit and 64-bit, on each OS that can runSQL Server 2005.I'm looking for a chart here, something like the chart onpage 117 of Kalen Delaney's "Inside SQL Server 2000" book.SQL Server 2005 SQL Server 2005Feature Enterprise 32-bit Enterprise 64-bit------------------- ----------------- -----------------CPUs supportedWin Srvr 2003:Win Srvr 2003 Adv:Win Srvr 2003 Ent x64:Physical memorysupportedWin Srvr 2003:Win Srvr 2003 Adv:Win Srvr 2003 Ent x64:Has Microsoft published this info, and I just can find it?
We have recently tested upgrading our web service from sql 2000 to 2005 sp1. The upgrade went smoothly enough, however we now have the problem of the sqlserver.exe process taking 90-100 % of the processors time, but using only 100 MB of memory.
We have 6GB available and we are running the enterprise editions of Windows 2003 and SQL 2005.
Machine specs,
DL380 G2, 2 X 2.8 Ghz Zeon, 6GB ram, Raid 5, database partition of 140 GB, Log partition of 35 GB.
Db is 25 GB, Log is 12 GB. Largest table has 32 million rows.
running Sql Server 2005 SP2 on Windows 2003 Server SP1 with 2GB RAM. After start-up, the sqlservr.exe does only take up around 100 MB of RAM, and it stays roughly there even if the DB is used heavily. This leads to very poor performance, even timeouts on simple querys.
In the task manager, I see that of the 2 GB of RAM, more than 1 GB is still available. I don't understand why SQL Server won't take it?
As a test, I configured the min and max amount of RAM SQL Server should used both to 1024 MB and restarted the service - but it is still the same picture. It won't take more than around 100 MB.
The server has just been restarted, but the problem remains.
BTW there is also an instance of SQL 2000 on the same machine. It shows the same behaviour - I even checked the "reserve phyiscal memory" checkbox there, but it stays on a very low number (50 MB) and doesn't adhere to the supposed size.
we wonder about the tradeoffs of t-sql vs clr in sql server 2005 especially from a memory perspective. Is there documentation available on this subject?
I have a Windows 2003 Server running SQL 2005. The server has 32 GB of memory and I have enabled AWE in SQL. I have also configured the min and max SQL memory as 1 GB and 28 GB, respectively. However, this server currently has very low activity so I'm not sure whether my AWE-related changes worked. SQLSERVR.EXE process takes up about 100 MB of memory. Is there any tool or scripts that I can use to memory stress SQL to confirm that AWE is really in effect ?
When I proposed start to use SQL Server 2005 for new VS 2005 web sites, one of my co-workers responded that we will update the old SQL Server 2000 databases to SQL Server 2005 when we are ready to use 2005 SQL Server.
Questions: 1. Any expected problems to upgrade old 2000 databases to new 2005 SQL Server? 2. I have installed both 2005/Management Studio Express and 2000/Enterprise Manager in my PC. Any expected problems when running both 2000 and 2005 SQL Server at the same database server? 3. What is the best configuration for running SQL Server 2005 when we have old 2000 databases? Upgade or not upgrade?
I'm having trouble finding the optimum memory settings for SQL Server 2005. I have 4 instances running on a macine with 8 dual-core processors and 18GB of RAM. I have tried the following memory settings so far:
No maximum - one instance used about 12GB of RAM so then the others struggled Maximum of 4GB each (2GB left for Windows) - meant that 3 instances could be using 1GB each and then another at 4GB and needing more whilst 9GB sat unused. Minimum of 2GB each - one instance would use up 10GB and then never give any back to the other instances.
I also find that setting a maximum then just causes a high amount of paging. What I would like to do is have each instance use a minimum amount, say 1GB, and then have each instance use a maximum of 13GB (3GB for other 3 instances running at a minimum level and 2GB for Windows). This 13GB should then be released and allocated to another instance when necessary, assuming it is no longer all being used. I do not want paging to occur if an instance reaches 13GB.
How do I go about configuring SQL Server to behave like this? Is it possible?
we are working on a release 2.0 mobile solution right now. In our version 1.0 we did not have to worry about memory issues as our application was the only application running on our target devices (e.g. T-Mobile MDA Compact II Pocket PCs, WM2005). Now we need to share the available memory with others. As our application relies on its SQL Server 2005 Mobile Edition database we are wondering about memory usage of that server.
We know that a Pocket PC divides its memory into Storage and Program. If our application uses a 5 MB database and 1.5 MB for DLLs and it's exe-file. These files reside in the storage space when not loaded. When the application starts up it is loaded in the program memory. What happens to the 5 MB database file? Is is loaded into Program memory as well? Are only portions of that file loaded? Or is nothing loaded at all?
Does anyone have a deeper insight into that server an can answer my questions.
Hi Team, Is there any management tools in SQL SERVER 2005? I just installed my standard edition and also developer version in different computer, but seems that both versions doesn't support management tools such as query analyzer. Can anyone explain to me... Thanks.
I have created two instaces on the Database Engine and have managed to also create a linkedserver between the two instances.
Now I'm trying to query two tables from both instances and I'm getting a collation conflict error. I tried to change this on the Database's propertry to match the other one, but still getting an error, see below:-
=============== Database could not be exclusively locked to perform operation. ALTER DATABASE FAILED. The default collation of database"XXXX" cannot be set to ....(Microsoft SQl Server, Error : 5030) ===============
just now i've installed SQL SERVER 2005 Management studio. i was throwed by an error when i started to run this Management Tool or EXE. the error was as follows:
"Unhandled exception has occurred in a component in your application.If you click continue, the application will ignore this error and attempt to continue. cannot create a stable subkey under a volatile parent key."
what i've to do now?
the below lines are displayed when i clicked the "Details" button:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.IO.IOException: Cannot create a stable subkey under a volatile parent key.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity) at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey) at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.CreateKeyValueIfNotExist(String regPath, String keyName) at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.RegisterLocalInstancesIfFirstTimeUser() at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
I've tried to download the SQL 2005 Server management but it always hang when it gets to 98% or 99%. has anybody experienced this and what solution is there for me. thanks
i would like to ask if there is a way to FILTER THE IPADDRESSES of users who wants to login the SQL Server Management Studio. right now, we are using Enterprise Edition of SQL Server 2005.
i just want to limit the users who can log in at Management Studio, the users know the password of SA, and i can't change the password coz we have deployed the programs with odbc connection using SA. so i thought of filtering the ipaddress of computers i want to grant access to SQL Server Management Studio, if its possible.
We installed SQL Server 2005 x64 on a server for our client here at our office. We can't connect to it using Enterprise Manager. I'm assuming we need to install the management console because of the differences in 2000 and 2005. The install is for a x64 and our workstations are x32. Do I need to get a media kit for a x32 because the x64 install won't work. Where can I get the install for the x32 Management console and will this work?
Can I connect to remote SQL 2005 server through SQL Server Management Studio Express? I always get a error code 18456 when I try to connect to SQL 2005 server through SQL Server Management Studio Express. I'm sure I enter correct username and password!
I just installed SQL Server 2005 Enterprise edition from my company's DVD. It was installed with the setting of using both Integrated windows authenitication as well as basic named authenication. I installed all the options too: Database Engine, Analysis Services, Reporting Services, SQL Server compact edition, and Integration Services. When I look at services there are: SQL Server Integration Services, SQL Server Analysis Services, SQL Server Reporting Services, and SQL Server Browser. All of which are running. Something that took me offguard was the installation did not ask me to provide an SA password. Other than that, the install looked like it went good.
I was able to connect to the local instance of the SQL Server 2005 using the SQL Server Management Studio. I could connect with SA, or connect with Integrated Windows Authenication. Whoohoo. Off and running! As a matter of fact, for the SA account I could use any password and it would still log me in.
First thing I did was I went in to the copy wizard to attempt to copy a database from a server on our network to my local box. First it asked me for the remote server. Then when I specified my local instance in the wizard, the wizard complained that my local instance was NOT SQL Server 2005. Doh! This I didn't understand. I figured maybe I need to check for MS updates. Sure enough, I found that ther was a SP2 and then a hot-fix for that SP2. I applied both. Now I cannot connect from SQL Server Management studio to my local instance of SQL Server 2005 database server. I get the following error:
"An error occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)"
However, I went in to see what other services I could connect to, and here's the results:
Analysis Services : OK! Reporting Services (Windows Auth/Basic/Forms) : NG "The reporting Services Instance could not be found (Microsoft.SqlServer.Management.UI.RSClient)" SQL Server Compact Edition : NG "The database cannot be found. Check the path to the database. [ File Name = CCG092 ] (SQL Server Compact Edition ADO.NET Data Provider) Integration Services : OK!
I can connect to other SQL Server databases on our network. However, just not my local one. No one on the network can connect to me either.
I even turned off my windows firewall and still no luck connecting to my own.
So something really went wrong when I applied SP2, however, admittedly from the error message when I tried to use the copy wizard, something was probably already wrong.
We have only a small busines and haven't got too much experience with servers and now have a proliant server coming in with SBS 2003 R2 Premium with the 4 GB max memory that SBS 2003 can handle according to the specs.
We weren't planning on using the SQL 2005 worlgroup edition up till now, but now we might. According to the specs of SQL server 2005 workgroup edition however, it has a max RAM of 3GB!
Is this going to be a problem and should we keep using our previous DB, or can we migrate toward SQL server with the 4 GB of RAM?
Hello: I have an old database created in SQL Server 2000, now I can open, access it in SQL Server 2005 Management Studio, but I can't create Data Diagrams. Please advise on how to make it work.... Thank you