Monthly Archives: November 2010
>Sql Server 2008 : Generate Data Script
>
(NOTE: There is no such facility in Sql Server 2005. But still you can create table data script http://connectsql.blogspot.com/2009/09/generate-tables-data-script.html)
Sql Server Management Studio 2008 provides easy approach to generate your data script. The resultant script will be in INSERT INTO statements format.
>Sql Server Management Studio: Select /Edit Top N Rows
>
Keep in mind that setting value 0 (ZERO) for both options mean ALL TABLE ROWS.
>Invalid use of a side-effecting operator ‘OPEN MASTER KEY’ within a function
>Recently i have tried to create a simple function which should take a single nvarchar parameter as input and should return me its varbinary version, after encryption.When i executed my script, it failed with an error:
Problem occurs when you use OPEN MASTER KEY or OPEN SYMMETRIC KEY inside your function.
Solution is very simple.Remove these problematic lines from your function and write before using this function.
New script for this function would be like this
And now when i like to use this function, i will mention OPEN MASTER KEY and OPEN SYMMETRIC KEY statements, first.
>Get Tables List With Dependent Tables Name
>Following script help you create all of your database tables list along with their dependent tables name in comma separated format.
>Database Backups History
>