Creative Commons License
Drekendrop | Blog of Tutorial by Mei Pakpahan is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at drekendrop.blogspot.com.
Permissions beyond the scope of this license may be available at http://softdadesign.co.nr.

Share This

Sunday, November 6, 2011

A New Beginning

I've been absent posting on my blog for the past few months. Life is getting hard since i committed to master's course in Computational Science. I think from now on, i'll find some time to post more resources on this blog. Thanks for visiting and keep the spirit of learning and curiosity!

Regards,

Drekendrop

Tuesday, April 5, 2011

SQL Server 2008 Express Edition : Connect remotely from another server using SQL Management Studio

So, this time we're going to connect to SQL Server Express edition remotely from another server. As we know if we install SQL Server Express Edition it doesn't come up with SQL Management Studio Express on it, and that means we won't be able to manage the SQL Server Express Edition. In this case, we're gonna connect to SQL Server Express Edition by using SQL Management Studio in the separated server. All you need to is enable the remote connection from the SQL Server Configuration Manager of your Express Edition.

1st step---
Open SQL Server Configuration Manager and point to SQL Server Services.

2nd step---
Right click on SQL Server Browser > Properties
On the Service Status, click Start button, and then Apply then OK.

3rd step---
Notice that the SQL Server Browser is now running.

Now you can try to connect to the SQL Server Express from any different server using SQL Management Studio.

Thanks to Linglom for sharing this.

Thursday, March 31, 2011

SharePoint 2010 Error: domain/my Cannot be found

So, this morning i was trying to access my personal site and my profile pages in our new SharePoint farm. But what i got was the HTML 404 The Page Cannot be Found.
After spent hours looking for the solution of this issue, finally found the way to figure this out! Yippi!

1st step---
Log on to your Central Administration > Application Management > Create Site Collection

2nd step---
Point to Web Site Address and click on the link Define Managed Paths.

3rd step---
Add a new path
1. my, choose the type Explicit inclusion, Add Path
2. my/personal, choose the type Wildcard inclusion, Add Path

3rd step---
Go back to Create Site Collection page.
Put the Title and Description : My Sites
Web Site Address : http://your_domain/my/
Template Selection : Enterprise > My Site Host

Then choose the Primary and Secondary Site Collection Administrator, then click OK. Now you have /my site collection.

4th step---
This is optional, just in case if you haven't configured the Self-Service Site Creation. This will let the authenticate user create their own personal page.
Go to Central Administration > Security > General Security > Configure self-service site creation.

Then choose On in the Enable self-service site creation section. Press OK.
Easy, huh? :)

Wednesday, March 30, 2011

SQL Server 2008 R2: Connect to Different Domain and Server Name

Have struggled with this problem almost all day. I couldn't connect to another domain server using SQL Management Studio 2008 R2. Precisely, my other domain server is using Hyper-V and i called the server name as DOMAIN1. In this case i couldn't get access easily by using the server name but what i need is connect using the IP Address of DOMAIN1. In this case i defined the IP address of DOMAIN1 as 192.168.0.11

1st step---
Make sure you can connect to DOMAIN1, add another IP Address. In this case, i am using IP 192.168.0.* so i can connect. For example i defined the IP address of my SQL Server computer as 192.168.0.9

2nd step---
Check the DOMAIN1 firewall, make sure it doesn't block connection from your computer. To set up Firewall, go to Windows Firewall with Advance Security.

Right Click on Windows Firewall with Advance Security and point to Properties > Domain Tab > and Allow inBound connection.


3rd step---
Run Command Prompt:
cd\ <enter>
runas /user:DOMAIN1\admin /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" <enter>
Enter the password for DOMAIN1\admin then <enter>


wait until SQL Management Studio 2008 R2 open by itself.

4th step---
Once you get the Connect to Server Window. Fill in the Server Name as shown below:
Server type: Database Engine
Server name: 192.168.0.11\InstanceName
Authentication: Windows Authentication
Then click connect button.


Hope it works. Mine is working very well, now i can connect to my Hyper-V SQL Server. :) Good luck!

Thursday, March 24, 2011

SharePoint 2010: Specify the Default Database Server

