Friday, March 17, 2017

How to Disable Protected View in Microsoft Excel

You may experience this Alert message, when you work with excel files which are downloaded from internet or other sources

There are different ways to work  around this issue:

Solution #1 ( Preferred )
The simplest and most secure method to get around this issue is to simply click the Enable Editing button, on a per-document basis, when you open an Excel (or other Microsoft office) file that has been downloaded.

Solution #2 ( Not Preferred )

Alternatively, you can choose to disable the Protected View feature within Excel so that you no longer recieve the warning upon opening any Excel file that has been downloaded.

In Excel
-> go to File
-> Options
-> Trust Center
-> Trust Center Settings
- > Protected View, and then
->uncheck Enabled Protected View for files originating from the Internet.

There is also, in Trust Center Settings, a Macro Setting that you can use to Enable All Macros by default

Note:Be aware that enabling this feature allows potentially dangerous code to run.If either of these Trust Center settings are changed, you need to be very careful about the Excel files which are opened

Friday, February 17, 2017

Cannot execute script: Insufficient memory to continue the execution of the program

                             Recently i have faced this error when i am trying to execute large insert script file with SQL Management Studio. Sometimes, due to the heavy size of the script and data, we encounter this type of error. Server needs sufficient memory to execute and give the result.There are two possible options you can try to resolve

Option #1:

  •  Open cmd.exe as Administrator.
  •  Create Documents directory.
  •  Put your SQL Script file(script.sql) in the documents folder.
  • Type query with sqlcmd, server-name, database-name and script-file-name as like above highlighted query or below command line screen.

sqlcmd -S server-name -d database-name -i script.sql

You can also simply increase the Maximum Server Memory value in server properties. To edit this setting, right click on server name and select Properties > Memory tab.