SQL server two instances in same machine - sql-server

Is it possible to use a licensed version of SQL Server along with the free version(Express Edition) of SQL?
How to install SQL server with two instances one of them licensed and the other free on the same machine? is it possible?

Of course you can have up to 50 different SQL Server instances on the same machine. One only will be the default one and its name will be the machine name. All other needs to have a specific name added to the machine name. You do not have to set a default instance (on my PC I have almost 8 different instance with SQL engine from 2008 to 2022).
Having multiple instances on the same machine is not recommended for production purpose but can be suitable for dev, test...
The minimal parameter to configure to avoid trouble, is to share the machine memory (physical RAM available) between all the instance, with the "max server memory (MB)" spreaded over the total RAM minus 2 to 4 Gb.

Related

Poor SQL Server performance on virtual machine after system upgrade

I'm managing middle sized company database. Recently we have massive system upgrade and switched to virtual machine environment. After deployment, we are having performance issues, Apparently SQL Server on the upgraded system works slower than the old configuration.
Here are the configurations:
Old Server: SQL Server 2008, 10gb Ram, Intel Xeon E5420 x2 (Physical Machine) runs on Windows Server 2008
New Server: SQL Server 2014, 64gb Ram, Intel E5 2660 x4 (virtual machine) runs on Windows Server 2012
Very basic IO performance comparison follows as:
new server:
old server:
Even with the most basic operation:
select * from table
from most used tables runs more amount of time to retrieve result. Also stored procedures run slower.
Example:
new server: 01:39 minute, 3285365 rows
old server: 01:00 minute, 3339738 rows
I have no idea what could cause this problem. Any help will be appreciated.
Edit:
Both servers has same sql configuration
tempdb and datadb is seperated
This probably isn't what you want to hear, but VMs are always slower than physical servers, because of the overhead of implementing the VM. Also the 2660 has MUCH less L2 cache than the old processor.
I'm not sure what to tell you except to make sure that the VM for the SQL Server, has as much RAM and cores allocated to it as you can spare, and that SQL Server is configured to actually use them.
Also, disk I/O is a big deal. Are the drives and controllers for both systems similar?
VMWare has a whitepaper on the subject, so at least you're not alone. 8-)
http://www.vmware.com/files/pdf/solutions/SQL_Server_on_VMware-Best_Practices_Guide.pdf

Large script failing on SQL Server 2008 R2 Express

I need to run a "large" script on SQL Server 2008 R2 Express and it is failing with
There is insufficient system memory in resource pool 'internal' to run this query.
The script is around 10MB saved to disk, contains about 54000 top-level statements (insert/delete/update) and declares about 5000 variables (of type BIGINT).
I am running SQL Server 2008 R2 Express 64bit 10.5.1746. There is 3GB allocated to the VM, 1GB allocated to SQL Server, 512kb minimum memory per query. The results of DBCC MEMORYSTATUS can be found on this link.
The script is merely a restoration of a (lightweight) production database which was exported as SQL statements (data only, no schema).
If it's not possible to do this, I am shocked that SQL Server cannot handle such a basic scenario. I've tested this equivalent scenario on Firebird and Sqlite and it's worked just fine! (and they are open-source products).
NOTE: it is not possible to break the script up as variables declared in the beginning are referenced in the end of the script.
NOTE: Before rushing to flag this as a "duplicate" please note the other similar threads do not address the specific issue "How to run very large script in sql server 2008" .
SQL Server Express is limited in the amount of memory it can use. Of that memory only a portion can be used for executing queries. You can try setting forced parameterization on the database as it may reduce the memory required for the plan which would leave more for query execution (depends on your specific queries).
The best option is to use an edition of SQL Server that supports more memory. Developer edition is affordable but can't be used for production use. Standard edition would be your next best bet.
The only thing that's worked thus far is upgrading to SQL Server 2012 Express. Query took several minutes to execute, but did so completely and without error.

SQL 2008 CALs - how are they enforced?

I am running a server that needs a very limited number of user connections (max of 5 at a time). So the 5-CAL edition of SQL 2008 Workgroup seems perfect for me. Now, what I need to know is the following: do I actually need to physically install a CAL on each machine/user that will be using the server (by using I mean reading and writing) or does the 5-CAL licence simply mean that only 5 machines/users will be able to log at any one time?
I.e. can 6 or 7 different people use this as long as only 5 of them are connecting simultaneously?
Thanks
Karl
It's all here: SQL Server 2008 Licensing Frequently Asked Questions
However, it is not the easiest to follow.
Basically, a CAL is per user or device. The difference is under "What is the difference between device client access licenses (CALs) and user CALs?" is the link above".
Whatever CAL type you use, it does not matter if only 5 can connect at once. Or one client has 200 connections open.
It is per user or per PC (User CAL or Device CAL), not per connection. In the olden days (SQL 7?) you did have per connection but it has been some time since I looked at this.
Edit, to actually answer: they are not strictly enforced in that the SQL Server instance counts things, but you'll be using the software illegally.
It depends on what licensing model you go for:
Per CPU licensing - no CALs required, but you pay up front for unlimited user and device access. You are limited to the number of physical CPUs (not cores) you can have in the SQL Server box.
Per device CAL - you can assign a CAL to a physical device, and anyone accessing the SQL Server from that device is licensed. So 10 people accessing the SQL Server from 1 shared computer requires you to have 1 device CAL.
Per user CAL - you can assign a CAL to a person, and anyone accessing the SQL Server is required to have a license. So 10 people accessing the SQL Server from 1 shared computer requires you to have 10 user CALs, but 1 person accessing the SQL Server from 10 computers only requires you to have 1 CAL.
CALs are handled logically - there is no hard limit, just don't exceed the number of licenses you have.
http://www.microsoft.com/Sqlserver/2005/en/us/pricing-licensing-faq.aspx
http://www.microsoft.com/sqlserver/2008/en/us/licensing-faq.aspx