If you have look at my posts before this, this post is connected to Migrating SharePoint 2010 Databases from SQL Server 2008 Express Edition to SQL Server 2008 R2 Enterprise Edition. After detach and attach all MOSS 2010 databases from SQL Server Express, now we have  to go back to SharePoint Central Administration. 

1st step---
Log on to your Central Administration as farm administrator.

2nd step---
In the SharePoint 2010 Central Administration Page go to Application Management > Databases > Specify the default database server.
3rd step---
In the default database server page, fill in the Domain\SHAREPOINT_DB_Instance of the SQL Server Instance that you'd like to be as the default.
And if on that Instance you are using SQL Authentication, then you have to fill in the Username and Password, instead leave it blank if you're using Windows Authentication.

Sometimes you may get an error message if there's an issue with the permission for NT AUTHORITY/NETWORK SERVICE group like shown below:
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

This happens when you're using Windows Authentication, and means you will need to grant permission for NT AUTHORITY/NETWORK SERVICE. Below are some steps that i did to grant permission for NT AUTHORITY/NETWORK SERVICE group.

1st step---
Open SQL Management Studio and then connect to the Database Instance. After you are connected, right click on the Database Instance and point to New Query, because we are going to use Transact-SQL to grant the permission.
2nd step---
Execute the script below:

sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'


After that you will need to go back to the SharePoint Central Administration, and redo the 2nd step---  and 3rd step--- up above. You will not find any error anymore. :)

SharePoint 2010 : Detach SharePoint databases from SQL Server Express Edition & Attach to SQL Server Enterprise Edition

As default on the new installation, Microsoft Office SharePoint Server (MOSS) 2010 using SQL Server Express Edition to store the databases. To migrate MOSS 2010 databases to SQL Server Enterprise edition, you need to install SQL Server Management Studio first so you can manage all Database Engine easily. Before you do databases detach, please read this article carefully from Microsoft official site. According to the information and requirements provided by Microsoft you will need to stop some of the SharePoint services. You can manage by using Administrative Tool > Services, but i'm using a very quick tool from CodePlex called SharePoint 2010 Service Manager. You can download from here for FREE!

So below are the steps to detach your SharePoint databases from SQL Server Express Edition and attach them again  to SQL Server Enterprise Edition.
1st step---
Go to SQL Server Management Studio, connect to your SharePoint Server database.
This is what i did:

Server type  : Database Engine
Server name : Domain\SHAREPOINT

Then click Connect.

2nd step---
In the Object Explorer, point to Connect button and choose Database Engine. Then connect again to your SQL Server Enterprise Edition server.


3rd step---
After installing SharePoint 2010 Service Manager, click on the Stop SharePoint 2010 button to stop all the services we need to detach the MOSS 2010 databases.
After we stop all the services, note that the SQL Server also stopped. We need to start it again manually from SQL Server Management Studio.
4th step---
Point to the database that we need to detach. Right click, then point to Tasks > Detach..
5th step---
Go to Windows Explorer and find the location of your SQL Server Express databases, then copy the .mdf and .ldf file to the SQL Server Enterprise databases location.

6th step---
Back to SQL Server Management Studio, but now we focus on the SQL Server Enterprise Edition server. Expand the Databases. Then right click on Databases and choose Attach..
The new dialog for attach database will show up after that. Click on Add. And it will show the dialog to locate the .mdf file.

7th step---
Click OK, and then OK again to attach the database file. You will notice a new database has been attached to your SQL Server Enterprise Edition. If it doesn't appear then right click on the server name and Refresh.

Good Luck.

SQL Server 2008 Express Edition Error: Cannot show requested dialog. ADDITIONAL INFORMATION: Parameter name: nColIndex Actual value was -1. (Microsoft.SqlServer.GridControl)

This morning i have found the way to detach SharePoint databases from SQL Server 2008 Express Edition and then attach all databases to our new SQL Server 2008 R2 Enterprise edition. But then i found problem on re-attach the databases to SQL Server Express edition. It returns me an error as shown on the image below.
TITLE: Microsoft SQL Server Management Studio
------------------------------

Cannot show requested dialog.

------------------------------
ADDITIONAL INFORMATION:


Parameter name: nColIndex
Actual value was -1. (Microsoft.SqlServer.GridControl)

