<?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-31233783</id><updated>2011-08-07T23:26:12.777+05:30</updated><title type='text'>SqlInk</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31233783.post-116221599016663969</id><published>2006-10-30T19:15:00.000+05:30</published><updated>2006-10-30T19:16:30.176+05:30</updated><title type='text'>Linked Servers for data from another database</title><content type='html'>To select data from another server using MS SQL Server, you have to add it as a linked server, using the following stored procedures.&lt;br /&gt;&lt;br /&gt;EXEC sp_addlinkedserver &lt;br /&gt; @srvproduct= 'SQL Server'&lt;br /&gt; ,@server= 'srvname' &lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;EXEC sp_addlinkedsrvlogin @rmtsrvname = 'srvname' &lt;br /&gt;     , @useself = 'FALSE' &lt;br /&gt;     , @rmtuser = 'username'&lt;br /&gt;     , @rmtpassword = 'password'&lt;br /&gt;GO&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-116221599016663969?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/116221599016663969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=116221599016663969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/116221599016663969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/116221599016663969'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/10/linked-servers-for-data-from-another.html' title='Linked Servers for data from another database'/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115915546335929872</id><published>2006-09-25T09:05:00.000+05:30</published><updated>2006-09-25T09:07:43.366+05:30</updated><title type='text'></title><content type='html'>Migrating data from MS Access to SQL Server is quite simple using the Windows Clipboard. Open the MS Access table and select all the rows. In SQL Server, remove any conflicting rows and disable the identity value generation for all columns, if you'd like to maintain the same ID numbers. Then, open the table, click on the left of the new row and paste!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115915546335929872?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115915546335929872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115915546335929872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115915546335929872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115915546335929872'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/09/migrating-data-from-ms-access-to-sql.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115642914273287094</id><published>2006-08-24T19:46:00.000+05:30</published><updated>2006-08-24T19:49:02.740+05:30</updated><title type='text'></title><content type='html'>Installing Visio 2003 after SQL Server 2005 causes problems with Maintenance Plans (when creating manually, without the Maintenance Plan Wizard) due to an older XML DLL file. The solution is to install Service Pack 2 for Visio 2003 (not to be confused with the Office 2003 Service Pack 2).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115642914273287094?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115642914273287094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115642914273287094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115642914273287094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115642914273287094'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/installing-visio-2003-after-sql-server.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115589639713626865</id><published>2006-08-18T15:44:00.000+05:30</published><updated>2006-08-18T15:49:57.136+05:30</updated><title type='text'></title><content type='html'>I should've posted this link in my last post, but it didn't cross my mind. Check out:&lt;br /&gt;&lt;a href="http://www.sqlteam.com/item.asp?ItemID=8003"&gt;http://www.sqlteam.com/item.asp?ItemID=8003&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I also read recently that when using @@IDENTITY to get the value that was inserted in an identity column, you may get an incorrect value if the table has a trigger defined. That's when SCOPE_IDENTITY is a better choice.&lt;br /&gt;&lt;br /&gt;IDENT_CURRENT can be used to get the last identity that was inserted into a table, irrespective of the connection. For more, browse over to:&lt;br /&gt;&lt;a href="http://www.sqlteam.com/item.asp?ItemID=319"&gt;http://www.sqlteam.com/item.asp?ItemID=319&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115589639713626865?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115589639713626865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115589639713626865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115589639713626865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115589639713626865'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/i-shouldve-posted-this-link-in-my-last.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115589589805889215</id><published>2006-08-18T15:36:00.000+05:30</published><updated>2006-08-18T15:41:38.066+05:30</updated><title type='text'></title><content type='html'>Today we came up with this really interesting scenario. We've got a table that has just one column, and that column happens to be an identity column. Try whatever you will, a regular INSERT statement will not work.&lt;br /&gt;&lt;br /&gt;You cannot do any of the following:&lt;br /&gt;INSERT INTO table_name() VALUES()&lt;br /&gt;INSERT INTO table_name(colA) VALUES(default)&lt;br /&gt;INSERT INTO table_name(colA) VALUES(null)&lt;br /&gt;INSERT INTO table_name(colA) VALUES(1)&lt;br /&gt;&lt;br /&gt;...so, any guesses?&lt;br /&gt;&lt;br /&gt;To solve this issue, you've got to use INSERT with the DEFAULT VALUES clause as follows:&lt;br /&gt;INSERT INTO table_name DEFAULT VALUES&lt;br /&gt;&lt;br /&gt;To enable the insertion of explicit values in an identity column, you can set IDENTITY_INSERT to ON.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115589589805889215?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115589589805889215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115589589805889215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115589589805889215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115589589805889215'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/today-we-came-up-with-this-really.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115588836853284205</id><published>2006-08-18T13:35:00.000+05:30</published><updated>2006-08-18T13:36:08.543+05:30</updated><title type='text'></title><content type='html'>I can't really think of what I should be doing as a DBA, apart from backup, now that all the database tables have been created.&lt;br /&gt;&lt;br /&gt;Since I'm in a development environment and have just 6 users, I've been using activity monitor and there isn't really much activity here.&lt;br /&gt;&lt;br /&gt;Also, I have no idea when I should be using which, so here's a little poem:&lt;br /&gt;&lt;br /&gt;Roses are red,&lt;br /&gt;Violets are blue,&lt;br /&gt;the DBA hasn't a clue,&lt;br /&gt;Whether to use a function or a view.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115588836853284205?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115588836853284205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115588836853284205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115588836853284205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115588836853284205'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/i-cant-really-think-of-what-i-should.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115588141005500860</id><published>2006-08-18T10:57:00.000+05:30</published><updated>2006-08-18T11:40:10.150+05:30</updated><title type='text'></title><content type='html'>Today, I was asked to create a table containing all the U.S. states and state codes. At first, I thought I would have to type it all, but then realised that they installed MS Office for me yesterday. I used MS Word to (automagically) convert the text into a table, saved it in MS Excel. Then, using Microsoft Business Intelligence Development Studio, I imported the data into an MS SQL Server database. I just love SQL Server for that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115588141005500860?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115588141005500860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115588141005500860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115588141005500860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115588141005500860'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/today-i-was-asked-to-create-table.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115582044536196163</id><published>2006-08-17T18:32:00.000+05:30</published><updated>2006-08-17T18:44:05.630+05:30</updated><title type='text'></title><content type='html'>When programmers have coding &amp; naming standards, database administrators should have them too. Well, that's what I'm trying to come up with.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For Naming&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Naming items with initial caps and then capitalizing individual words within the name and eliminating spaces is a pretty good way to name database objects. Underscores and hyphens should be avoided because developers would find that harder to type than regular alphabets. With MS SQL Server, this naming convention is pretty good but for Oracle, it would be a bit of a hassle since SQL * Plus isn't case sensitive (anything you type is treated as upper case) unless you use quotes (single for CHAR, VARCHAR, TEXT, ...; double for database object names).&lt;br /&gt;&lt;br /&gt;Abbreviations such as ID (for Identity or Identifier) should again follow the rule above - Initial caps followed by lower case, like so: "Id"&lt;br /&gt;&lt;br /&gt;Underscores can be used if they really do enhance readability (such as for single-letter abbreviations), but only for non-key columns, since they don't have to be typed by developers very frequently.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For Coding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just as with developers, commenting and indenting play an important role. You wouldn't want to be the guy reading through hundreds of uncommented and unindented lines, so why should you put anyone else in that position?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Final Thoughts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Standard and Policies are often suggestions (unless they state that they are regulatory) and you should use your discretion or tailor your own set of standards and policies. Either way, they should be consistent with those of the people working with you rather than treating it as a matter of 'style',&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115582044536196163?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115582044536196163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115582044536196163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115582044536196163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115582044536196163'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/when-programmers-have-coding-double.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115580582174159091</id><published>2006-08-17T14:26:00.000+05:30</published><updated>2006-08-17T14:40:22.573+05:30</updated><title type='text'></title><content type='html'>As a DBA for a development environment, particularly one without any feathers to show for experience, you would probably have to deal with several different DBMSes. Although I prefer to work with Oracle, I was assigned to a team that uses Microsoft SQL Server 2005. This version is quite user-friendly compared to the previous versions, as long as you follow the step-by-step guides; if you stray from it, it's likely you'll be wondering why something didn't work as the error messages can be quite cryptic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One of the things that Oracle can do for you within a development environment is help in finding unused objects. The MONITORING USAGE clause and the V$OBJECT_USAGE view are what you would be using. Once you are done, don't forget to use NOMONITORING USAGE, else performance will take a hit.&lt;br /&gt;&lt;br /&gt;To do the same on SQL Server, you would probably have to devise some method of your own. To track write operations, you can use Triggers to update another table. For read operations, if you use Stored Procedures or Functions, you could perhaps modify the code. If that isn't an option, you would probably have to rely on the SQL Server Profiler and 3rd party utilities.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When moving from Oracle to SQL Server, you could probably take some time off and work with T-SQL as it is different from PL/SQL. As long as you remember that this is new ground you're covering, you'll find it fun and easy to write T-SQL.&lt;br /&gt;&lt;br /&gt;Note: PostgreSQL is a really good alternative to Oracle. You'll have to perform intensive tests as it isn't suitable for a production environment but PL/pgSQL is so close to PL/SQL that porting code shouldn't be too much of a hassle. But why PostgreSQL when Oracle has announced that Oracle 10g Express Edition will be available for free?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115580582174159091?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115580582174159091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115580582174159091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115580582174159091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115580582174159091'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/as-dba-for-development-environment.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115572507542020069</id><published>2006-08-16T16:09:00.000+05:30</published><updated>2006-08-16T16:14:35.430+05:30</updated><title type='text'></title><content type='html'>Today, I had to prepare a document containing all the tables and their column data types. At first, I was going to do it by hand, but then thought I could use the system tables to get it working.&lt;br /&gt;&lt;br /&gt;The following is the T-SQL that I wrote to automate the process for me. I just copied the output and pasted it into MS Word.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;USE PaHub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DECLARE c1 CURSOR FOR SELECT [name], [object_id] FROM sys.all_objects WHERE type_desc='USER_TABLE'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DECLARE @tabname VARCHAR(200), @tabid VARCHAR(200)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;OPEN c1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FETCH NEXT FROM c1 INTO @tabname, @tabid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;WHILE (@@FETCH_STATUS=0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   --PRINT @tabname + '  ' + @tabid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   PRINT 'Table: ' + @tabname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   DECLARE c2 CURSOR FOR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     SELECT [name], [system_type_id], CASE [system_type_id]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         WHEN 167 THEN '(' + CAST( max_length  AS VARCHAR(10)) + ')'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         ELSE ''&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         END&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         AS tempsizetxt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         FROM sys.all_columns WHERE object_id=@tabid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     OPEN c2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     DECLARE @colname VARCHAR(200), @coltype INT, @typename VARCHAR(200), @typesizetxt VARCHAR(200)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     FETCH NEXT FROM c2 INTO @colname, @coltype, @typesizetxt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     WHILE (@@FETCH_STATUS=0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       SELECT @typename=UPPER([name]) FROM sys.types WHERE system_type_id=@coltype&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       PRINT '  ' + @colname + ' ' + @typename + @typesizetxt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       FETCH NEXT FROM c2 INTO @colname, @coltype, @typesizetxt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     END&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     CLOSE c2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     DEALLOCATE c2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   END&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   PRINT '---'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   FETCH NEXT FROM c1 INTO @tabname, @tabid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; END&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CLOSE c1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DEALLOCATE c1&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115572507542020069?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115572507542020069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115572507542020069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115572507542020069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115572507542020069'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/today-i-had-to-prepare-document.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115512472512821153</id><published>2006-08-09T17:26:00.000+05:30</published><updated>2006-08-09T17:28:45.140+05:30</updated><title type='text'></title><content type='html'>After reading about SQL Server 2005's Try-Catch block, I used the syntax:&lt;br /&gt;&lt;br /&gt;BEGIN CATCH TRAN_ABORT&lt;br /&gt;  { sql_statement | statement_block }&lt;br /&gt;END CATCH&lt;br /&gt;&lt;br /&gt;Apparently, the TRAN_ABORT keyword has been removed... either that or it exists in a different form because it shows up as a syntax error; removing the TRAN_ABORT gives me the desired output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115512472512821153?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115512472512821153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115512472512821153' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115512472512821153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115512472512821153'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/after-reading-about-sql-server-2005s.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115510672346302870</id><published>2006-08-09T12:27:00.000+05:30</published><updated>2006-08-09T12:33:09.866+05:30</updated><title type='text'></title><content type='html'>Just today, someone from the Network computing team changed the hostname on my SQL Server and I spent a while trying to figure out why the clients couldn't connect. I got a:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)&lt;br /&gt;Error Number: 53&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I spent about half an hour, looking up the settings in Configuration Manager and even did a restart (much like we do with Windows) but it still didn't work. I then decided to check the hostname after staring at various elements of the login dialog box when I finally got to the root of the problem.&lt;br /&gt;&lt;br /&gt;It's more of a bad practice on part of the network computing guy who came by at night and switched names without documentation or notification of the change.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115510672346302870?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115510672346302870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115510672346302870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115510672346302870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115510672346302870'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/just-today-someone-from-network.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115503995250495200</id><published>2006-08-08T17:48:00.001+05:30</published><updated>2006-08-08T17:55:52.506+05:30</updated><title type='text'></title><content type='html'>I installed SQL Server 2005 Express (the one included with Visual Studio 2005 Professional) and for getting Visual Studio to connect to SQL Server, I've had to manually enter the named pipe (it took me a while to figure that out). Perhaps Microsoft ought to get the two products to communicate via Shared memory or TCP/IP.&lt;br /&gt;&lt;br /&gt;Either way, I'm not too good with Names Pipes... never really knew any product that used it till I came across SQL Server so I thought it must've been something that has been put out of service like NetBIOS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115503995250495200?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115503995250495200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115503995250495200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503995250495200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503995250495200'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/i-installed-sql-server-2005-express.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115503950836088817</id><published>2006-08-08T17:48:00.000+05:30</published><updated>2006-08-08T17:48:28.360+05:30</updated><title type='text'></title><content type='html'>When I installed Oracle 9i and Forms 6i on my notebook PC, an old Compaq Presario 2132EA that has been retired in favor of the new IBM Thinkpad T60, Forms 6i installed the Oracle 8i client and wouldn't run on Windows XP SP2 - it would crash whenever I tried to connect to the database. Perhaps there's some compatibility issue there.&lt;br /&gt;&lt;br /&gt;Has anyone else had similar problems?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115503950836088817?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115503950836088817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115503950836088817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503950836088817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503950836088817'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/when-i-installed-oracle-9i-and-forms.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115503907773621873</id><published>2006-08-08T17:34:00.000+05:30</published><updated>2006-08-08T17:41:17.736+05:30</updated><title type='text'></title><content type='html'>Moving from Oracle 9i to MS SQL Server 2005 was cool, as an administrator, as I didn't have any query syntax to memorize and everything works via a simple GUI. SQL Server Management Studio is like the Oracle Database Configuration Assistant and Oracle Enterprise Manager combined into one. I suppose Oracle has added a whole lot of features into Oracle Enterprise Manager with the release of 10g, so it's unfair to compare Oracle 9i to MS SQL Server 2005, a newer product... comparing Oracle 9i to MS SQL Server 2000 and Oracle 10g to MS SQL Server 2005 is not something I can do since I've never used Oracle 10g and haven't spent much time with SQL Server 2000.&lt;br /&gt;&lt;br /&gt;I just performed Transaction Log Shipping, Backup &amp; Recovery using only the GUI!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115503907773621873?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115503907773621873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115503907773621873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503907773621873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503907773621873'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/moving-from-oracle-9i-to-ms-sql-server.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31233783.post-115503861567117485</id><published>2006-08-08T17:28:00.000+05:30</published><updated>2006-08-08T17:33:35.680+05:30</updated><title type='text'></title><content type='html'>Greetings!&lt;br /&gt;&lt;br /&gt;SQL Ink is a blog about databases and databases is what I shall blog about... sounds a little silly, but sounds very dramatic when said in a Shakespeare-like tone.&lt;br /&gt;&lt;br /&gt;I've had an OCP for Oracle database administration and an OCA for Oracle PL/SQL development but haven't used Oracle ever since I got certified so here I am, rediscovering my certification roots. I'm also venturing into the use of MS SQL Server. &lt;br /&gt;&lt;br /&gt;Being a trainee DBA is ultra cool since we get plenty of time to catch up with reading. However, we don't always have access to databases - I have access to MS SQL Server 2005 on my workstation at work, and access to Oracle 9i on my (old) notebook PC at home. Either way, I think I ought to dedicate more time and that's when I thought a blog would help me concentrate on getting things right and as a kind of a database administrator's journal.&lt;br /&gt;&lt;br /&gt;That's what is blog is all about; it will probably evolve into something else, but nothing forseeable right now. Until my next blog, I'd like to wish everyone a happy blogging experience and a good bright shiny nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31233783-115503861567117485?l=sqlink.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlink.blogspot.com/feeds/115503861567117485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31233783&amp;postID=115503861567117485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503861567117485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31233783/posts/default/115503861567117485'/><link rel='alternate' type='text/html' href='http://sqlink.blogspot.com/2006/08/greetings-sql-ink-is-blog-about.html' title=''/><author><name>Nitin Reddy Katkam</name><uri>http://www.blogger.com/profile/09612217398194148324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Vel48i2U1Yg/SUkxX5ePzKI/AAAAAAAAAGc/cNTDMVaNLKY/S220/03062008(003).jpg'/></author><thr:total>0</thr:total></entry></feed>
