Search Mailing List Archives
[protege-discussion] How to import an Instance List with Data Master from SQL Server 2005 Express?
Joerg Ludwig
jl at act-consulting.de
Fri Mar 19 01:59:28 PDT 2010
How to import an Instance List with Data Master from SQL Server 2005 Express?
Hi to all,
After I read a lot of information about how to connect with a SQL Server and
had successfully managed to connect me with my database, I have a question about
the import of instance lists.
But first, I naturally want to show everyone how I successfully managed a SQL
Server 2005 Express connection.
Download and install SQL Server 2005 Express
1. Download [1] and install.
Hint: I use SQL Server and Windows Authentication Mode as Server
authentication.
2. Make sure that the SQL Server 2005 is running correctly.
1st Open a cmd prompt and type the following command:
sqlcmd -S.\sqlexpress
2nd You should get a prompt like this
1>
3rd Type "Exit" to close sqlcmd.
2. Enable the Named Pipes and TCP/IP Protocols.
1st Launch SQL Server Configuration Manager
2nd Expand "SQL Server 2005 Network Configuration"
3rd Select "Protocols for "SQLEXPRESS""
4th Enable "Named Pipes" (for local and remote access)
5th Enable "TCP/IP" (for local and remote access)
3. Restart the SQL Server
1st Select SQL Server 2005 Services (in the same window)
2nd Select "SQL Server (SQLEXPRESS)"
3rd Restart
4. Start SQL Browser
1st Select "SQL Server-Browser"
2nd Restart
Hint: If the service disabled go into the Services and set it to Automatic.
5. Enable local and remote connections
1st Launch SQL Server Surface Area Configuration
2nd Click Surface Area Configuration for Services and Connections
3rd Select Remote Connectiosn
4th Select Local and remote connections
5th Select Using both TCP/IP and named pipes
Download and install SQL Server Management Studio Express
1. Download [2] and install.
1st Start and create a new database e.g. "act".
2nd Create a table named "Editor"
3rd Create a column "name" from type nchar(10).
4th Create a column "salary" from type float.
5th Add some dummy values for the names like "Mother" and "Father".
6th Add some dummy values for the salary like "100" and "200".
7th Set your access settings for the database. (E.g. SQL/Domain user, etc.)
Hint: I use this table to show an import of instances from class "Editor".
Download and install SQL Server 2005 JDBC Driver 1.2
1. Download [3] and install.
2. Run the exe file and unpack this zip file in your %ProgramFiles% directory.
3. Copy and paste the following two files:
sqljdbc_auth.dll:
From: %ProgramFiles%\Microsoft SQL Server 2005 JDBC Driver\
sqljdbc_1.2\enu\auth\x86\sqljdbc_auth.dll
To: %WinDir%\system32\sqljdbc_auth.dll
Hint: Please select the correct version for your operating system!
sqljdbc.jar:
From: %ProgramFiles%\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.2\
enu\sqljdbc.jar
To: %ProgramFiles%\Protege_3.4.4\plugins\edu.stanford.smi.protegex.
datamaster\sqljdbc.jar
Start Protege 3.4.4 and try an import
1. Start a new Project.
2. Select Protege Files (.pont and .pins) as Project Type.
3. Create a new class "Editor".
3. Create a new slot "name" and add it to your Editor class.
4. Create a new slot "salary" and add it to your Editor class.
Hint: Now we have a new class "Editor" with two slots "name" and "salary".
5. Enable the DataMasterTab under menu Project->Configure.
6. Switch into the DataMasterTab.
Hint: I have version 1.3.2 of DataMaster.
7. Select the connection string.
1st Data Source Type: JDBC
2nd JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
3rd JDBC URL: jdbc:sqlserver://3RS842J\SQLEXPRESS;databaseName=act;
IntegratedSecurity=true;
Hint: Are you using your current Windows account for the database access
then use "IntegratedSecurity=true;"
Are you using a SQL user ID and password for the database access then
use "IntegratedSecurity=false;". And don't forget to enter your
user and password!
Please change your server name ("3RS842J") and database name ("act").
8. Press "Connect". After a succesfully connection you have access to your
data tables. Select your Editor table under "Data Tables". Now you see the
content.
9. Enable "Import table content" and then press "Import". Voila. Now you have
two new instances from class Editor.
Hint: Check your console window.
Okay... after a lot of informations back to my questions. I hope that someone
can give me more details or hints. Every answers are welcome. :)
1. Is this the general way to import instances? What are your experiences?
2. How can i import an instance list? E.g. i want to fill informations about
a "responsible for" relationship.
3. If there any documentations about Data Master available? I found nothing.
4. Can anybody give me more details about the construction of a SQL table?
What should i note?
At last my environment:
- Windows XP (SP3)
- Protege 3.4.4
- Protege Frames
- Data Master 1.3.2
- Java 1.6 (1.6.0_18)
- SQL Server 2005 Express
Thanks and regards,
Jörg
[1] http://www.microsoft.com/downloads/details.aspx?familyid=220549B5-0B07-
4448-8848-DCC397514B41&displaylang=en
[2] http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-
4E3D-94B8-5A0F62BF7796&displaylang=en
[3] http://www.microsoft.com/downloads/details.aspx?FamilyId=C47053EB-3B64-
4794-950D-81E1EC91C1BA&displaylang=en
More information about the protege-discussion
mailing list