------------------------------
BUTTONS:

OK
------------------------------

Then after hours looking for the solution, finally i found the article by googling it, saying that this is one of the SQL Management Studio bugs. So all you need to do is using Transact-SQL to attach the database.

Below is the T-SQL script that i used to re-attach my SharePoint database and worked very well.
EXEC sp_attach_db @dbname = N'Your_SharePoint_DBName',
    @filename1 = N'[drive]:\DB_Attach_Location\SharePointDB_File.mdf',
    @filename2 = N'
[drive]:\DB_Attach_Location\SharePointDB_Log.LDF';


Example:

EXEC sp_attach_db @dbname = N'SharePoint_AdminContent_cc5d5fea-c432-4746-930e-cfc2138cffd3',
    @filename1 = N'E:\Data\MSSQL10.SHAREPOINT\MSSQL\DATA\SharePoint_AdminContent_cc5d5fea-c432-4746-930e-cfc2138cffd3.mdf',
    @filename2 = N'E:\Data\MSSQL10.SHAREPOINT\MSSQL\DATA\SharePoint_AdminContent_cc5d5fea-c432-4746-930e-cfc2138cffd3_log.LDF';


Once you run the query you may notice the new database has been attached successfully. Hope it helps.

Tuesday, March 15, 2011

Infopath 2010: Get and Set Value of TextBox Field Using Visual C# onEvent Button Click

I've been working on InfoPath 2010 since a week ago (i'm totally new on it). This was something that i needed to do, and after few hours testing and googling it, finally i could figure out how it works in InfoPath.

1st step---
Right click on your button and choose Button Properties. Click on Edit Form Code... button.


2nd step---
Find the function for the button event. In this case mine is as shown below.
public void updateButton_Clicked(object sender, ClickedEventArgs e)
{
    //write your code here
}

3rd step---
Put this codes below

//scripts to get value of Infopath field

XPathNavigator Period1 = this.MainDataSource.CreateNavigator().SelectSingleNode("//my:myFields/my:period_1", this.NamespaceManager);
String P1 = Period1.Value;

//test if it works
MessageBox.Show(P1 + " " + P2, "Warning", MessageBoxButtons.YesNo);

//scripts to set value of Infopath field        
XPathNavigator P2 = this.MainDataSource.CreateNavigator().SelectSingleNode("//my:myFields/my:period_2", this.NamespaceManager);
P2.SetValue("This is sample of String");


Let's focus on the bold that i highlighted above.
/my:myFields/my:period_1 and /my:myFields/my:period_2, to get this XPath, go back to your InfoPath designer, and right click on the field name at the right sidebar. And choose Copy XPath.


That's all i want to share today. Happy learning!

Friday, March 11, 2011

SQL Query: Adding Active Directory Users Attributes To An Existing Table Or Specified Column

OK, here it is, i was trying to create a timetable SharePoint webpart for our school, and using SQL Server Database. And i want the timetable appears as the domain user logged on to SharePoint. So my first step to create this webpart was creating the database and tables. From the previous topic i have explained how to get the Active directory users and attributes, and so i improved the sql query to copy all my AD retrieval results into my 'teacher' table.
Below is the query that i ran:

use TimeTable
go
INSERT INTO teacher(initials,logOnID,preferredName)
SELECT initials,samAccountName, displayName FROM OPENQUERY(ADSI,'SELECT initials, samAccountName, displayName, mail FROM ''LDAP://OU=Teaching Faculty,OU=Staff,DC=BISDRAGONS,DC=COM'' WHERE objectClass=''Person'' AND objectClass = ''User'' ORDER BY samAccountName') where mail IS NOT NULL


And it worked very well for me. :)

SQL Query: Retrieve Active Directory Users List

Today i was struggling getting the active directory users list from our domain, but finally it worked. Here's the query.

1st step---


EXEC master.dbo.sp_addlinkedserver @server = N'ADSI',
@srvproduct=N'Active Directory Services', @provider=N'ADsDSOObject',
@datasrc=N'bisdragons.com'
GO

Note: Change @datasrc=N'your_domain.com' 

