il_masacratore's blog

How to use Openquery to make a join between a SSAS cube and a table from any other database

 

Connetion to SSAS instanceImagine you need a report with data from an OLAP sales cube, and have to include data from a table of the relational data source, or from an external database.

With a linked server you can construct a MDX query in the SQLServer instance where you have the cube, joining with an external database to complete the data with information from tables of the relational database..

How to access from SQL Server to MySQL databases

 

Connect SQL Server to MySQL with linked serverWe could need to access to MySQL from SQL Server.

An easy way to do it is creating a linked server that uses an ODBC connection..

 

SQL08: Create a conditioned table using the data dictionary of SQL Server

 

Sometimes we need to check the existence of a table in a script or scheduled task to record error logs, first executions etc ... 

Let us take an example, a package of integration services that normally distribute or run there where we go and that leaves traces in a custom table that is not the default for loading logs. We could always include a performance task or sql script, run right or wrong, as the first to run on the package and then continue. Being purists this just is not quite careful

Four questions to identify a developer with no knowledge of database

 

I leave here this link to a page where a small test posed to do in job interviews for database developers. Here this kind of test I do not think the style is much in a job interview, but more than one entry into the development department should evaluate its knowledge with a similar test. More than anything to avoid cracks, maximum connections, table layouts if primary keys, etc...

 

SSIS: Workaround to two errors for no apparent reason when we insert data in MySql

 

SSIS: Workaround to two errors for no apparent reason when we insert data in MySqlFor whatever reason we may have to develop a Microsoft Integration Services package we move data from any source to a table that is in a MySQL database.

The first aim will do so through an ADO.NET Destination and MySQL provider for the connection. If we do well to insert the data directly, to create the target, select the connection and then select the table appears an error like the following check everything with the preview or try and do the assignments...

 

 

 

MySql: Slow queries, queries to optimize control

 

In MySQL there is a parameter that enables logging of queries that take more than x seconds to execute calls Slow Queries. Basically what it does is put them in a log file and then check with mysqldumpslow. This mechanism may be useful to improve the overall performance of the database if we reduce the value of a progressive manner to the execution times of "leave" before declaring a query such as "slow" or slow query...

 

Mysql: Daily Checklist

 

Th

en leave a small post on how to mount an automatic notification via mail that tells us what is the status of our database. For example we can manage it a bit before starting our work day and before we leave or while on vacation (jaja. ..). This example is about a MySQL 5.x running on Debian. Steps as follows...

 

 

 

Remote access with Oracle dblink global_names or without

 

"Without knowing how easy the item may seem difficult"

Creating a database link to point to an oracle database to another in principle is easier, if you read the post dataprix Remote access through Oracle dblink . The pity is that in this post do not say anything about the global_names of each database and rename the dblink as if global_names are active.

Example.

  1. We created the dblink to a dummy database hr (after having configured tnsnames ...):
    create database link connect to rrhh dblinkrrhh recursoshumanos IDENTIFIED BY USING 'HR';
  2. Consult your name and surprise is not called if DBLINKRRHH.REGRESS.RDBMS.DEV.US.ORACLE.COM dblinkrrhh. We can see with the following query:
    select * from dba_db_links;

    Now what?

How to disable autocommit option in SQL Server Management Studio

 

Have you ever wondered how to disable the autocommit option in Sql Server Management Studio?

The answer is quick. Simply uncheck the option SET IMPLICIT_TRASLATIONS. To do it follow next path from the menu:

Tools> Options> Execution of the query> SQL Server> ANSI, then Uncheck Option SET IMPLICIT_TRANSACTIONS.

 

 

It seems rather simple but is a common doubt when you start using SQL Server Management Studio. By sharing this tip I hope to save time to someone that wants to disable the autocommit option in SQL Management Studio.

SQL08: affinity_mask, IO_affinity_mask and like riding two on a single server environments without being "walked"

 

We put ourselves in position
In our environment we may need to have two replicas of a / s data base distinct environments (the classic example would be production and test). In deciding as we do the most common questions we must ask ourselves are:

- Is this new environment will be temporary? Does large data bases in terms of volume and / or load to be borne is high (even test)?
- Is there version SqlServer2008 development? That alone is at hand if you have an MSDN subscription ...
- Is there an extra server?

Based on these questions and all that it can happen one can opt for different solutions:
"The easiest and if the database to bear the burden are small we can use the same server for all databases (created on the same server with different names (_test) and Holy Easter ...). In order not to disturb each other we can use Resource Governor.
"The most" aseptic "if resources permit and where it would be worthwhile to mount on different servers (if we have the development version)
"Another option is a mixture of the above. Fit the two environments on the same server but different instances.
-Etc ...

1 server cpu n (n> 1) + 2 = 2 instances environments

Syndicate content