Thursday, June 12, 2008

Reporting Services adjustment after hostname change - why you change hostname!?

Well, why I changed hostname after installed reporting services on my pc? because my corporate IT changed in order to join to domain so I did not have any choice.
BTW if you encounter same situation, easiest way is i think re-install reporting services but i am lazy so i have tried to find something tweaks. I googled and first i found was this one.

Original - James Kovacs' Weblog - Report Manager cannot find root folder after installation
Steps to Resolve the ProblemFirst verify that this is in fact your problem. Launch SQL Query Analyzer and run the following script: -- Start scriptsp_helpserver GO-- End script Note the hostname that SQL Server reports. If this doesn't match your computer's hostname, you need to change it. (I'll assume that you know your computer's hostname or how to find it in My Computer... Properties.) If the hostnames don't match, here's a script to correct the problem. You'll have to substitute appropriate values for OLDNAME and NEWNAME in the script below. N.B. The parameter 'local' in sp_addserver is important as it tells SQL Server that this is its hostname rather than the hostname of a linked server. -- Start scriptsp_dropserver 'OLDNAME'GOsp_addserver 'NEWNAME', 'local'GOsp_helpserverGO-- End script sp_helpserver should now report the correct hostname. Since SQL Server only reads its hostname information at startup, you'll have to restart SQL Server for these changes to take effect. Once you've restarted SQL Server, Report Manager should be working again.

Okay so i fired above script and restarted SQL Server and Reporting Service services and tried but still cannot open report manager. Then next what i did was i opened Reporting Services Configuration Manager. You also find old hostname on here under Database Setup section. Server name was 'old hostname\instance' so i changed it. Clicked apply button then another error message on Task Status block said 'Assigning Reporting Services Rights to User' with red x symbol. Click the link 'Tell me more about the problem and how to resolve it.', it was saying because my all SQL Server 2005 pre-define local groups and users were also using old hostname like 'old hostname\ASPNET' but RS configuration manager tried to find 'new hostname\ASPNET'.

Opened Local Users and Groups and renamed all groups name which contain old hostname. Also went back to MSSMS and changed all names under Security-Logins.

After restarted SQL Server and Reporting Services, I could open Report Manager page.

But I still could not connect Reporting Services from MSSMS. In order to resolve this, I changed RSReportServer.config file which is saved on report manager's physical folder. http://old hostname/reportserver replaced to new hostname.

Now all my reporting services related applications are working fine.

SQL Server 2005 DBA - how to reset 'sa' passowrd

Link: Mark Minasi's Reader Forum

Login to the server with an administrative account for that machine. Open Query Analyzer and connect to SQL Server using Windows authentication, not mixed. Run sp_password as show below to reset the sa password:sp_password @new = 'MRND', @loginame = 'sa'

SQL Server 2005で sa のパスワードをリセットする方法
要するに、肝は sp_password を呼ぶこと。@newは新規パスワード。接続時はWindows認証を使う。ユーザーはサーバー機のAdminグループに所属しているアカウント。

追記、上ではQuery Analyzerを使っているが、SS Management Studio でも実行可能。

Wednesday, June 11, 2008

SQL Server 2005 on testing environment

These are the things need to follow in order to enable remote access.
SQL Server 2005でRemote Accessを有効にする時のステップ

1. Open SQL Server 2005 Surface Area Configulation, expand target server instance, click 'Database Engine', 'Remote Connections' and choose 'Using TCP/IP only' on the right hand side of the screen then click OK.
2. Open SQL Server Configuration Manage and start SQL Server Browser if it's not started.
3. Disable Windows Firewall from Services.

Wednesday, June 4, 2008

Special Characters

Click the title to see on W3C page

日本語で言うところの特殊文字。HTMLで & や € なんかを表示したい時に使うやつ。
リンクをクリックするとW3Cのページへ飛びます。

Change DB Owner on SQL Server 2005

Use following stored procedure to change dbo login name on SQL Server 2005.
SQL Server 2005でデータベースオーナーのログイン名を変更する時に使うストアドプロシージャー

USE <target database name>;
EXEC sp_changedbowner '<new login name>';

Link on MSDN Library (English) (Japanese)