Best Tuning steps for SSIS packages with Execute SQL Tasks [closed] - sql-server

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
What necessary tuning I can do in ssis level,if all of the functionality have been
implemented using the Execute SQL task stored procedures.
All most all tables being used are already indexed.Please suggest some useful
ssis tuning tips for such kind of packages.Do I have to implement all these
execute sql tasks to Data flow task!?

To answer your question, no. Data flow tasks, in my opinion, are mostly useful when moving data between two sources or to do complex logic that you would rather use a c# script and not use the .Net CLR in SQL Server to perform that script.
If the source and destination are on the same instance I have never seen an occasion where SSIS data flow tasks can out-perform a properly built stored procedure.
Because you are using execute sql tasks, there is no SSIS performance tuning. All that SSIS is doing is launching something to be done by SQL Server.
I would focus on your stored procedures, look into the execution plans and read up on SQL Server Query Performance Tuning. It could range from a very simple index recommended when you look at the execution plan, moderate effort using Query Analyzer tool or very complex. It depends on your data and queries.

Related

Most straightforward way to consolidate data from multiple different RDBMS systems into a queryable 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 3 years ago.
Improve this question
I have few tables that I have to sync between 3 different RDBMS systems (PostgreSQL databases, a SQL Server and a Firebird Database).
Currently I simply connect to my Firebird database and pull the few relevant tables to my PostgreSQL database, but as databases change, new tables require querying and with the addition of a SQL Server database to the mix I feel this solution is ill fitting.
I've done some research on BI tools , but I still need to query data from this data source and show them inside a Windows Forms application.
PS: it's not a migration and I only need to query the data from these "satellite" databases
Using PostgreSQL as your hub, you can use Foreign Data Wrappers to reach out to the other two databases whenever a query wants their data. Then it will always be up to date, but performance might suffer compared to actually importing the data. For reaching SQL Server, you can use tds_fdw, and for firebird you can use firebird_fdw. I have never used either one of these, so this is just a starting point.
You could probably pick SQL Server as your hub and accomplish the same thing, it calls them "linked servers" rather than Foreign Data Wrappers, see for example.

Migration of SQL Server stored procedures to Oracle? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I have a question: what is the best practice for migrating SQL Server stored procedures to Oracle?
Thanks.
Best is such a fun word.
But.
Oracle SQL Developer has built in translators, including one for SQL Server.
If you capture your data model using the Migration Projects feature, it will take your T-SQL procedures and convert/translate them to their PL/SQL equivalents.
Each translation will need to be verified/approved/tested, of course.
We see somewhere between 60-90% translation success rates, that is, translated procedures being 'good, out-of-the-box.' Results will vary based on the nature of your code.
I talk about migrations, with Sybase ASE as an example, in this whitepaper. The SQL Server scenario would be pretty much the same.
We also have an ad-hoc translator, but it won't take into account your data model.
I can attest from being involved in a large production legacy project, where substantial number of "automated" options had been evaluated - none of them worked, and almost nothing they did could even be used in the 'at least that' manner.
We wasted a lot of time trying to achieve automation, and then ended up converting everything by hand, which took much less when we involved a small team of coders, once they familiarized themselves with both syntax and optimisers.

delphi adoquery filter with listbox items [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
this is final but already not filter
anyone has idea about my filter problem
begin
adoquery1.SQL.CLEAR;
adoquery1.SQL.Add('select * FROM gunsonu ');
adoquery1.SQL.Add('where TARIH like :TRH');
adoquery1.Parameters.ParamByName('TRH').Value:=(PlannerDatePicker1.text);
for i := 0 to form3.ListBox1.Items.Count-1 do
adoquery1.SQL.Add(' and VLIM <> '+QuotedStr(form3.ListBox1.items[i]));
end;
adoquery1.Open;
frxReport1.ShowReport(true);
The best way to set up queries from a Delphi app against an MS Sql Server isn't to keep modifying code in the app that constructs the query until running it returns the results you're hoping for. One of the problems with the Delphi rapid compile/run cycle is that it encourages trial and error, which is
no substitute for getting things working properly.
It's better to separate the SQL-constructing task from the coding one for two reasons:
The Sql Server client-side utilities (e.g. Sql Server Management Studio or the old ISql/W "Query Analyzer") are better tools for the Sql-construction task, they have access to the server's execution plan, profiler, etc. But if you don't have one of those available, over the years, Delphi has included some kind of "Data Explorer" utility to run queries against a variety of servers - in recent XE versions, there's a Firedac one under FireDac | Explorer from the IDE menu.
Using one of those tools, you have the Sql query which is actually sent to the server right on the screen in front of you. A frequent source of error when trying to set the Sql up in Delphi code, especially for a beginner, is that the Sql query sent to the server isn't necessarily what you assume it is. Judging by the examples that appear in qs on SO, they're frequently riddled with syntactic or semantic errors, especially when the Sql is supposed to contain quotation marks (the Delphi IDE's Watch and Evaluate windows don't provide a good form for viewing Sql). Creating the query in a Sql querying tool, you get the chance to see exactly what the query is, and to get feedback from the tool regarding syntax errors, etc.
It's easier using those tools to experiment with the best way to parameterize your query.
What's the point of 3? Well, one thing is that parameterized queries are generally better optimized by the server than an ad hoc one, though admittedly not all queries can be expressed in a parameterized form (e.g. you can't parameterize which column or table you're querying against). The other thing is that it helps minimise your exposure to Sql-Injection (see https://en.wikipedia.org/wiki/SQL_injection).
Once you've got your query working as you're expecting in a client-side Sql tool like those above is the time to write the code to execute it from your Delphi app, not before.

Is SQL written for SQLite interchangeable with SQL for an Access 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 8 years ago.
Improve this question
I have written a project in C# which currently uses a SQLite database with 7 tables. Now I made a little mistake in selecting my database and since the application is going to be accessed by multiple users (~100) on a network the SQLite solution won't work because only one user can write at a time.
Now I want to switch to an Access (2010) database but my question is:
If I create the Access database with the same scheme as my SQLite database, do I have to change any of the SQL statements that I have written in my application? Or does this work interchangeable?
Also some side notes of why I am switching to an Access database instead of something like a SQL Server... Time does not allow this and costs neither.
Does anyone know what the impact will be if I'd simply replace the SQLite database with the Access database. And are there any differences in the SQL for these two for simple queries? I'm using things like 'INNER JOIN, IS NULL, SUM, COUNT'.
Thanks in advance!
are there any differences in the SQL for these two for simple queries?
For the simplest of queries, not really. For example, the specific language features you mentioned (INNER JOIN, IS NULL, SUM, COUNT) will likely work without modification, with the possible exception that Access SQL often requires parentheses when a statement contains multiple JOINs (example here).
Does anyone know what the impact will be if I'd simply replace the SQLite database with the Access database.
That is impossible to predict without a complete code review. You will really just have to try it and see what (if anything) breaks.

Scheduler Get Data From SQL Server to Oracle [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want create a task as scheduler to get Data From SQL Server 2000 to Oracle ?
how i can do it ? thanks
This kind of processes are called ETL automation.
You should first write appropriate code accomplish the data transformation and extraction prior loading to other system. You have several options. One of them is using SQL. You may use either oracle to get data from SQL server or vice versa.
It is better to convert this code to a batch executable to able to run from command line.
Choose a scheduler to execute the job according to your business requirements.
Alternatives are cron for ux platforms, windows task scheduler for ms platforms, open source frameworks to implement your own (like quartz), open source products if you do not have budget or more professional commercial ones like TlosLite.
In Sql server you can create DTS job to transfer the data from SQL server table to Oracle table.Later using SQL server Agent,you can schedule this job.

Resources