Wednesday, April 25, 2012

Change SQL Server Name



  1. Open SQL Server Management Studio and click New Query.
  2. Type Select @@ServerName to find out the current server name. In our example, we’ll be changing the server name from RKF to REH.
  3. Next, type sp_dropserver ‘RKF’
  4. You are now ready to add the correct name by typing sp_addserver ‘REH’.
  5. Stop sql server and the sql server agent by opening a command prompt and typing net stop mssqlserver. 
  6. Restart SQL server by typing net start msssqlserver.
  7. Restart SQL server agent by typing net start sqlserveragent.
  8. Click New Query in SQL Server Management Studio and type select @@servername to verify everything is correct and you have successfully changed the sql server name. 
https://community.dynamics.com/product/gp/gptechnical/b/gplesliev/archive/2012/02/02/change-the-name-of-the-sql-server.aspx

Tuesday, April 24, 2012

The request failed with HTTP status 401: Unauthorized

Our environment:
Each machine is separate, all databases are on the cluster

SQL 2008 - Clustered
Sharepoint 2010  Internal
Sharepoint 2010 Certification Server
Sharepoint 2010 External
SSRS in Sharepoint Integrated mode

The issue:
Everything was setup and configured correctly.
The Sharepoint machine could open the SSRS reports, but none of the other clients could.
They would be able to browse the sharepoint site and SSRS folder structure.
when they tried to run a report, they would get the error.
We determined that our Kerberos was not set up properly, and this error was due to the double hop issue.
We had no intentions of fighting up with Kerberos, so we went the other direction and used the Trusted Account setup.

If you would like to setup Kerberos and Windows Authentication for Sharepoint and SSRS, follow the instructions here
http://go.microsoft.com/fwlink/?LinkID=196600

The request failed with HTTP status 401: Unauthorized.


To resolve this issue:

1) Disable Loopback check on SSRS server (Method 2)
  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.

2) Configure SSRS to use Trusted Account
Configure Reporting Services Integration to use Trusted Account instead of Windows Integrated. Follow these steps to change this setting:
  1. Open Central Administraton, and then click Application Management> Manage Integration Settings.
  2. (For SP 2010 General Application Settings>Reporting Services Integration)
  3. Set Authentication mode to Trusted Account.
    Note: You will no longer be able to specify Windows Authentication for your report data sources, because we are not using Windows credentials. If this is done, you will receive the following error: “This data source is configured to use Windows integrated security. Windows integrated security is either disabled for this report server or your report server is using Trusted Account mode". 

3) Configure Sharepoint using Sharepoint Central Administration to use NTLM (Trusted Account)
    1. Open Central Administration, and then click Application Management.
    2. Under Application Security, click Authentication Providers.
    3. Click the zone you want to modify.
    4. Under IIS Authentication Settings. click NTLM.
    5. Click Save.

4) Grant a user account access to the SSRS reports
  1. Open your Sharepoint site
  2. Go to Site Actions> Site Permissions
  3. Select or create a group
  4. Add users to the group by clicking New>Add Users>Type user names in>OK

5) If your internet explorer keeps prompting users for a password, and you want to prevent this, add the sharepoint intranet site to the Local Intranet Sites List
  1. Internet Explorer>Option Gear>Internet Options>Security>Sites>http://mysharepointsite>Add>Close>Ok
Restart Sharepoint Server. / Cycle IIS
Restart SSRS Server / Cycle IIS

6) Change the security type on your SSRS Data Connection

  1. Set Integrated Security = False
  2. Tick the Stored Credentials
  3. Enter sa username and password
  4. Test Connection

Other Associated Errors:

  • An error has occurred during report processing. (rsProcessingAborted)
    • Cannot impersonate user for data source 'DataSource1'. (rsErrorImpersonatingUser)
      • This data source is configured to use Windows integrated security. Windows integrated security is either disabled for this report server or your report server is using Trusted Account mode. (rsWindowsIntegratedSecurityDisabled)  

Monday, April 23, 2012

Dynamics GP - An error has occurred in the script on this page, unspecified error

This occurs when the entire user folder is copied from a user with an old version of GP onto a new machine with a newer version of GP.

This error is also related to the missing drivers required for the metrics to work.
To get the metrics to work, download and install this on all clients.
http://www.microsoft.com/download/en/details.aspx?id=1878

