<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2145663522824641736</id><updated>2011-07-07T19:25:12.956-07:00</updated><category term='Server'/><category term='VMWare'/><category term='Virtualization'/><category term='connection string'/><category term='Database'/><category term='software'/><category term='hardware'/><category term='SQL Server'/><title type='text'>Dr. Osorio, SQL Server &amp; .NET programming</title><subtitle type='html'>This is a blog about SQL Server 2005, and MS. Visual Studio .Net, specially C#.
Here you can find all sort of information, boring articles and other stuff related to the SQL Server and .NET programming world.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2145663522824641736.post-5391138014064202141</id><published>2009-12-19T15:46:00.000-08:00</published><updated>2009-12-19T20:54:14.082-08:00</updated><title type='text'>How to import a query to a text file</title><content type='html'>&lt;div align="justify"&gt;I had long time without posting in this blog but finally I have come up with a usefull tip. The first stop we are making in this travel is to answer a question: &lt;em&gt;&lt;strong&gt;Why would you ever import a query to a text file?&lt;/strong&gt;&lt;/em&gt;&lt;/div&gt;&lt;p align="justify"&gt;There are multiple situations that will require you to send the results of a query to a text file, in example I could mention a recent experience. The company I work for has shut down a distribution center and decided to hand over all the logistic operations to a third party broker, they wanted to get directly connected to our ERP system databases as well as query and push transactions to them, obiusly my immediate answer was &lt;em&gt;"No way!"&lt;/em&gt; so I decided to came up wit the idea of send text files thru FTP with shipping details, that was what these guys needed... maybe is not the best approach but I could not afford to have them screwing up the data in our ERP system either, I currently work with &lt;a href="http://www.solarsoft.com/industries/manufacturing/discrete_manufacturing/automotive.htm"&gt;Solarsoft's IVp 5.2&lt;/a&gt; and I swear to God that it is a really compelx system and has a very hard to understand database structure.&lt;/p&gt;&lt;p align="justify"&gt;So, if you face a situation that ends with you having to download data from your SQL server to a text file, this is the place to look in.&lt;/p&gt;&lt;p align="justify"&gt;&lt;strong&gt;What Tools you’ll need.&lt;br /&gt;&lt;/strong&gt;* A command prompt window&lt;br /&gt;* SQLCMD command line tool&lt;/p&gt;&lt;p align="justify"&gt;&lt;strong&gt;About SQLCMD&lt;/strong&gt;&lt;/p&gt;&lt;p align="justify"&gt;Sqlcmd is a client tool which allows you to connect to a SQL Server Database Engine instance and run script against it. You might be familiar with SQL Server Management Studio (SSMS) to run queries, SSMS uses the .NET Sqlclient but SQLCMD will use an oledb provider. If you require furher information about SQLCMD utilty, don't hesitate to &lt;a href="http://msdn.microsoft.com/en-us/library/ms162773.aspx"&gt;visit this link&lt;/a&gt;.&lt;/p&gt;&lt;p align="justify"&gt;Here are some switches and examples of SQLCMD. I did not post an explanation of every single switch used in this command but I am pretty sure that you will be likely use the following ones:&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;&lt;span style="color:#003300;"&gt;-E&lt;/span&gt;&lt;/em&gt; Will establish a trusted connection to an instance of SQL Server, this one uses the windows integrated authentication, very usefull if you work have an Active Directory domain in your network and want to ease the task of securing connections to SQL Server&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;&lt;span style="color:#003300;"&gt;-S&lt;/span&gt;&lt;/em&gt; This switch indicates the server and instance name to connect, you usually do it in a "servername\instance" fashion&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;&lt;span style="color:#003300;"&gt;-d&lt;/span&gt;&lt;/em&gt; Indicates the database name to connect.&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;&lt;span style="color:#003300;"&gt;-Q &lt;/span&gt;&lt;/em&gt;Runs a query and then exits SQLCMD, if you do not want to exit just use a lower case q.&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;&lt;span style="color:#003300;"&gt;-o &lt;/span&gt;&lt;/em&gt;Redirects the query results to a text file, this switch is the one we are interested on.&lt;/p&gt;&lt;p align="justify"&gt;These are some examples of the above switches and SQLCMD in action&lt;/p&gt;&lt;p align="justify"&gt;* &lt;span style="color:#009900;"&gt;SQLCMD -E -S "sqlserver\instancename" -d "dbname"&lt;/span&gt; - will connect to a sql server instance using trust connection and use the "dbname" database&lt;/p&gt;&lt;p align="justify"&gt;&lt;em&gt;*&lt;/em&gt; &lt;span style="color:#009900;"&gt;SQLCMD -E -S "sqlserver\instancename"&lt;em&gt; -Q "select * from customer" -d "dbname"&lt;/em&gt;&lt;/span&gt;&lt;span style="color:#33ff33;"&gt; &lt;/span&gt;- will connect to a SQL Server instance using trust connection, use the "dbname" database, execute a query and then exit.&lt;/p&gt;&lt;p align="justify"&gt;Finally, this last example will do de trick you want, send the output to a text file, in this example we will run a query, then send it to a text file and exit the utility&lt;/p&gt;&lt;p align="justify"&gt;* &lt;span style="color:#33cc00;"&gt;SQLCMD -E -S "sqlserver\instancename" -d "dbname" -Q "select * from customer" - o "c:\textf.txt"&lt;/span&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;span style="color:#000000;"&gt;Now you can embed this command into scripts or whatever you think will fit the best, enjoy your new finding and happy coding!&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2145663522824641736-5391138014064202141?l=doctorosorio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/5391138014064202141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2145663522824641736&amp;postID=5391138014064202141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/5391138014064202141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/5391138014064202141'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/2009/12/how-to-import-query-to-text-file.html' title='How to import a query to a text file'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2145663522824641736.post-8037375101443554618</id><published>2009-02-06T19:48:00.001-08:00</published><updated>2009-02-06T21:01:21.279-08:00</updated><title type='text'>Linking AS/400 from SQL Server</title><content type='html'>If you ever wanted to link your SQL Server with an AS/400 box, this is how to do so, follow these "easy" instructions and you are done.&lt;br /&gt;&lt;br /&gt;If you want to set up a linked server with AS/400, first things first: You must make sure that your SQL Server has the OLE DB provider for DB2, you can get it for free with this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/DB2OLEDB.exe"&gt;http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/DB2OLEDB.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;If you need to check that the OLEDB provider for DB2 is already installed, open your SQL Server Management Studio Console and browse to &lt;strong&gt;Server Objects\Linked Servers\Providers&lt;/strong&gt;, once it is set up, it will be listed as &lt;strong&gt;DB2OLEDB.&lt;/strong&gt; &lt;p&gt;&lt;br /&gt;Other thing you are going to need is an account in the AS/400 box, this will make SQL Server act as a client for the AS/400, be sure to give only the strictly necessary rights to that account, avoid granting open wide privileges to service accounts, like the one you are creating in your AS/400 in this point. &lt;/p&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;The next step is creating your linked server... finally! open a new query in your Management Studio Console by pressing CTLR+N and copy/paste the following commands, obviusly, you must change the &lt;...&gt; in each parameter accordingly &lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;EXEC master.dbo.sp_addlinkedserver &lt;/div&gt;&lt;div align="justify"&gt;@server = N'&lt;...&gt;', @srvproduct=N'DB2OLEDB', @provider=N'DB2OLEDB', @datasrc=N'&lt;...&gt;', @provstr=N'Provider=DB2OLEDB;Password=&lt;...&gt;;Persist Security Info=True;User ID=&lt;...&gt;;Initial Catalog=&lt;...&gt;;Network Address=&lt;...&gt;;Package Collection=&lt;...&gt;', @catalog=N'&lt;...&gt;'&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;p&gt;Here is a brief explanation of each parameter&lt;br /&gt;&lt;br /&gt;@server= This will be the "internal" name to identify your linked server from others you already have.&lt;br /&gt;@datasrc= this is your AS/400 host name&lt;br /&gt;@catalog= This is the database in AS/400 you want to connect to. If you don't know which database is available, either ask to the AS/400 administrator or use the WRKRDBDIRE command, tipically the entry that has a *LOCAL value in the remote location column, is the database to specify in this parameter... Be &lt;strong&gt;Extremely carefull &lt;/strong&gt;when using this command you can screw up the AS/400 and I would not blame its administrator if he wants to kill you after! maybe I would kill him for leaving commands like this available to anyone, so hands off!.&lt;br /&gt;Password= The AS/400 password for the account created for your linked server&lt;br /&gt;User ID= &lt;span style="color:#000000;"&gt;The AS/400 user ID for the account created for your linked server&lt;/span&gt;&lt;br /&gt;Initial Catalog= same as @catalog&lt;br /&gt;Network Address= the Ip Address for your AS/400&lt;br /&gt;Package Collection= This is a somewhat equivalent to a schema in SQL Server, you must specify the package where the tables you need are located. If you don't know which package collection specify, use the AS/400 command WRKOBJ and take note of the name in the Library column&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I hope this can resolve your problems linking SQL with DB2! &lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2145663522824641736-8037375101443554618?l=doctorosorio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/8037375101443554618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2145663522824641736&amp;postID=8037375101443554618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/8037375101443554618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/8037375101443554618'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/2009/02/linking-as400-from-sql-server.html' title='Linking AS/400 from SQL Server'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2145663522824641736.post-829195663331458981</id><published>2008-06-13T19:46:00.000-07:00</published><updated>2008-06-19T00:47:42.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='connection string'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Return a single row number for each record in a table</title><content type='html'>&lt;div align="justify"&gt;This article is by far smaller than other ones, but it is easier as well and is actually a part of a second one about performing row-by-row operations on a single table... and I hope those articles should be usefull for you. First, Let's considrer the following Query:&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:courier new;color:#009900;"&gt;Select * from Facility&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;p&gt;The results, are these ones, as expected...&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SFM61gyEPaI/AAAAAAAAAC4/-Vk_Y2qtnoA/s1600-h/untitled1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5211573884805201314" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_FvE2liZN33U/SFM61gyEPaI/AAAAAAAAAC4/-Vk_Y2qtnoA/s400/untitled1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;If you run this query in your SSMS (SQL Server Management Studio, if you are unfamiliar with the acronym) , you usually will see every single row in the &lt;span style="font-family:courier new;"&gt;Facility&lt;/span&gt; table, and even in the messages pane there is a little hint of how many rows where selected alongside with all of the results brough by the aforementioned query, but you do not have a "selectable" column that could be used to identify each row. You can think about using a primary key or index, but in this case we are talking about &lt;em&gt;Identifiying a single row&lt;/em&gt; rather than a single record. So, we need to add s&lt;span style="font-family:georgia;"&gt;omethin&lt;/span&gt;g to this query: The &lt;span style="font-family:courier new;"&gt;row_number()&lt;/span&gt; function.&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:courier new;"&gt;row_number() &lt;/span&gt;returns a &lt;strong&gt;bigint &lt;/strong&gt;representing the sequential number of an individual row within a table or a partition of it (we'll discuss this later because it will in fact number in a different way in each case). As you noticed so far, this function is used for sequentially number the rows resulting from a select statement.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;Now, here is an example of a row_number() function:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:courier new;color:#009900;"&gt;Select row_number() over (order by FacilityID) as [Row #],* from Facility&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:georgia;"&gt;Now, By doing this, you will get something like this:&lt;/span&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SFM7U8uLJjI/AAAAAAAAADA/15d4RPSRWI0/s1600-h/untitled1.bmp"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SFM7fcE5OrI/AAAAAAAAADI/T7rkjTa3eoI/s1600-h/untitled1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5211574605096499890" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_FvE2liZN33U/SFM7fcE5OrI/AAAAAAAAADI/T7rkjTa3eoI/s400/untitled1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;As you noticed, the syntax of a &lt;span style="font-family:courier new;"&gt;row_number()&lt;/span&gt; functions includes an &lt;span style="font-family:courier new;"&gt;over&lt;/span&gt; clause, this is part of the function. The &lt;span style="font-family:courier new;"&gt;order by&lt;/span&gt; argument is used to determine the sequential order in which each row is being shown. If we modify our previous example as follows:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:courier new;color:#009900;"&gt;Select row_number() over (order by FacilityName) as [Row #],* from Facility&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;These will be the results:&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SFM-uHKBPmI/AAAAAAAAADQ/x4DHp5rsROg/s1600-h/untitled1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5211578155713773154" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SFM-uHKBPmI/AAAAAAAAADQ/x4DHp5rsROg/s400/untitled1.bmp" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You will now notice the difference between the two examples immediatly! &lt;p&gt;You may be asking yourself "What is the catch with all this stuff??", well, If you want to know do not miss the next part of this article: &lt;strong&gt;The cursor Curse.&lt;/strong&gt; Stay tunned and have fun!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Dr. Osorio&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2145663522824641736-829195663331458981?l=doctorosorio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/829195663331458981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2145663522824641736&amp;postID=829195663331458981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/829195663331458981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/829195663331458981'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/2008/06/return-single-row-number-for-each.html' title='Return a single row number for each record in a table'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FvE2liZN33U/SFM61gyEPaI/AAAAAAAAAC4/-Vk_Y2qtnoA/s72-c/untitled1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2145663522824641736.post-5317892212985940031</id><published>2008-06-02T20:34:00.001-07:00</published><updated>2008-06-02T21:09:10.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='connection string'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Creating a string connection from the scratch</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div align="justify"&gt;Sometimes you need to connect to a certain database or create a connection in your program to a database server. If you are like me, surely more than once you have found yourself struggling with the need of create a connection string… but you do not know the necessary parameters to make possible that connection. But, there is an easy way to put that connection to work.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What Tools you’ll need.&lt;/strong&gt;&lt;br /&gt;* A command prompt window&lt;br /&gt;* The ODBC or OLEDB drivers installed the ones to connect to your database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How to create the connection&lt;/strong&gt;&lt;br /&gt;First, run a command prompt: Click the Start menu, then click run the option, type &lt;span style="font-family:courier new;color:#009900;"&gt;cmd&lt;/span&gt; in the open text box and hit the enter key.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SETDtkx779I/AAAAAAAAACw/8vzLGb7aNKk/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207502256881790930" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_FvE2liZN33U/SETDtkx779I/AAAAAAAAACw/8vzLGb7aNKk/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now you will see a command prompt, by default the command prompt is positioned in your profile’s folder. Let’s change to the desktop folder, so it will be easier to work and locate any files you create.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_FvE2liZN33U/SES9eEx77zI/AAAAAAAAABg/MyUDZ7nd1lU/s1600-h/tsurugi.bmp"&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SES9-Ux770I/AAAAAAAAABo/lbfk2sL5MfY/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207495947574832962" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SES9-Ux770I/AAAAAAAAABo/lbfk2sL5MfY/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;To switch to your desktop directory type &lt;span style="font-family:courier new;color:#009900;"&gt;cd desktop&lt;/span&gt; at the cursor’s position. Once you switched to desktop folder, you will need to create a special file that in fact will contain the connection string you need, to create that file type the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#009900;"&gt;copy con mystring.udl&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_FvE2liZN33U/SES-eEx771I/AAAAAAAAABw/mgZWfuthLK8/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207496493035679570" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_FvE2liZN33U/SES-eEx771I/AAAAAAAAABw/mgZWfuthLK8/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;The cursor will go to the next line, by now, we will leave this file blank so do not type anything here, just hit the F6 key followed by enter. In the picture below this lines you will notice a message saying that the file was successfully created. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SETARUx772I/AAAAAAAAAB4/xmsDzvBWqkg/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207498473015603042" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SETARUx772I/AAAAAAAAAB4/xmsDzvBWqkg/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now you will see a new icon in your desktop (if you have not noticed it) it should look like the picture below, that is a data link file. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_FvE2liZN33U/SETBBEx773I/AAAAAAAAACA/_NvtywxYR7Y/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207499293354356594" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_FvE2liZN33U/SETBBEx773I/AAAAAAAAACA/_NvtywxYR7Y/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;So far, we just created a file but we have not touched your connection srting… be patient, because the next steep is to get your connection string right from that file, but how will we do that if you created an empty file??? Well, first double click the icon I showed you few moments ago in this article, it will pop up a new window similar to this one, for this example, we are going to choose Microsoft OLE DB Provider for SQL Server.. of course you will choose later the appropriate OLE DB driver according to the database server. Now hit next &gt;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SETBlkx774I/AAAAAAAAACI/M9MOvjBsT6w/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207499920419581826" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_FvE2liZN33U/SETBlkx774I/AAAAAAAAACI/M9MOvjBsT6w/s320/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;Now, fill the information in the next page as needed, this is an example of how you would do it for SQL Server using windows integrated authentication, after filling the blanks, make sure to click the Test Connection button. If it successfully connects to your database, click OK.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_FvE2liZN33U/SETBzEx775I/AAAAAAAAACQ/QJw8x725uWA/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207500152347815826" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_FvE2liZN33U/SETBzEx775I/AAAAAAAAACQ/QJw8x725uWA/s320/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;Now right click the same icon an pick the open with… option from the context menu, this will pop up a window to choose an application to open the mystring.udl file. In that window you will choose Notepad and before clicking OK make sure that the checkbox below the program list stays clear. See the image below&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_FvE2liZN33U/SETCOkx776I/AAAAAAAAACY/8XlcAhvkM80/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207500624794218402" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_FvE2liZN33U/SETCOkx776I/AAAAAAAAACY/8XlcAhvkM80/s320/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;Once you clicked OK a notepad window will open and there you will find your connection string. Copy it to your program and modify it as needed. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SETCmUx778I/AAAAAAAAACo/O7ZGRpG13O4/s1600-h/tsurugi.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207501032816111554" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SETCmUx778I/AAAAAAAAACo/O7ZGRpG13O4/s400/tsurugi.bmp" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2145663522824641736-5317892212985940031?l=doctorosorio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/5317892212985940031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2145663522824641736&amp;postID=5317892212985940031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/5317892212985940031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/5317892212985940031'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/2008/06/creating-string-connection-from-scratch.html' title='Creating a string connection from the scratch'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FvE2liZN33U/SETDtkx779I/AAAAAAAAACw/8vzLGb7aNKk/s72-c/tsurugi.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2145663522824641736.post-1520665528314367588</id><published>2008-06-01T19:40:00.000-07:00</published><updated>2008-06-01T21:02:35.295-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Server'/><category scheme='http://www.blogger.com/atom/ns#' term='VMWare'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>The Virtualization paradigm</title><content type='html'>&lt;div align="justify"&gt;Maybe the word "virtualization" does not give out a clue of its actual meaning by itself, and even if it is not clearly defined at all. Some time ago I found an interesting concept about virtualization and now I have several servers running in my home computer as separate computers sharing the same hardware resources, this option is called VMWare and you can find detailed information about it at &lt;a href="http://www.vmware.com/"&gt;http://www.vmware.com/&lt;/a&gt; but in this brief article I will discuss the concept of virtualization used by vmware and how you can get it to work. &lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;&lt;br /&gt;Vmware is a programt that emulates a real computer within your current hardware, this means that &lt;u&gt;it will&lt;/u&gt; consume computer's resources (RAM, Hard Disk space, processing time and so on) needed to have a "real" computer working in your computer and even you will need to "install" an operative system to your new virtual machine. I am not responsible for any consecuence of this behavior.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;strong&gt;Where do I get it?&lt;/strong&gt; &lt;/div&gt;&lt;div align="justify"&gt;Vmware can be downloaded for free at its own website &lt;a href="http://www.vmware.com/"&gt;http://www.vmware.com/&lt;/a&gt; but be aware that this is not a trialware it is really free! and there are also other software solutions in the same web site that are not for free. In the same download page you must fill out a form in order to get your copy of vmware and an activation code that you will need to activate your copy. By now I am not including a picture of the download site since doing so I could have legal problems! , try keeping your activation code on hand, you will need them soon because if you do not have it, you will not be able to run any virtual computer you create in vmware. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;strong&gt;Running Vmware&lt;br /&gt;&lt;/strong&gt;Once you get vmware installed in your computer, let's take a quick look on it. Click the &lt;em&gt;Start&lt;/em&gt; menu on your windows and then point to &lt;em&gt;Run,&lt;/em&gt; type &lt;em&gt;vmware&lt;/em&gt; in the run dialog box, just like the image below&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SENjRkx77pI/AAAAAAAAAAU/Rd_lVQemcCM/s1600-h/Dibujo.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207114747752476306" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SENjRkx77pI/AAAAAAAAAAU/Rd_lVQemcCM/s320/Dibujo.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;Now hit &lt;em&gt;Enter&lt;/em&gt; to execute vmware, and then we'll activate it. Once vmware is running you will get the user interface, depending on which version you got, your screen will look very similar to this one: &lt;/div&gt;&lt;a href="http://2.bp.blogspot.com/_FvE2liZN33U/SENnmUx77rI/AAAAAAAAAAk/Hkxs9msRB5A/s1600-h/Dibujo.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207119502281273010" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_FvE2liZN33U/SENnmUx77rI/AAAAAAAAAAk/Hkxs9msRB5A/s320/Dibujo.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you should click in the vmware host that apply to your scenario, in my case I run the vmware hosts on my personal computer, if it is your same case or you are planning to run the same scenario then you should select &lt;em&gt;Localhost&lt;/em&gt; as your vmware host.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;Activating vmware.&lt;/strong&gt;&lt;/div&gt;&lt;div align="justify"&gt;This step must be taken if this is the first time you have vmware working. Do you remember the activation code you got from the vmware website? well, now it's time to use it! Click the &lt;em&gt;Help&lt;/em&gt; menu and choose &lt;em&gt;enter serial Number. &lt;/em&gt;By doing so, you will get the activation screen where you will enter your activation code. Remember, without an activation code you will not be able to start any virtual machine you create. See the images below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SENqUkx77sI/AAAAAAAAAAs/o7QlLmbFjHg/s1600-h/Dibujo.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207122495873478338" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SENqUkx77sI/AAAAAAAAAAs/o7QlLmbFjHg/s320/Dibujo.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_FvE2liZN33U/SENq0Ex77tI/AAAAAAAAAA0/s7MQArwhLv0/s1600-h/Dibujo.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207123037039357650" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_FvE2liZN33U/SENq0Ex77tI/AAAAAAAAAA0/s7MQArwhLv0/s320/Dibujo.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div align="justify"&gt;Now enter the serial number and all other information needad an click &lt;em&gt;OK&lt;/em&gt;. Your vmware is now ready to go!&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Creating a Virtual Machine&lt;/strong&gt;&lt;/div&gt;&lt;div align="justify"&gt;A virtual machine is in fact too similar to a real computer since it has hardware resources as well, but it's virtual because the hardware resources used here are the ones from your server or personal computer , that is an important saving because if you need a server for running an specific application you are not purchasing extra servers, but the drawback here is that you need a powerfull machine able to resist all the streess comming from the virtual machines. To create a new virtual machine you must run the respective wizard, to start the wizard click on &lt;em&gt;New Virtual Machine&lt;/em&gt;.&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/_FvE2liZN33U/SENvakx77uI/AAAAAAAAAA8/4pU3X7qtbmM/s1600-h/Dibujo.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5207128096510832354" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FvE2liZN33U/SENvakx77uI/AAAAAAAAAA8/4pU3X7qtbmM/s320/Dibujo.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;I will not cover all the specific tasks that you can get done with vmware because this is not an extensive tutorial to use vmware, but if I tell you every detail of using it, what fun will you have without any investigation? the best way to learn a wide array of things is trying by yourself, it's cheap, exiting, and fun!&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;See you Later!!&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;Dr. Osorio &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2145663522824641736-1520665528314367588?l=doctorosorio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://doctorosorio.blogspot.com/feeds/1520665528314367588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2145663522824641736&amp;postID=1520665528314367588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/1520665528314367588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2145663522824641736/posts/default/1520665528314367588'/><link rel='alternate' type='text/html' href='http://doctorosorio.blogspot.com/2008/06/virtualization-paradigm.html' title='The Virtualization paradigm'/><author><name>juggernaut</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_FvE2liZN33U/SENxY0x77wI/AAAAAAAAABI/8tm2cA3pDYY/S220/juggernaut.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FvE2liZN33U/SENjRkx77pI/AAAAAAAAAAU/Rd_lVQemcCM/s72-c/Dibujo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
