-
As we know that, No order guaranteed if order by is notf explcitly specified. Below is one more example of this. Below is the code to pupolate dummy table. If OBJECT_ID('dbo.testTable') is not null drop table dbo.testTable Go Create table dbo.testTable ( c1 int not null, c2 int not null, c3 int...
-
During working with one logic, i got chance to work with PIVOT operation. Sometime we need do require rowdata as column in our custom logic, then we can use some temp table and then populate agreegate data in temp table. But With PIVOT we can do it very easily. Let me prepare small example and explain...
Posted to
sqlideas
by
Paresh Prajapati
on
02-18-2012
Filed under:
Filed under: sql, sql server 2008, sql server 2005, tsql, sql server, ms sql, ms sql server, t-sql, sql server denali, #SQL Server, #sql, sql server 2011, database, sql server general, SQL Scripts, pivot
-
After using some of the ways to delete the files from the particular folder like Delete file using Script Task and File System Task in SSIS. We have seen such methods and used logic to get the files from the loop container and process to delete them and same thing applied for the scripts as well. we...
Posted to
sqlideas
by
Paresh Prajapati
on
02-10-2012
Filed under:
Filed under: sql, sql server, ms sql, ms sql server, #SQL Server, #sql, database, sql server general, SQL Scripts, SSIS, SSDT, retention
-
Earlier we have seen for the Delete file using Script Task and files deletion using File System Task in SSIS. We have directly wrote the logic to get the files and delete from specified folder in the script for the Script Task. For File System Task we have Used Foreach Loop Container and variables to...
Posted to
sqlideas
by
Paresh Prajapati
on
02-04-2012
Filed under:
Filed under: sql, sql server, ms sql, ms sql server, #SQL Server, #sql, database, sql server general, SQL Scripts, SSIS, SSDT, retention
-
Recently when i worked with SQL Server security, i encountered with one error while trying to modify 'SA' account properties. The exception details looks following, Alter failed for Login sa. Cannot set a credential for principal 'sa'. Also you can see the image below for the same. The...
Posted to
sqlideas
by
Paresh Prajapati
on
01-27-2012
Filed under:
Filed under: sql, ms sql, sql server errors, ms sql server, #SQL Server, #sql, database, sql server general, SQL Server Problems, login, Security, Exception, Errors
-
Over the last couple of months I have on several occasions found myself in need of test data for demos, blogposts etc. You all know AdventureWorks, which will work for a lot of demoing stuff. But the amount of data is limited, and if you are demoing stuff about performance, AdventureWorks just isn’t...
-
I have been working with SQL Server for quite a few years now, and it still happens quite often that I discover new cool things to do in t-sql. My latest discovery is not a new feature at all, because it was introduced back in SQL Server 2005 – but for some reason I haven’t come across it before. So...
-
Recently while working with database security, I learned database roles as how the each role used. Apart from the server level roles if we need to require to assign access/rights to particular databases level then we need to go through database level roles. Following are the fixed database level roles...
Posted to
sqlideas
by
Paresh Prajapati
on
01-13-2012
Filed under:
Filed under: sql, sql server, ms sql server, #SQL Server, #sql, database, sql server general, Maintenance, SQL Scripts, login, user, query, Security, Role
-
In this weeks blog post we will have a look at how easy it is to combine FileTables and FullText Search. Last week we had a look at some of the basics of the new FileTable feature – if you missed out on last week blog post, you can read it here – FileTable Part 1 . To get the full effect of this powerful...
-
I experienced into one issues for database backups were failed. And this was due to space issues on disk drive. This disk drive is spacific to allocated for the database backups only. The space was eaten by this database backups and this drive contains so many old backups. I have manually deleted all...
Posted to
sqlideas
by
Paresh Prajapati
on
01-07-2012
Filed under:
Filed under: sql, tsql, sql server, ms sql, ms sql server, t-sql, #SQL Server, #sql, database, sql server general, Maintenance, SQL Scripts, backup, query
-
Earlier we have seen for the files deletion using File System Task in SSIS. We have used it with Foreach Loop Container. Used a variable to hold file names which are passed from earlier stage one by one and then finally used with File System Task to delete it. Now i am going to use Script Task to delete...
Posted to
sqlideas
by
Paresh Prajapati
on
12-30-2011
Filed under:
Filed under: sql, sql server, ms sql, ms sql server, #SQL Server, #sql, database, sql server general, SQL Scripts, SSIS, SSDT
-
We know all the various methods to delete the particular or all files from the specified folder using some of the methods like xp_delete_file , Ole Automation Procedures and with xp_cmdshell command line utility which we used for the old files archive or cleanup purpose. Here i am going to share some...
Posted to
sqlideas
by
Paresh Prajapati
on
12-23-2011
Filed under:
Filed under: sql, tsql, sql server, ms sql, ms sql server, t-sql, #SQL Server, #sql, database, sql server general, SQL Scripts, SSIS
-
Every DBA has a daily activity review or monitor database backups as these database backups used for the restoration at other place and using for the database restore which used for reporting purpose or used in log shipping purpose. Because database backups are most important factor and first option...
Posted to
sqlideas
by
Paresh Prajapati
on
12-16-2011
Filed under:
Filed under: sql, sql server 2008, sql server 2005, tsql, ms sql, ms sql server, t-sql, #SQL Server, #sql, sql server 2011, database, sql server general, SQL Scripts, backup, statistics
-
When we created a new database it will be created with default isolation level and that is "READ COMMITTED". If some update transactions are running in with table rows under READ COMMITTED isolation level, How can we get data from table in another session while running update transaction? How...
Posted to
sqlideas
by
Paresh Prajapati
on
12-14-2011
Filed under:
Filed under: sql, sql server 2008, sql server 2005, tsql, ms sql, ms sql server, t-sql, sql server denali, #SQL Server, #sql, sql server 2011, database, SQL Scripts, SQL Server Code Named Denali, lock, hint
-
Hi friends, As I am getting more time today I want to utilized same for blogging only !! Today only I have completed 2 post which is in series of All Transformation in Data Flow task So here is complete sequence form my last continuing post MSBI # 36 – SSIS # 15 – Control Flow Tasks # 8 – Data Flow Task...