2nd step--- 
Run this query:
SELECT samAccountName, givenName [First Name], sn [Last Name],mail FROM OPENQUERY(ADSI,'SELECT samAccountName,givenName, sn, mail FROM ''LDAP://OU=Teaching Faculty,OU=Staff,DC=BISDRAGONS,DC=COM'' WHERE objectClass=''Person'' AND objectClass = ''User'' ORDER BY samAccountName') WHERE mail IS NOT NULL

Note: change "LDAP://OU=your_organizational_unit, DC=your_domain,DC=COM(*optional com,org,ca,etc...)" 

You can also modify the SQL query above to get another attributes from your Active Directory. This link provides a complete Active Directory attributes in pdf.

Good luck!


Thursday, March 10, 2011

SharePoint 2010: Change Preferred Name To FirstName + LastName Instead Of Domain\Username

In this tutorial i would like to share how to change your account preferred name in SharePoint Server 2010.

1st step---
Log on to SharePoint Central Administration as Farm Administrator.

2nd step---
Go to Application Management > Manage service applications.


3rd step---
Scroll down to User Profile Service Application and click on the hyperlink.

4th step---
Go to  Manage User Profiles.


6th step---
Put the username that you would like to change its profiles on to Find profiles textbox. Then click Find. Once it shows the result, rollover to the Account Name and click the little arrow, choose Edit My Profile.


5th step---
Now you can Edit the account properties, don't forget to Save and Close after you're finished editing. Good luck!

Wednesday, March 9, 2011

SharePoint 2010 Error: Requested registry access is not allowed

Did you find this error? Well i just did few hours ago, and after struggling many hours, i think i finally have found what the problem is. The first issue came because i did repair my SharePoint site, because i did a mistake by changing the farm account and suddenly my SharePoint Central Administration page can not be accessed. So, after i repaired my SharePoint using SharePoint Server 2010 installation CD, my Central Administration worked fine. But wait, it wasn't fine at some pages, like i couldn't access Security > General Security > Configure managed accounts. It returned me an error :
Error: Requested registry access is not allowed

and not even that i couldn't delete or edit any of my web applications, and i couldn't access all my SharePoint site or web applications, it says my license has expired. So what was going on? After surfing on the internet and tried to find a bunch of articles about it, finally i found the way to figure it out.

Below are some steps that i did:
--1st step
Open the registry by run regedit on the server where the SP2010 is installed.

--2nd step
Go to HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\OFFICE SERVER\14.0
Right click and choose Permission..

--3rd step
Add WSS_ADMIN_WPG and give Full permission to this Group.

--4th step
Add WSS_WPG and give Read permission to this Group.

--5th step
Restart the server.

Try to browse Central Administration again. And it should be working fine as well as your SharePoint sites.

Monday, February 7, 2011

Install OpenSSL and cURL on Appserv Windows XP 32-bit


