SqlServer2K5_BOL.msi

In July I obtained and installed the dvd's SQLServer 2005 Developer Edition CTP so I assume this is the June 2005 version and VS2005  Team Suite Beta 2.

I tried downloading the above file for Sql server 2005 Books online and it fails saying I need .Net 2.0  (  seems VS2005 installed .Net 2.0 Beta )

I am also having trouble understanding some concepts ( I am relatively new at this )

Why do I even need this SQL Server 2005 dvd   Seems that VS2005 installed SQLEXPRESS  -  When I look at the SQL Server Configuration Manager, I see MSSQLSERVER and SQLEXPRESS among other things( only SQLEXPRESS is running and that is what appears in connection strings ie:

"Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\NORTHWND.MDF;
Integrated Security=True;User Instance=True
"


Now when I use VS2005 to create a install file for an application ( I include the database in the install file ), What do I have to do to run this on another computer as far as SQL is concerned   Do I have the other computer download a SQL desktop engine ( is this a server ) or a redstributable SQL package or find out if they have an existing SQL server on their machine, then what do I do with the connection string   -  seems that I tried starting MSSQLSERVER then changing SQLEXPRESS to MSSQLSERVER in the connection string on my machine and it did not work. 

also I am trying to work throught the first ASP.NET 2.0 lab:

http://pluralsight.com/fritz/webcasts.aspx

It says to use SQLQueryAnalyzer to create and populate a database -

I cannot find any such thing with what I have installed Why would this be   What good is this SQL dvd that I have   What does it give me besides headaches

Could someone please help me try to clear the fog  ,  thanks



Answer this question

SqlServer2K5_BOL.msi

  • SteBirk

    thanks Gail for your help

    I was assured on another forum that the SQL Express will do what I want. So I am kind of still stuck at the point that got me off on this wild tangent and desparate search for the past week. That is creating an SQL database in VS2005.

    When I right-click Data Connections in Server Explorer, then Create New Sql Server Database, it brings up a window that first asks for a Server Name.  I tried entering the computer name ( which is verified to be "barbara" by doing a right-click on My Computer and then Properties ). I  cannot get by this  - the error message that I get is "Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding".  Now I have had no trouble working with the virtual labs to connect to the Northwind database using the wizards to make the connection, however what I have to do for this is:

    1) Data | Add New Data Source...

    2) Select Database then  Next

    3) Click New Connection

    4)  Where it says Data Source and has "Microsoft SQL Server (SqlClient)" I click Change...   -  this avoids having to fill in the Server name window  -  I then select Microsoft SQL Server Database File,  then it just requires me to enter the database so I browse to where Northwind is.  

    This produces the following connection string:

    "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;
    Integrated Security=True;User Instance=True
    "

    It is not exactly what I expected to see but it was working.

    I am suspecting I should be using "Microsoft SQL Server (SQLClient)" in the above steps but I cannot get this to work.  If I could, would this clear up the mystery of creating databases   would it produce a different connection string then what kind of connection string would be required if the application is installed on another computer

    thanks for your help

    -Barb


    5

  • Matthew Trunnell

    thanks Gaile

    I got BOL to work now with that download

    I tried to create a database by doing what you said  when I select "create new SQL server database" it brings up a display asking for a server to connect to before you can enter a database name.  This window is blank  - I tried putting in SQLEXPRESS  and also refresh but I just get an error ( timeout )  -  Should there be something for a Server name already in the window   I don't know what I can do to get by this.

    I am still quite confused on how to proceed with what I need to do about using SQL in my application. 

    The SQL Server 2005 Developer Edition CTP does not seem to have the functionality that the BOL talks about.

    I just want to be able to develop a little desktop application with J# or C# with an SQL database that can be installed and run another computer. I have been waiting for VS2005 to come out and have been learning it by working through the virtual labs even thought they are for VS2003, I have been adapting.
     
    I am now wondering if I would be better off buying VS2003 and using SQL Server 2000.  Do I need to purchase SQL separately for what I am intending to do
     
    Wish I could just reach a point that allow me to get by this SQL mystery.

    thanks

    thanks

  • akaricky1

    The Database Connection dialog box is asking for the physical name of the server on which SQL Server or SQL Express is installed, not the name of the SQL Server service.  If you're not sure what your server name is, click Start, right-click My Computer and select Properties. Select the Computer Name tab.

    I'm not an application developer, but what you're describing can be done with either VS 2003 and either SQL Server 2005 or SQL Server 2000 or VS 2005 and SQL Server 2005. In SQL Server 2000, the equivalent to SQL Express is called MSDE (Desktop Engine). It's a free product that can be downloaded from here: http://www.microsoft.com/technet/prodtechnol/sql/2000/technologies/msde2000.mspx.
    I've been told that VS 2003 can connect to SQL Server 2005 databases, however VS 2003 will not work with some SQL Server 2005 features like CLR procedures and functions or user-defined data types.  

    The Visual Studio forum (http://forums.microsoft.com/msdn/default.aspx ForumGroupID=6)  would be a good resource for your application questions.



  • PeterDamgaard

    thank you for your response  -  sorry for the delay  -  I had to get away to the country away from computers for a while to clear my mind 

    Anyway the BOL I downloaded was: 

    SQL Server 2005 Community Technology Preview (CTP) September 2005: Books Online

    at this url:

    http://www.microsoft.com/downloads/details.aspx FamilyId=ADC75E35-7245-4038-9B8A-B8FABAEC16DA&displaylang=en

    My eventual goal is to write some business applications  ( for example managing rental inventory ) but first I need to get through some sort of immense amount of learning. I thought about waiting for VS2005 to come out but now I wonder if I should just purchase VS2003. I am worried now that potential customers will not be able to run the application without upgrading. 

    It seems also that SQL is handled quite differently in VS2005 with the database being included in the project and with quite different fuctionality for data adapters and data sets. I have been trying to work through the virtual labs using VS2005 and one lab demonstrates splitting out or layering the data access from other areas of the application  -  seems this is more difficult to do with VS2005 especially when you drag a dataset element to a form and you get all of the data controls added to the form.

    For now though I would like to know what I need to do to get SQL functionality with the VS2005 that I have installed and  getting BOL to work.  Will the sqlcmd
    utility let me create and populate a database  

    Seems I am having great difficulty finding some sort of "learning the basics".  


    Would I need to purchase both VS2005 and SQL Server 2005 to get to where I want to be.  or perhaps should I be looking at VS2003 and SQL Server 2000.

    thanks


  • Max Andrade

    thank you very much - that worked
  • Ajay Kalhan

    Try just hardcoding the user name to "BARBARA\ASPNET" The instance name doesn't work in the Windows User name.  Apparently when they wrote the demo, they weren't using a named instance.
  • ericrtodd

    I'm using a newer version of visual studio than you are so some of this might not be quite the same.  There are two kinds of SSQL Server instances supported by SQL Server Express - the normal SQL Server Instance and a User Instance which is a special instance that runs as the user who is signed on and is used by Visual Studio because it allows VS to treat the database as a file and move it around as necessary.  When you create a database through the Add Data Source menu as you are, it creates a database in the normal SQL Express instance.  The VS tools by default won't see this database because they look in the User Instance (hence the "User Instance = TRUE" in your connection string).  To create a database in the user instance, go into the project you are creating and add a new item.  When it comes up with a list of item types, select SQL Server database.  This database should now show up in your project and the Visual Studio tools should be able to manipulate it. 

    If you really want to create a database through the data menu, specify .\sqlexpress for the server name.

  • Karretje

    thank you very much, I think I can move on now

    I am trying to do some Virtual Labs ( Fritz Onion ) -the very first one says to use SQLQueryAnayzer and run a couple of scripts.  the first script is:

    /******************************/
    /**** Drop/Create Database  ***/
    /******************************/
    IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'introaspdotnet')
      DROP DATABASE introaspdotnet
    GO

    CREATE DATABASE introaspdotnet
    GO

    USE introaspdotnet
    GO

    --Grant ASPNET access and dataread/write permissions
    DECLARE @ASPNETUserAccount NVARCHAR (255)
    SET @ASPNETUserAccount = @@SERVERNAME + '\ASPNET'

    IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = @ASPNETUserAccount)
      EXEC sp_grantlogin @ASPNETUserAccount
    IF NOT EXISTS (SELECT * FROM dbo.sysusers WHERE name = @ASPNETUserAccount)
      EXEC sp_grantdbaccess @ASPNETUserAccount

    EXEC sp_addrolemember N'db_datareader', @ASPNETUserAccount
    EXEC sp_addrolemember N'db_datawriter', @ASPNETUserAccount
    GO

    CREATE TABLE movies (
      movie_id            INT IDENTITY(1,1) NOT NULL CONSTRAINT pk_movies PRIMARY KEY CLUSTERED,
      title               NVARCHAR(64) NOT NULL,
      release_date        DATETIME NOT NULL
    )
    GO 

    CREATE TABLE reviews (
      review_id    INT IDENTITY(1,1) NOT NULL CONSTRAINT pk_reviews PRIMARY KEY CLUSTERED,
      movie_id     INT NOT NULL CONSTRAINT fk_reviews_movies FOREIGN KEY (movie_id) REFERENCES movies (movie_id),
      summary      VARCHAR(64) NOT NULL,
      rating       INT NOT NULL,
      review       NVARCHAR(512) NOT NULL,
      reviewer     NVARCHAR(64) NULL
    )
    GO




    I am attempting to use sqlcmd to run this by:

    sqlcmd -S barbara\sqlexpress  

    then I copy and paste the script.
     

    It gives me an error, seems to
    be having a problem with the @ASPNETUserAccount which gets the value "BARBARA\SQLEXPRESS\ASPNET"

    what is very odd is I was expecting to see an ASPNET user on the system according to what I have read  - could something be amiss on my machine

    I do not know what to do about this.

    thanks

    -Barb



  • emilioml

    You've got a lot going on. Let me try to answer some of your questions. 

    Getting BOL to work.
    The version of .NET Framework 2.0 that shipped with your DVD is older than the version of .NET Framework 2.0 that is required for the Community Technology Preview (CTP) September 2005 Books Online.  Rather than update to the newer .NET Framework bits (which will be incompatible with your beta version of VS), I suggest that you download the June 2005 Books Online from here: http://www.microsoft.com/downloads/details.aspx FamilyID=f0d182c1-c3aa-4cac-b45c-bd15d9b072b7&DisplayLang=en. This download should work with your existing version of .NET Framework 2.0.

    What I need to do to get SQL functionality with the VS2005 that I have installed.
    Visual Studio does install SQL Server Express by default. As Michael explained in his post it does not contain all the SQL Server features, but it should certainly provide enough to get you through your learning curve. 

    It sounds like you have VS installed correctly and can make a database connection to your local server that has SQL Express. 
    Can you do the following steps

    1. From Visual Studio tool bar, select View and then select Server Explorer.
    2. From Server Explorer, right-click Create New SQL Server Database
    3. Enter the name of your server and a name for the new database.
    Server Explorer should show your new empty database.
    4. Expand the new database, right-click Tables and select Add New Table.
    You can define your tables using the VS interface, add indexes, insert data etc.

    Will the sqlcmd utility let me create and populate a database  
    SQLcmd accepts any valid Transact-SQL statement, so you can certainly write CREATE DATABASE, CREATE TABLE and INSERT statements to create and populate a database.  However, since you have Visual Studio installed, this seems like the hard way to do this. Using the GUI available in Visual Studio seems a simpler approach.  Alternatively, if you also install SQL Server Developer edition,  you can use the SQL Server Management Studio (SSMS) tool that comes with that edition. SSMS is built on VS so the interface should look remarkably similar. 

    Hope this helps get you a bit further down the road.



  • Wim_M

    Make life easy on yourself. Most database tasks can be done with the sqlhelper. It is a very nice class and very easy to use.

    http://aspnet.4guysfromrolla.com/articles/070203-1.aspx


  • rickdom

    I will address the areas I can answer right now and get back to you with app deployment info:

    * Where did you download the BOL msi from  You should have a version of BOL with the June CTP. Did you want a more up to date version

    * The dvd contains Developer Edition. Developer Edition includes all of the functionality of SQL Server 2005 Enterprise Edition, but is licensed for use as a development and test system, not as a production server. Express Editition does not contain all SQL Server functionality -- it is free and can be redistributed (subject to agreement), and functions as a client database, as well as a basic server database.

    * Query Analyzer is a tool available with SQL Server 2000. It has been superseded by Query Editor, which is available from SQL Server Management Studio. For more information, see the topic "Writing, Analyzing, and Editing Scripts with SQL Server Management Studio" in BOL. At this time, you cannot connect to Express Edition with Management Studio. You can use the command-line utility sqlcmd. For more information, see the topics "sqlcmd Utility" and "Using the sqlcmd Utility" in BOL.


    Michael Blythe
    Technical Writer
    SQL Server Replication

    ---------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.


  • SqlServer2K5_BOL.msi