OR, you can just disable the metrics by going to Customize, and unticking the metrics.


Thursday, April 12, 2012

Dynamics GP 10 FRx 6.7 sp 9, 12 - FRx32.OFSIMain.CheckOFSIConnection

Error:
You try to login with a password, and no matter what you try, you get this error.
However, you can log in as sa with no issues.

FRx32.OFSIMain.CheckOFSIConnection
8900: FRx is unable to open a connection to the general ledger database because the login or password is incorrect. Verify your login and password, and then try again.
http://support.microsoft.com/kb/858323



Solution:
The login account must be an sql account with access to the company database and dynamics databases.
GP user accounts will not work.
You must create an SQL account, and give it access to the DYNAMICS and company databases manually.


When you first setup FRx, you must go into Admin>Organization>Admin password
and change the password from the blank default to a real password.
Once this is done, you can log in using this FRx Administrator account.
This does not give access to the companies, only to Administration options in FRx.
The only accounts that will work with the companies are SQL accounts that have access to DYNAMICS and the company database.

These must be set up manually.

Login to SQL Management Studio as sa
Expand Security>Logins>Right Click>New Login
Choose SQL server or windows, enter account name and password, disable policy, expiration and pw change.
On left, Select User Mapping. Tick Dynamics, in bottom pane tick DYNGRP, enter dbo for  default schema
Tick Company, in bottom pane tick DYNGRP, enter dbo for default schema
click OK
Restart FRx.
You can now login to FRx using this account.

Other Related Errors:

"Error getting Dynamics version number from table DYNAMICS..db_upgrade"


http://support.microsoft.com/kb/925651

Solution:
Once you have created an SQL user with access to the Dynamics and company databases, restart FRx.
This error should go away.


Tuesday, April 10, 2012

Dynamics GP 10 - Running FRx 6.7 SP9 or higher on 64 bit machines

To run FRx 6.7 SP 9, 10, 11, 12 on a Windows 7 64-bit or Windows Server 2008 R2 64-bit, do the following.


The following are the steps taken to get FRx 6.7 Sp9 and above working on a Windows 7 64bit machine.

Related Errors:
Installation Error: “Please make sure you have finished any previous setup....” - Copy the installs locally
  1. Download the FRx 6.7 SP9 full install from Partnersource
  2. DO NOT INSTALL FROM A NETWORK DIRECTORY, Copy the file locally
  3. https://mbs.microsoft.com/partnersource/downloads/releases/frx67fullinstall4gp10.htm?printpage=false
  4. Download FRx SP 12 from Partnersource
  5. Ensure that UAC is turned off
  6. Ensure that you have setup your 32-bit ODBC connection (c:\windows\syswow64 and find odbcad32.exe)
  7. Use "Run as administrator" for everything
  8. Log in to the machine as the Domain Admin
  9. Right click the FRx 6.7 SP9 install and ‘Run as Administrator’
  10. Launch FRx, and register it 
  11. Right click the FRx Report Deigner, click properties>Shortcut>Advanced>Tick "Run as Administrator"
  12. Also, go to Compatibility>Compatibility Mode>Run in compatibility mode for Windows XP Service Pack 3
  13. Install SP 12
  14. Launch FRx
  15. Setup Spec Set
  16. Setup Company
  17. Change default sysdata directory to network path if necessary.
  18. Go to Organization>Sysdata>Change Path

Saturday, April 7, 2012

Minecraft - How to create plugins for Bukkit

  1. Start by reading this - http://wiki.bukkit.org/HUGE_Plugin_Tutorial
  2. Download the latest Bukkit Library - Bukkit API - Development Snapshot 
  3. Download Eclipse(Java Development Tool) - http://www.eclipse.org/
  4. (optional) Setup a github account - https://github.com/
  5. Use examples from source code from generous developers
  6. Use a decompiler to view source code from any jar file
    1. Download   this decompiler
    2. Download any plugin as a jar file
    3. Extract the jar file using winzip
    4. Browse to any class file that was extracted
    5. Open it in the decompiler to view the code

Overview
----------------------------------
You write your code in Eclipse.
You can connect the Git to your project folder in Eclipse to use the Github online version control to aid in your development.
Save and export in Eclipse to a java plugin file.
Place that file in the plugins directory for your bukkit server to test/use it.

