We have an SQL Server 2008 R1 Environment.
We have poorly performing queries across linked servers which are quite complex.
First question:
Are there any differences between (particularly performance) of SQL native client 10.0 and the listing for oledb within linked servers? My understanding of this was that Native client just packages up oledb with some other items. But I would appreciate some guidance.
Additionally does anyone know where to find some good white papers on optimising Linked server queries?
many thanks
D
If you have poorly performing queries across linked servers, you might want to consider using openquery or some other variations. Or possibly putting the logic in a stored procedure on the remote server. This would be much easier if the data do not have to co-mingle with local data. Sometimes it's faster to send to the remote server a small dataset to "work with" or filter on.
ie. in the past, i've called a sp on the remote server with a list of accountids. this is much easier now with xml datatypes.
This difference is explained here... SQL Server linked server performance
Related
I've done some digging and don't have a clear-cut answer.
We have a server that handles roughly 90% of all requests and another 20 servers (or so) that handle the final 10%. Most of our SSRS requests ping this server.
We're constantly pinging an Oracle server using OPENQUERY as well, so I'm wondering: aside from spinning off another server, would we benefit from using OPENQUERY more often than LINKEDSERVER where possible? I realize that referencing temp tables in the query wouldn't work, but if it's a straight pull, no WHERE clause, would the main server see a performance boost? TIA
We have a 3gb file of data from our propriartary CRM system which is using SQL as a database.
The CRM is not meeting our needs and we are thinking about moving to Microsoft access and building our own system from the start.
We were wondering if it is possible to easily migrate the SQL database into access?
Thanks for your time.
First of all, it has been a long time since I've had to use MS-Access (thankfully) but I'm not sure Access is suitable for databases of that size. In my opinion, it's best suited to small, desktop-type applications with few concurrent users.
To answer your question, I believe Access offers a data import feature(see under the External Data ribbon in 2013) - though I'd suspect it might balk at the idea of 3GB of data. Edit: Actually this link suggests the max databsae size is 2GB
What might be more useful however, is its Linked Table feature. If I remember correctly this allows you to access data stored in SQL Server (or a similar RDBMS) which is more suited to large volumes of data through an Access front end - complete with pre-canned forms, queries, reports etc..
It is possible and fairly straight forward to move all of your data tables from SQL Server to Access; however, SQL Server is a much more robust database engine than Access. I would highly recommend against that. I have however had very good success using Access (ADP project files) as a front for the interface and using SQL Server as the database back-end for simple to moderate complexity interfaces. If you are not getting the performance you desire from your SQL Server, you might want to consider query performance tuning and looking into memory and hardware upgrades first. I think you will get better and faster results from doing that.
The simple solution would be to “link” Access to SQL server. That way you continue to use a robust data engine, but are free to use all the reporting and coding features of Access.
In this setup then Access simply becomes a “front end” to the existing SQL database.
And you do NOT want to use an ADP project in Access since they are depreciated.
The process is thus to create a blank standard database, and then use linked tables to SQL server. This will not only eliminate the need to import data (which is likely changing all the time).
First, I apologize if this has been asked or is a trivial question.
But, is it possible to connect to two external SQL databases through Microsoft Access?
By way of background one is our CRM and one is our email management system. The two are completely distinct databases. And, reside in different physical and virtual servers.
Our objective is to be able to gain insight into our email marketing efforts as it relates to client activities captured in our CRM.
We currently use an ODBC connection to read data from our CRM database.
Really, we need more information, but basically yes it is possible. All you need to do is link to the tables in the SQL databases, then run the query on the linked tables with a JOIN.
This page will tell you how to link to an SQL table: http://office.microsoft.com/en-au/access-help/import-or-link-to-sql-server-data-HA010200494.aspx
It is possible to do this in MS Access (as already said in Makita's answer).
But you won't get the maximum performance this way, because there's a certain overhead caused by MS Access on your machine (which is relatively slow compared to the DB servers and probably has a slower network connection than the DB servers), pulling data from two different DB servers over the network.
Since you tagged your question with sql-server, there's another possible solution using a feature of SQL Server: linked servers.
You can create a linked server in SQL Server A, that links to SQL Server B.
(see the above link for more information about how to do this)
Then, you can query tables on SQL Server B from SQL Server A (and even join tables from both servers) with the following syntax:
-- execute this on Server A
use DatabaseA
select *
from TableA a
inner join ServerB.DatabaseB.dbo.TableB b on a.ID = b.ID
(this code assumes that TableA is a table in DatabaseA, which is on ServerA, and so on)
This will be way faster than linking the tables in MS Access (the more data you need to pull, the faster it will be) because you're using the superior CPU power and network connection of the database servers.
I want to setup replication between SQL Server and MySQL, in which SQL Server is the primary database server and MySQL is the slave server (on linux).
Is there a way to setup such scenario? Help me .
My answer might be coming too late, but still for future reference ...
You can use one of the heterogeneous replication solutions like SymmetricDS: http://www.symmetricds.org/. It can replicate data between any SQL database to any SQL database, altough the overhead is higher than using a native replication solution.
of course you can replicate MSSQL database to MYSQL
By using Linked Server in MSSQL.
for that you need to download ODBC drivers. and you can further search regarding how to create Linked server on SQL SERVER.
This option is very easy and Totally free. You can use OPEN QUERY FOR THIS.
By using SSIS Packages.
for that you need the Business Intelligence service of SQL SERVER. you can create SSIS Packages on Visual Studio and run them for replication.
No. At least not without doing a lot of dirty, bad things. MSSQL and MySQL speak different replication protocols, so you won't be able to set it up natively (which is the way you'd want to handle it). At best, you could hack together some sort of proxy that forwards insert/update/delete/create/alter, etc. queries from one to the other. This is a terrible idea as they don't speak the same SQL except in the most common case. Even database dumps which wouldn't really be replication are generally incompatible between vendors.
Don't do it. If you must use different OSes on your servers, standardize the database to something that runs on both.
These two databases are from two different vendors. While I cannot say for sure, it is unlikely Microsoft has any interest in allowing replication to a different vendor's database server.
I work with Informix and MySQL. Both those databases have commands that dump the entire database to an ascii file format. You would need to see how that is done on MS SQL Server; ftp the dump to the server hosting the MySQL server; and then convert the dump into something MySQL can import.
I have a database server that currently has two databases, call them [A] and [B].
[A] is the standard database used for my application
[B] is used by another application (that puts considerable load on the server), however, we use a few tables sparingly (that are shared between my application and the primary application that utilizes [B]). Recently the use of [B] has been increasing and it's causing long wait periods and timeouts in my application.
I'm open to alternative ideas, but at the moment the quickest potential solution I've come up with is to get a second database server and move [A] to that. However, I do need access to some of the tables in [B] - ideally with as little code changes as possible.
We were thinking a setup something like:
Current:
DB Server 1 {[A],[B]} (SQL Server 2005)
New Setup
DB Server 1 {[B]} (SQL Server 2005)
DB Server 2 {[A], [B]} (SQL Server 2008)
Where in the new setup, DBServer2.[B] is a linked table (kind of) to DBServer1.[B]
I looked into linked databases, from my understanding (limited) those work as an alias to a database on another server, which is almost what we want, except it adds the extra server qualifier, and it works on the db level. I'd like to do something like this, but ideally without the server qualifier and on a table level.
So for example, [B] has tables Users and Events. The Users table is updated weekly by batch, and we use it often, so we'd like to have a local copy on the new DBServer2. However, Events we use far less often and needs to be real-time between the two servers. In this case, it would be great to have Events as a linked table.
Further, it would be fantastic if we could use the same markup for queries. Today to query one db from the other we'd do something like
select * from b.events join a.dates
We'd like to continue that, except have the database server know that when we touch events it's really located at dbserver1.b.events.
Does that make sense? I confuse myself sometimes.
Thanks for any help
~P
You can use synonyms for linked objects - http://msdn.microsoft.com/en-us/library/ms177544%28SQL.90%29.aspx
This unfortunately only works for single objects, you CANNOT make a synonym for linkedserver.databasename and then reference synDBName.table.
"Alternative Idea" from me since you said you are open...
How about looking into the cause of the slowness? What is the "Load" you are measuring?
How are your disks laid out on the server?
Maybe you could use more memory, another CPU or Some SQL tuning?
Fixing your issues with a software or hardware fix MAY be faster than getting a server and doing all the installs and then working through the integration problems you may run into.