SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Haidong Ji

Add to Technorati Favorites Add to Google
February 2006 - Posts

Connect to SQL Server 2005 using Query Analyzer, osql, and isql

By Haidong Ji in Haidong Ji 02-16-2006 1:10 AM | Categories: Filed under:
Rating: (not yet rated) Rate this |  Discuss | 1,115 Reads | 52 Reads in Last 30 Days |no comments

In this post, I talked about some potential permission issues facing average users regarding Sql Server Management Studio (SSMS) reports.

When you manage Sql Server 2000 servers with SSMS, those reports will not be available, for the simple reason that most of those reports are based on DMVs, which are newly introduced in SQL Server 2005 and do not exist in Sql Server 2000.

However, you will not be able to manage SQL Server 2005 servers with Sql Server Enterprise Manager that comes with Sql Server 2000. When you try, you will get this error message:

To connect to this server you must use Sql Server Management Studio or Sql Server Management Objects (SMO)

If you are so inclined, you can still connect to SQL Server 2005 Servers with Sql Server 2000 tools like Query Analyzer, osql, and isql. I’ve tested all three and they all work. That should not be a surprise, if you think about it, since they are all standard database applications.

In addition, the object browser in Query Analyzer works also. However, you will not see all the new views, assemblies, and other newly introduced SQL Server 2005 objects.


Creative ways for ego boost

By Haidong Ji in Haidong Ji 02-10-2006 1:45 AM | Categories: Filed under: ,
Rating: (not yet rated) Rate this |  Discuss | 500 Reads | 69 Reads in Last 30 Days |2 comment(s)

The book I co-wrote on Sql Server Integration Service (formerly know as DTS) has been selling pretty well at Amazon. I received 10 copies from the publisher a few weeks ago. I must confess that I felt pretty good seeing my own picture on the book cover. It should reach bookstores soon. However, don’t use that as an excuse for not ordering it at Amazon or other online bookstores :-)

This is the first book I wrote that is available at a brick and mortar bookstore. My articles have appeared on three volumes of Best of SqlServerCentral.com book, but those are only available at SqlServerCentral.com. All 3 are real books, in the sense that they all have ISBN numbers and catalogued by Library of Congress. But this one is “available whereever books are sold” (For my readers living outside the US, that is a typical US promotional phrase. I use it here for humor.)

When I wrote my chapter, I chatted frequently with fellow co-author Andy Leonard. Thanks Andy for the comradeship. Andy joked then that when the book comes out, he would go to the bookstore and wonder around where it is shelved and see if anybody recognizes him. I thought that was pretty funny. I told it to my better half, she suggested I should do the same, except that I should bring a friend along. The friend can play the role of bystander-turned-admirer, if nobody recognizes me :-(

Fellow co-author Jason Gerard suggested that when the book reaches his neighborhood bookstores, he would go there frequently and make sure it is displayed in a prominent position.

The other day I brought a copy of it to work, Maria commented: “You probably should cut off your picture on the cover. You should remain anonymous in case you are harassed by fans on the street in the future!”

Got to love it!


Silent install / Command line install of SQL Server 2005 Part 4

By Haidong Ji in Haidong Ji 02-06-2006 1:03 AM | Categories: Filed under:
Rating: (not yet rated) Rate this |  Discuss | 1,342 Reads | 67 Reads in Last 30 Days |no comments

The fourth time is a charm!

I've documented my experients with SQL Server 2005 silent / command line install in 3 previous posts. They all failed. To be fair, I tested it using September CTP, not the finalized RTM release.

After I got the RTM last November, I loaded it on my laptop, so I could test all my code and screen shots for the book we wrote. I did command line install and it was successful. However, to load things quickly, I used ADDLOCAL=All. So every SQL Server 2005 component was installed.

The other day I had a chance to test it one more time using RTM on a server. And it was successful. I am really happy about that.

For this Server, I just want to load the database engine, Integration Service, and AdventureWorks sample database. I do not want the extra stuff, such as Analysis Services, Replication, full-text, Notification Services, Reporting Services, etc.. So, for ADDLOCAL, which defines what you want to install, I just have SQL_Data_Files,SQL_DTS,SQL_AdventureWorksSamples. SQL_Data_Files is a child component of Sql Server Engine. The rule of silent install is that if any of the child component is installed, then the parent component is automatically installed also. Note that you need to separate each component with comma, and do not put spaces between them. They are case-sensitive.

Here is the full content of my SqlInstall.ini file. As mentioned earlier, it only installs Sql Server database engine, SSIS, and AdventureWorks sample database. You may need to modify the PIDKEY to make it work:

[Options]
;--------------------------------------------------------------------
;--------------------------------------------------------------------
; PIDKEY specifies the Product Identification Key.
; Usage: PIDKEY=ABCDE12345FGHIJ67890KLMNO

; NOTE: PIDKEY is not required for SQL Server Express Edition.
; NOTE: Do not include "-" in the PIDKEY.

;PIDKEY=

ADDLOCAL=SQL_Data_Files,SQL_DTS,SQL_AdventureWorksSamples

INSTANCENAME=MSSQLSERVER

SQLBROWSERACCOUNT="NT AUTHORITYSYSTEM"
SQLBROWSERPASSWORD="NT AUTHORITYSYSTEM"

SQLACCOUNT="NT AUTHORITYSYSTEM"
SQLPASSWORD="NT AUTHORITYSYSTEM"

AGTACCOUNT="NT AUTHORITYSYSTEM"
AGTPASSWORD="NT AUTHORITYSYSTEM"

SQLBROWSERAUTOSTART=0
SQLAUTOSTART=1
AGTAUTOSTART=1

SECURITYMODE=SQL
SAPWD=SomeStrongSaPassword

SAMPLEDATABASESERVER=.

Note also that sqlcmd is installed with this minimal installation of Sql Server engine, which I like.

I then went to the command line. I went to the directory where the setup.exe is located. I then typed:

setup.exe /settings c:\LocationOfIniFile\SqlInstall.ini /qn

I will write an article on this and hopefully it will be published at SqlServerCentral.com.

Update: Reader Johan Bijnens from Belgium sent me the following comments, which I agree 100%. He also shared his ini files. Since there are so many, I will not post them here. Thanks so much Johan for sharing:

Installing a default instance works fine, however one will have to know before install if IIS is activates with .net selected if one wants to install ADDLOCAL=All

When installing instances, it also works fine, but performing an uninstall is tricky because you'll have to specify exactly which components you want to uninstall.

Aparently it does not take into account that there still are other instances on the server so if you don't restrict an uninstall, it also uninstalls the tools, ..