Memory Usage in SQL Server [closed] - sql-server

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What are the most memory consuming reasons in SQL SERVER 2005?

The SQL Rocks article Memory Use in SQL Server will probably answer your question.
I think this is one of the important parts:
SQL Server's caching behavior is the
reason for the substantial memory use.
This is by design and is not a bug,
memory leak nor incorrect
configuration. Every time
SQL Server needs to read a page from
disk it caches the page in memory so
that the slow disk operation will be
unnecessary should SQL Server need
that page again. Every time SQL Server
needs to read a page from disk it
caches the page in memory so that the
slow disk operation will be
unnecessary SQL Server should need
that page again.
SQL Server is just memory hungry. The more memory you give it, the more it will use. SQL Server should probably always be run on its own server if it is doing anything non-trivial. In other words, don't install SQL Server on your domain controller, file server or source control repository (unless your source control repository uses SQL Server).

Buffer pool for mainly data, plans, locks
Can you add some background please?

Related

How to achieve 100 000 users concurrent connectivity to sql server database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How to achieve 100 000 users concurrent connectivity to sql server database?
I have a scenario where 100 000 users will login to the website which is using sql server as backend to perform insert on the same table. Is it practical? How to achieve it? How should one design the database?
SQL Server can handle very large number of users inserting rows. What will happen is users will connect, their identity will be checked if they can connect and if they have the correct privileges and then the insert will happen and SQL Server will then drop the connection. There is no reason for a user to maintain a connection once the insert has happened and SQL Server has returned a status code indicating success or failure.
I have had success with very large number of users doing this to a single audit table and I have had to have the audit table be a heap without any keys. This way SQL Server would just add consecutive rows to consecutive pages and this happened fast enough for the inserts to successfully happen. There is no guarantee that the inserts will occur in this fashion (but in practice they did) and it handled very high volumes of data. You of course have to test to see if your install can handle the volume you anticipate. It does not matter what order the data is stored as long as it is successfully saved.
I have never seen an install that can handle 100,000 active sessions. The number of locks would probably overwhelm any conceivable set of hardware. You may also want to do a select ##MAX_CONNECTIONS from the intended machine that will indicate, as the number returned will indicate the maximum number of simultaneous connections the current instance can (theoretically) handle. On both SQL Server 2008 and 2012 enterprise the number returned is 32,767.

Mirror Live Database Sql Server 2008 R2 Enterprise [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Quick Question: Is it possible to mirror a database without downtime?
Long Question: I have a database on production being used by quite a few clients. The previous management did not implemented any kind of redundancy or high-availability strategy (no clustering... not even storage!!!), and now, as business grows, this is becoming a huge liability... as a emergency act I'm considering mirroring the database... The main problem is that I cannot take down the database. That would imply on some legal/financial problems due to some previous SLA agreements... So, can I mirror a database without taking it down?
Extra info:
The SQL Server version is 2008 R2 Enterprise.
The instance consist of one database only (it's a multi-tenant database)
The database infrastructure consist of one physical server running windows 2008 R2 (standalone server). It's not a cluster nor a VM and theres no storage behind it... all data is inside it's only 2TB disk...
The Database size (.mdf) is about 170 GB...
There's about 100 transactions each second
There's no hours when usage goes down... business are 24/7...
Yes, this totally looks like that environment a developer would create on their machine...
This is all in books online. Hopefully you can try in development, or on your desktop first. There are quite a few things to consider, so you should give it a thorough read.
Yes, you can mirror without taking it down. You restore a backup to the mirror and use NORECOVERY option. You then setup the mirroring and transactions start to move from primary to mirror. You'll need to set up any other things needed on that remote server - logins, jobs, etc.
Transfer logins using this method, so you get matching SIDs between servers.

How to undo TRUNCATE command [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I accidently executed TRUNCATE command on a wrong table and all my data is gone. We do have a backup but its 2 weeks old and doesn’t have all the latest data.
Any ideas how can we rollback this command and get the data back if possible? Are there any third party tools that can do this?
Simple answer is – you can’t rollback a transaction if it’s already committed but you can do something else to get the data back (or at least some parts of it).
When you execute truncate statement your data is still in the MDF file but it’s not visible because SQL Server is now treating this as free space (truncate is basically telling SQL Server to deallocate data pages).
Only way to get the data back is to somehow read deallocated data pages and convert them into readable data.
Important: you must act fast because free space will be overwritten with new data if not already. If you can stop your SQL Server instance and make a copy of MDF and LDF files that would buy you more time.
Try using ApexSQL Recover. From what I know it’s the only available tool that can do this kind of restore. If you’re really good with SQL you can try modifying and executing very long script like this .
Unless it was Transaction Wrapped, I am afraid you are out of luck.
Here is a similar post, but this also has more explanations.
http://www.sql-server-performance.com/forum/threads/how-to-rollback-truncate-operation.16968/

Memory Limits for SQL Server 2008 R2 Standard and Analysis Services [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
According to MSDN, the memory limit for SQL Server 2008 Standard edition is 64 GB. Does anyone know if this total is for SQL Server only, for each service you run on that instance (SQL, SSAS, SSIS), or a single total that is shared among all services you run within that instance.
For example, if I want to allocate 64 GB of memory to SQL, will there be any memory available under my license for me to run any other services on that instance?
Note: This is not a question about physical memory limitations, as my server has more than enough physical memory to meet my allocation requirements. I am only curious to know if I will be limited by the license itself.
It looks like it's 64GB limit is per instance, not server. Other people were asking the same question in this article... http://www.brentozar.com/archive/2010/06/sql-server-r-standard-supports-less-memory/

What's the disadvantage of using Microsoft SQL Server Jobs for Backup? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I happen to find a lot of Automated SQL Backup Solutions on the net. two in particular are
- SQL Backup and FTP (http://sqlbackupandftp.com/)
- SQL Maintenance Solutions (http://ola.hallengren.com/)
My question, why do people use these solutions when SQL already has SQL Server Jobs Agent which can do this for them?
Another popular one you didn't mention is Red Gate's SQL Backup Pro - Here's their sales pitch, and I'm assuming the products you mention will have similar pitches.
Why SQL Backup Pro?
Save time and space: compress SQL Server backups by up to 95% for
faster, smaller backups
Strengthen SQL Server backup and restore
activities: use network resilience for backups, restores and log
shipping
Protect your data: use up to 256-bit AES encryption to secure
your data against unauthorized access

Resources