What i want to share here is something that you might have tried hard and didn’t return you any success. I’ve tried to understand and install it onto my Windows XP and thank God it works after a long.
First you need these kind of files :
1. openssl.exe
2. openssl.conf
3. abs.exe
4. mod_ssl.so
5. libeay32.lib
6. ssleay32.lib
1st Step ——–
Copy openssl.exe, abs.exe, openssl.conf onto [drive]:\AppServ\Apache2.2\bin
2nd Step ——–
Copy mod_ssl.so onto [drive]:\AppServ\Apache2.2\modules
3rd Step ———
Copy libeay32.lib and ssleay32.lib onto C:\Windows\system32
4th Step ——–
Open httpd-ssl.conf which is located in [drive]:\AppServ\Apache2.2\conf\extra and modify as shown below :
ServerName [your_host_name]:443
ServerAdmin admin@[your_host_name]
then save it.
5th Step ———
Open httpd.conf which is located in [drive]:\AppServ\Apache2.2\conf and modify as shown below :
change #LoadModule ssl_module modules/mod_ssl.so to
LoadModule ssl_module modules/mod_ssl.so —> (remove #)
change #Include conf/extra/httpd-ssl.conf to
Include conf/extra/httpd-ssl.conf —> (remove #)
6th Step ———
Generate SSL Certificate
by using Command Prompt go to [drive]:\AppServ\Apache2.2\bin
and type as shown below :
[drive]:\AppServ\Apache2.2\bin > openssl.exe req -config openssl.cnf -new -nodes -out server.csr -keyout server.key
answer all the questions and press enter on after you answer question one by one.
when it came to the question Common Name, you have to fill it as your_host_name
then type :
[drive]:\AppServ\Apache2.2\bin > openssl.exe x509 -in server.csr -out server.crt -req -signkey server.key -days 365 -set_serial 1
7th Step ———–
Move server.key and server.crt from [drive]:\AppServ\Apache2.2\bin onto [drive]:\AppServ\Apache2.2\conf
Delete server.csr and .rnd
8th Step ———–
Open php.ini which is located to C:\Windows and modify as shown below :
remove the semicolon (;) from ;extension=php_curl.dll, ;extension=php_openssl.dll, ;extension=php_xmlrpc.dll
9th Step ————-
Restart your Apache server.
10th Step ————
Test your ssl by browsing https://your_host_name/
Test your cURL by using this php script:
<?php
$url = “http://www.google.com/“;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$returned = curl_exec($ch);
curl_close ($ch);
echo $returned;
?>
it should has return (from www.google.com) :
302 Moved
The document has moved here.
Those are 10 Steps to install OpenSSL and cURL on AppServ under Windows XP 32-bit.

Enable mod_rewrite in Apache


What does mod_rewrite do? If you have heard about htaccess (extension : .htaccess), then you might need it. Mod_rewrite has to be enable first if you want to use htaccess file on your website.
In this tutorial, i am using Appserv as my web server. But actually it won’t have a significant differences with other type of web servers (e.g XAMPP, LAMP, WAMP etc).

–1st step
Find http.conf file which is located in [drive]:\AppServ\Apache2.2\conf

–2nd step
Open http.conf in notepad. Find #LoadModule rewrite_module modules/mod_rewrite.so

–3rd step
Remove sharp (#) from #LoadModule rewrite_module modules/mod_rewrite.so then it supposed to be just LoadModule rewrite_module modules/mod_rewrite.so

–4th step
Restart your Apache. Then try to reload your website with your .htaccess inside.

Good luck!

Adding front page image to Moodle page

Howdy! This time i want to give tutorial for adding image on the front page of Moodle.

–1st step
Log in as Moodle Administrator, as you logged in you’ll see Site Administration panel at the left side of page.

















–2nd step
Go to Front Page and choose Front Page settings.


 –3rd step
Find Include a topic section, there’s a note If selected, a topic section will be displayed on the site’s front page, check the checkbox. And then Save Changes.
 
–4th step
Return to your Moodle front page. Turn Editing On. Click on the Edit Summary icon (it looks like a pencil icon).

–5th step
In the summary site editor, Insert image, and Save changes when you’re finished.

Now you have image/s displayed on your Moodle front page. Woo hoo!

Assign users as any role in Moodle course

I decided to write this tutorial, some people may think it’s a silly tutorial or not even worth to be called as tutorial, but believe me, i decided to write it because i kept getting this question from some people : How to assign or add students to Moodle course? So, let’s start it.

–1st step
Log on to your Moodle page. And go to your course. Remember, you can only do this tutorial successfully if your role is Administrator or Course Creator and Teacher.

–2nd step
Once you get into your course, click on button  ‘Turn Editing On‘. 
And click on Assign role icon.
Assign role




–3rd step
Click on any type of role, for example Student. It will show you list of potential users at the right textbox, click on the student’s name, then Add.

–4th
Click Assign roles in Course : course_name button.


Now, the student has been assigned to your course. Good luck!

Tuesday, February 1, 2011

Welcome to Drekendrop


Hello! I am the author of Drekendrop. Drekendrop is taken from the words 'drag and drop' and it is pronounced in Indonesian as 'drekendrop', that's the reason why must 'Drekendrop'. In this blog i would like to share some tutorials about web including the database systems, programming, design, and administration, based on my experiences, all those matters that has stressed me out are here. Haha...do not hesitate to contact me by email or write comment on this blog.

Thank you for visiting and good luck on your learning!

Regards,
Mei

Note: Drekendrop's author is as known as Jump2TheJAM | sofdadesign and Offdadesign.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms