|
Accessing OLEDB Connection Managers in a SSIS Script Component
|
Total Hit (14223) |
Sometimes you may need to access OLEDB Connection Manager to execute Queries in Script. Here is the easy way to do that.
Credit : http://blogs.msdn.com/mattm/archive/2008/08/22/accessing-oledb-connection-managers-in-a-script.aspx
«code LangId=2»
Imports System
Imports System.Data
Imports
....Read More |
Rating
|
|
|
|
How to reset Identity of Autonumber column?
|
Total Hit (4872) |
There are two ways to reset identity field
1) Use TRUNCATE TABLE <mytable> rather than DELETE. This is a non-logged operation, however, and may not be what you need.
2) Use the DBCC CHECKIDENT command to reseed your identity value:
DBCC CHECKIDENT('mytable', RESEED, 0) -- next row inserted
....Read More |
Rating
|
|
|
|
Using FTP in Transact-SQL
|
Total Hit (4004) |
«B»Introduction«/B»
I’ve seen a few posts asking “How do I ftp a file into SQL” Well, if you have 6.5 or 7.0 this article should be helpful. Unfortunately it’s not an easy answer, but it’ll work great once you’ve set it up. The answer is that there isn’t a function in SQL to let you do this, you
....Read More |
Rating
|
|
|
|
Avoid error 1540 in Join queries
|
Total Hit (2778) |
When you plan your queries, you should avoid the use of wildcard keyword * - which means "retrieve any field" - mainly because it may decrease performances, since the engine allocates space for the entire row; use explicit field declaration instead, such as:
SELECT field1, field2 FROM table1
....Read More |
Rating
|
|
|
|
|
|
How to implement simple transaction in SQL Server
|
Total Hit (2158) |
Transactions group a set of tasks into a single execution unit. Each transaction begins with a specific task and ends when all the tasks in the group successfully complete. If any of the tasks fails, the transaction fails. Therefore, a transaction has only two results: success or failure. Incomplete
....Read More |
Rating
|
|
|
|
How to create audit triggers?
|
Total Hit (2305) |
This article will show you the most easiest way to audit your data changes for a specific table in sql server.
I will show you, how to use <Code>DBCC INPUTBUFFER</Code> command to capture some valuable audit information when update/insert/delete occurs.
Step-By-Step Example
- Run the follow
....Read More |
Rating
|
|
|
|
|
|
|
Skip the execution of an individual Task
|
Total Hit (672) |
It is easy to build a nice linear workflow path using the DTS designer, but unfortunately our processes are not always that simple. In certain circumstances you may wish to skip a task. This is where the power of workflow can be used, but unfortunately it is not available graphically through the des
....Read More |
Rating
|
|
|
SQL Server 2000 DTS Part 3 - DTS Designer Connections
|
Total Hit (1960) |
In our previous article of this series, we presented a way of creating DTS packages with wizards. Despite its simplicity, this approach has some limitations, which you can overcome in two ways - by using DTS Designer or by manipulating DTS object model with programming languages, such as Visual Basi
....Read More |
Rating
|
|
|
|
|
Reducing SQL Server Index Fragmentation
|
Total Hit (2678) |
When you perform any data modification operations (INSERT, UPDATE, or DELETE statements) table fragmentation can occur. When changes are made to the data that affect the index, index fragmentation can occur and the information in the index can get scattered in the database. Fragmented data can cause
....Read More |
Rating
|
|
|
|
Managed UDTs Let You Extend the SQL Server Type System
|
Total Hit (1007) |
The next version of SQL Server, code-named "Yukon," will offer enhanced support for user-defined types (UDTs). Because UDTs can be managed by the CLR, you can represent a wide variety of data structures to create types not possible with previous versions of SQL Server. With UDTs you can more precise
....Read More |
Rating
|
|
|
T-SQL Programming Part 5 - Using the CASE Function
|
Total Hit (559) |
The CASE function is a very useful T-SQL function. With this function you can replace a column value with a different value based on the original column value. An example of where this function might come in handy is where you have a table that contains a column named SexCode, where 0 stands for fem
....Read More |
Rating
|
|
|
Writing Secure Transact-SQL
|
Total Hit (702) |
There are plenty of good sources of information about how to deploy SQL Server in a secure fashion. However, these resources are often targeted at database administrators tasked with securing already developed applications. In addition, there is a rich body of information that discusses writing secu
....Read More |
Rating
|
|
|
Using SQL Server's CHARINDEX and PATINDEX
|
Total Hit (1186) |
If you have written many applications then you probably have run across situations where you need to identify if a specific character or set of characters appears in a string. In this article I will discuss using the CHARINDEX and PATINDEX functions to search text columns and character strings. I wi
....Read More |
Rating
|
|
|
Find Out What They're Doing with fn_get_sql
|
Total Hit (1112) |
Not only did SQL Server 2000 introduce the concept of user-defined functions (UDF) but also Microsoft's development team created several such functions as part of the database product. In addition to many undocumented system UDFs, used internally by SQL Server, the product release has nine documente
....Read More |
Rating
|
|
|
SQL Reporting Services with Dynamic Column Reports
|
Total Hit (1278) |
Hi all, this is the second time I am getting a task for dynamically creating reporting columns. In the first instance, I had done it by first binding the data to a DataGrid (by setting the auto-generated columns feature to true and then exporting to Excel). In the second case, the task was to genera
....Read More |
Rating
|
|
|