Limited memory usage of sql server 2008 express?

I want to install sql server 2008 express on my laptop that has 1 GB memory, but my database contains lots of binary data that I don't want spending all my RAM. I would much rather sacrifice sql performance (make it page) in favor of other applications.
Is it possible to limit the memory footprint of sql server?
look here and here
essentially sp_configure 'max server memory' I think
I've only got SQL Server 2005 Express, not 2008, but from SQL Server Management Studio Express, if I right-click on the root node in the tree (the server node) and select Properties, there's a "Memory" page with both minimum and maximum amounts of memory available to be set.
From the docs for these options:
Minimum server memory (in MB)
Specifies that SQL Server should start
with at least the minimum amount of
allocated memory and not release
memory below this value. Set this
value based on the size and activity
of your instance of SQL Server. Always
set the option to a reasonable value
to ensure that the operating system
does not request too much memory from
SQL Server and inhibit Windows
performance.
Maximum server memory (in MB)
Specifies the maximum amount of memory
SQL Server can allocate when it starts
and while it runs. This configuration
option can be set to a specific value
if you know there are multiple
applications running at the same time
as SQL Server and you want to
guarantee that these applications have
sufficient memory to run. If these
other applications, such as Web or
e-mail servers, request memory only as
needed, then do not set the option,
because SQL Server will release memory
to them as needed. However,
applications often use whatever memory
is available when they start and do
not request more if needed. If an
application that behaves in this
manner runs on the same computer at
the same time as SQL Server, set the
option to a value that guarantees that
the memory required by the application
is not allocated by SQL Server.
I'd be surprised if these options weren't in 2008, but you could always just install it and try.
You can do it w/ osql:
http://kb.hs-lab.com/content/7/113/en/how-to-limit-ram-usage-for-sql-2005-express-database.html
osql -E -S YOURSERVERNAME\PRINTLOGGER
sp_configure 'show advanced options',1
RECONFIGURE WITH OVERRIDE
GO
then
sp_configure 'max server memory',70?
RECONFIGURE WITH OVERRIDE
GO
You might also try giving cpu priority to your favored applications and letting SQL manage memory dynamically. It will release memory as needed by other apps, regardless of priority.
Hopefully you're not trying to run visual studio on that machine. It won't be much fun.

Using Windows XP as a SQL Server

I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we wanted to see if we can suggest Windows XP as a low cost alternative to Windows Server. The only potential problem that I could see if there were limits on the number of concurrent connections to either the files or the database. We are only thinking of recommending this for smaller sized companies who would have 10-15 users.
There is a limit of 10 inbound connections on XP professional, and 5 on XP Home. So it would only be practicable for a very small company.
From this MS KB Article:
Note For Windows XP Professional, the
maximum number of other computers that
are permitted to simultaneously
connect over the network is ten. This
limit includes all transports and
resource sharing protocols combined.
For Windows XP Home Edition, the
maximum number of other computers that
are permitted to simultaneously
connect over the network is five. This
limit is the number of simultaneous
sessions from other computers the
system is permitted to host. This
limit does not apply to the use of
administrative tools that attach from
a remote computer.
Per development: The connection limit
refers to the number of
redirector-based connections and is
enforced for any file, print, named
pipe, or mail slot session. The TCP
connection limit is not enforced, but
it may be bound by legal agreement to
not permit more than 10 clients.
I suggest reading the kb article for more information.
Actually, you can run SQL Server Standard or Workgroup Edition on Windows XP Pro. It is not limited to the express version ...
One cost effective alternative is Windows Small Business Server.
SBS 2003 R2: Features at a Glance
This will break the EULA.
Here is the relevant knowledge base article. Note that while TCP connection limits are not enforced for XP, legally they are limited to 10 connections.
Small business server seems like a better fit, and is cost effective if you shop around.
The problem with Small Business Server is all the frill it comes with that is unnecessary for a simple file and sql server; like exchange server, sharepoint, etc. I've used Windows XP as a small business SQL/File server, but as others have pointed out, you are limited to 10 connections legally speaking.
Another issue with Small Business Server is it can't be installed on an existing domain. Your best bet would be to package the SQL Server portion around a normal Windows server installation. If you're looking at 10-15 users, there's no guarantee that they have a domain. But if they don't, likely they are already dealing with the file server problem using accounts with same usernames/passwords on the file server(s) as on their individual workstations.
The number of connections is not related to SQL Server edition, but to the operating system. For example, Windows XP allows only 10 concurrent connections, Windows 7 20. For Windows Server OS [no need to purchase any new server machine ], the number of connections is unlimited (but you can limit is using Terminal Services).
The error message shown in case of connection limit reached is something like "the security limit reached...the number of concurrent connect attempts"
Presumably you are meaning SQL Express, as you can't run SQL Server on XP, it's a server product.
If the customer can afford your product, they can afford a copy of Server 2003, or whatever, the file sharing's built-in. Admittedly SQL Server's fairly expensive, but if your product needs it, that's the way it goes. If cost were an issue, you shouldn't be using SQL Server as the database platform. There's no point in trying to force a server-based solution into a client OS. You'll end up with all sorts of problems before long.
Doesn't the client have a domain-based infrastructure already?
The upshot being being if the client has 5-10 users of the software, they should be on SBS anyway for a variety of other reasons. You don't get SQL Server with it though.
(Samba would be an option for file-sharing, but doubtless more expensive than simply buying Server 2003 in this instance).

Resources