Step by Step
----------------------------------
Create a new project

  • Open Eclipse
  • File>New>Java Project
  • Enter a project name (Eg. HelloWorld)
  • Libraries>Add External Libraries> Add the library you downloaded from  Bukkit API - Development Snapshot 
  • Click Finish, you will see your project on the left in the Package explorer bar
  • In the Package Explorer bar on the left, expand your project, expand Referenced Libraries, Right click on the bukkit library, go to properties
  • Click Javadoc Location, enter this http://jd.bukkit.org/apidocs/
  • Click Validate, then OK, OK
  • Right click on your project name (HelloWorld)
  • Click New>File name it plugin.yml
  • Drag your plugin.yml into the editing window on the right to edit it.
  • Your plugin.yml should look like this
---------------------------------------------------------------------------------------------------
name: HelloWorld
main: com.github.Username.HelloWorld.HelloWorld
version: 1.0
commands:
h:
description: This command will say "Hello World".
usage: /h
e:
description: This is another command for something else.
usage: /e
---------------------------------------------------------------------------------------------------------
  • Right click src>New>Package
  • Name your package according to the tutorial (eg. com.github.username.HelloWorld)
  • Right click on the package, click New>Class
  • Name your class the same as the package (eg. HelloWorld)
  • In the editing window on the right, this code will give an example of a simple HelloWorld plugin
----------------------------------------------------------------------------------------------------
package com.github.Username.HelloWorld;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.logging.Logger;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

import org.bukkit.entity.Player;

public class HelloWorld extends JavaPlugin{

protected static final Logger log = Logger.getLogger("Minecraft");

public void onEnable(){ 
log.info("HelloWorld is enabled");
}
 
public void onDisable(){ 
log.info("Helloworld is disabled");
}

public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){

// If the player typed /h then do the following...
if(cmd.getName().equalsIgnoreCase("h")){ 
// Sends message to sender only
sender.sendMessage( "You yell - Hello World!");
// Sends message to all players on server
Bukkit.getServer().broadcastMessage( "You hear " + sender.getName() + " yell - Hello World!");
// Sends message to console only
System.out.println("Hello World!");
return true;
} //If this has happened the function will break and return true.

System.out.println("debug-Command did not work");
return false; 
}

}
-------------------------------------------------------------------------------------------------------


  • To use the plugin on your server
  • Click File>Export>Jar File>Next>
  • Select your project, it will select everything
  • Select the export destination, click browse, browse to where you want to create the plugin file
  • Click Finish
  • It will create the HelloWorld.jar file in that location.
  • You can now place this file in your plugins folder on your bukkit server
All of my projects and examples can be found on https://github.com/Cowmaster

Thursday, April 5, 2012

Dynamics GP Business Portal 4.0 Checklist

Pre Requisites for BP 4

Ensure that NO OTHER WEBSITES HOSTED ON IIS USE PORT 80 (LIKE SSRS!!)
Open IIS Manager, right click on website, go to options, change port to NOT 80
Install DotNet 2.0
Install SQL 2000/2005 and latest SP !!!!!!!!!NOT 2008!!!!!!!!!
Install GP 10 and latest sp
Initialize databases
Enable All SQL Services (Agent and Browser)
Install DotNet 3.0 (NOT SP1!!!)

Install WSS 3.0 SP2 !!!!CHOOSE ADVANCED TO SELECT SQL OTHERWISE IT WILL USE SQL EXPRESS BY DEFAULT!!!!
Server Type: Web Front end
Run Configuration Wizard
Create new Server Farm, enter SQL database to create farm on
Create Sharepoint Sites
create new web application
-New Website
-New App pool
Run iisreset /noforce
Create Site Collection
do not change url
goto command prompt then navigate to directory
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
run aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE"


Ensure services started - Dist Tran Coord, IIS, WWWPub
Check GP Keys to ensure BP is registered
Run bP Pre-Req Checker
Enter "Dynamics" as database

Add/Remove Certification Authority in windows components
Enterprise root CA
Common name is computer name

Open IIS Manager
Right click default website
Directory Security
Server certificate
create new
prepare now, send later


Install BP 4