Home » Posts tagged 'windows'

Tag Archives: windows

Write-Host || Cannot invoke this function because the current host does not implement it

Issue: While running powershell in SQL job step, I am getting below error: –

A job step received an error at line 13 in a PowerShell script. The corresponding line is ‘Write-Host “ServerName: ” $comp’. Correct the script and reschedule the job. The error information returned by PowerShell is: ‘Cannot invoke this function because the current host does not implement it.  ‘.  Process Exit Code -1.  The step failed.

 

Solution: SQL Server Agent allows users to directly run PowerShell scripts in SQL Server Agent. Internally this is implemented by reusing the SQLPS.EXE shell. When SQL Server Agent starts SQLPS.EXE, it does not do this through the console (there is no console attached).

 

When you run Write-Host, PowerShell asked to write on host console but due to no availability of HOST console, we got error.

I removed Write-Host to resolve issue.

 

Reference: Rohit Garg (http://mssqlfun.com/)

You can find and follow MSSQLFUN:-

http://www.facebook.com/mssqlfun

http://mssqlfun.com/feed

https://twitter.com/Rgarg86

Other Linked Profiles :-

http://www.sqlservercentral.com/blogs/mssqlfun/

http://social.msdn.microsoft.com/Profile/rohitgarg

http://www.toadworld.com/members/rohit-garg/blogs/default.aspx

http://beyondrelational.com/members/RohitGarg/default.aspx

What’s new in SQL Server 2016 installation?

1) As MS is kept increasing number of option while installation. To reduce no. of click, if setup pass Rules it will automatically moves to Next window.

2) On Server Configuration page, MS specifically ask to GRANT PERFORM VOLUME MAINTENANCE TASK permission to service account. SQL Services needs this access to perform instant file initialization for data files instead of zero file initialization.  (For information read – https://msdn.microsoft.com/library/ms175935)

3) 2 New Tabs in Database Engine Configuration page. One is TempDB configuration & other is User Instance feature.

4) Separate Acceptance page for Microsoft R.

Step  by Step Installation :-

1. Setup Page, Choose First option

2. Setup checks for Global Rules and moves to next page, if all rules passed

3. Option to choose, if you want setup to download latest update and install

4. Initial Setup files installed

5. Check for installation rules and moves to next page, if all rules passed

6. Accept terms and condition, Click to Next

7. Select features you want to install

8. Check feature rule and moves to next page, if all rules passed

9. Select Instance name

10. Specify service accounts, you can also select collation from collation tab.

Here, MS specifically ask to GRANT PERFORM VOLUME MAINTENANCE TASK permission to service account. (For information read – https://msdn.microsoft.com/library/ms175935)

https://msdn.microsoft.com/library/ms175935

11. Select Authentication type

12. Select Data Directories

13. New Tab introduced to provide TempDB configuration at time of installation only

14. New Tab introduced for “User Instance” feature. Although, MS marked this feature to be removed. After this special tab, It seems MS changed his mind.

Refer – https://technet.microsoft.com/en-us/library/ms143684

15. Option to enable FileStream

16. Option for SSRS installation and configuration

17. New Page added for Microsoft R acceptance

18. Installation on the way

19. Installation Completed Successfully

Reference: Rohit Garg (http://mssqlfun.com/)

You can find and follow MSSQLFUN:-

http://www.facebook.com/mssqlfun

http://mssqlfun.com/feed

https://twitter.com/Rgarg86

Other Linked Profiles :-

http://www.sqlservercentral.com/blogs/mssqlfun/

http://social.msdn.microsoft.com/Profile/rohitgarg

http://www.toadworld.com/members/rohit-garg/blogs/default.aspx

http://beyondrelational.com/members/RohitGarg/default.aspx

Add Node to Windows Server 2008 Cluster

Steps : Add Node to Windows Server 2008 Cluster

1) Open Cluster Administration wizard > Right click on Windows Cluster & select Add Node

2) Add Node Wizard appears, Click Next to start

3) Browse Node to add, We select Node 3 to add

4) Select if you want to validate cluster settings or not & click Next

Note : Validation cluster settings is recommended

5) Validation a Configuration wizard will come, Click Next to start validation

6) Select type of test & click Next

7) Click Next to start Validation

8) Validation completed successfully(Warning to re configure quorum comes, we can ignore that), Click Finish to continue add node process

9) Click Next to start add process

10) Add node in process

11) Node 3 successfully added to cluster

Note : We need to reconfigure quorum to clear this warning.

If you liked this post, do like on Facebook at http://www.facebook.com/mssqlfun

Reference : Rohit Garg (http://mssqlfun.com/)

Steps for Windows Cluster Installation on Windows Server 2008

Here, You have steps with screenshot to install 2 Nodes windows cluster on Windows Server 2008.

Step 1: Validate Cluster Configuration

a) Open Cluster Administrator & click on “Validate a Configuration”

b) Wizard for cluster validation appears, click Next

c) Add Node to create cluster

d) Select Type of test want to perform

e) Confirmation Wizard for Test

f) Test Completed, You can view report by clicking on View Report button

Step 2 : Create Cluster

a) Open Cluster Administrator and click on “Create a Cluster”

Note : You cannot create cluster until test validation completed successfully.

b) Create Cluster Wizard appears

c) Add Nodes to create cluster

d) Specify Windows Cluster Name & windows cluster VIP

e) Confirmation Wizard, check details & click Next

f) Cluster Installation Start

g) Cluster Created successfully, You can view report bu clicking on “View Report” button

Step 3: Add Quorum

a) Open Cluster Administrator, Right click on Storage & select Add a disk

b) Select the disk available in system

c) Disk successfully added in cluster storage

d) Select “Configure Cluster Quorum Settings” to create Quorum

e) Select Quorum type

f) Select the available cluster disk

g) Check confirmation & click Next

h) Configuration Started

i) Cluster Quorum Configuration completed, you can view report by clicking on “View Report” button

j) Cluster installation completed

If you liked this post, do like on Facebook at http://www.facebook.com/mssqlfun

Reference : Rohit Garg(http://mssqlfun.com/)

Connect PerfMon to a Remote Server

It seems to be a simple & easy thing to connect Perfmon to a remote server.

GO TO RUN > Perfmon > Right Click “Connect to Another Computer” > Enter server name & you are done

But I face several connectivity issue during connecting Perfmon from remote server.

ISSUE 1: DNS not able to resolve the server name

RESOLUTION : I have fixed the issue by adding an entry in the hosts file (C:\Windows\System32\drivers\etc).

ISSUE 2 : Unable to connect the server

RESOLUTION: I have checked & found that Perfmon is trying to use Port 445 for connectivity. Telnet showed that port number 445 is blocked. I have asked added port into firewall exception & it works.

ISSUE 3 : Server Access denied

RESOLUTION: PerfMon is trying to the connect the remote server using the logged in user account which will not work by default as my user is not having access on remote server. Now, I need to run perfmon using a different user account which has access to the remote server.

runas /netonly /user:TestDomain\UserName “perfmon”
On running this command, it will ask for the password. It will open the PerfMon and you are ready to go.

 

If you liked this post, do like on Facebook at http://www.facebook.com/mssqlfun

Reference : Rohit Garg (http://mssqlfun.com/)

%d bloggers like this: