Results 1 to 15 of 15
  1. #1
    Join Date
    Apr 2004
    Posts
    13

    What User name and Password ?

    I have just installed MSDE (first time ever).
    I am now trying to work with it (first time ever)
    Most tools I now find I need to use, ask simple questions like:

    Name of Server:
    User Name:
    Password:

    I know the name of the server - fantastic
    I did not specify a user name or password when installing -

    WHAT DOES IT WANT ????

    ie, How do you specify the user name and password AFTER installing the server.

    GO ME ????????

    PS - 'sa' and blank does not cut it at all.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    14,910
    The tool should also give you a choice like "Trusted Connection", meaning that it will use Windows Authentication. This is probably what you want.

    -PatP

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,566
    Otherwise, you can create a SQL Server login and password through the Enterprise Manager utility.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,397
    MSDE does not have an EM .....

    Got ya there !!!
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,566
    Ooogh! Right in the gut.

    I'm diein' boys. I'm comin' ta see ya, momma!

    'Tis not as deep as a well, nor wide as a church door, but tis enough! 'Twill serve!

    Ack, ack, ack......blech.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    LOL...

    It's been a rough week I guess...

    And I've only been here 2 days....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Apr 2004
    Posts
    13
    Guys - thanks for the response !

    Do I have to do something the following, therefore (found this hunting around).

    By the way - I am so new to this I don't know how to run this script under program control (I use VB 6).

    I found a tool which will let me run scripts manually, but I gues I really need to run them under VB 6. Assistance here would be immeasurably appreciated - thanks.

    SAMPLE SCRIPT TO CREATE A USER AND LOGON (is this OK to use - how?)

    if exists (select * from master.dbo.syslogins where loginname=N'thisuser')
    exec sp_droplogin 'thisuser'
    if not exists (select * from master.dbo.syslogins where loginname = N'thisuser')
    BEGIN
    declare @logindb nvarchar(132), @loginlang nvarchar(132)
    select @logindb = N'harshal', @loginlang = N'us_english'
    if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
    select @logindb = N'master'
    if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
    select @loginlang = @@language
    exec sp_addlogin N'thisuser', null, @logindb, @loginlang
    if not exists (select * from dbo.sysusers where name = N'thisuser' and uid < 16382)
    EXEC sp_grantdbaccess N'thisuser', N'harshal'
    exec sp_defaultdb 'thisuser','harshal'
    exec [sp_addrolemember] 'db_owner','thisuser'
    exec SP_ADDUSER 'thisuser','harshal'
    end

  8. #8
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    That script will work. You can also access the database by:

    server = (local)
    username = sa
    password = ''

    You need to change the password to something soon.

    sp_password [ [ @old = ] 'old_password' , ]
    { [ @new =] 'new_password' }
    [ , [ @loginame = ] 'login' ]

    EXEC sp_password '','new_password','sa'
    GO
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  9. #9
    Join Date
    Apr 2004
    Posts
    13
    I can get nothing but "not associated with trusted ....."
    See attached

    However if I use Trusted NT Connection I can always get in

    So is the idea to get in using the Trusted NT connection, and while in, change the User and Password ?
    Attached Thumbnails Attached Thumbnails logonerror.jpg  

  10. #10
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    Just install SP3a. It will take care of the password change for you if you haven't put in a password for sa. Do you know what authentication method you chose when you ran setup? Windows Authentication or Mixed Authentication?
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  11. #11
    Join Date
    Apr 2004
    Posts
    13
    This is how I installed MSDE


    Goto Command prompt

    cd\MSDERelA (where the install was)

    Then run setup SAPWD="AStrongSAPwd"

    Notice - No user name, just a Strong Password

    I followed this direction from the notes with MSDE installation

    Definitely no mention to use a User Name

    I am very happy to kill it all and start again if I can install with a user name and password, but don't know how.

    All the forthcoming help is much appreciated.

  12. #12
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    14,910
    I'm pretty sure that you can:

    1) Log into NT as an Administrator
    2) Connect to MSDE using a Trusted Connection (use OSQL.EXE from character mode if you can)
    3) change the sa password using:
    PHP Code:
    EXECUTE sp_password NULL'Newpw=42''sa' 
    At that point you should be good to go.

    -PatP

  13. #13
    Join Date
    Apr 2004
    Posts
    13
    I log on using Trusted Nt Connection

    I have run

    EXECUTE sp_password NULL, 'Newpw=42', 'sa'

    and the system says password change successful


    I then try to connect using


    User = sa
    Password = 42

    still get the same "not trusted .........." message

    what does it want?

  14. #14
    Join Date
    Apr 2004
    Posts
    13
    THIS I BELIEVE IS THE ANSWER

    NOTE THE CHANGE IN THE REGISTRY REQUIRED IMMEDIATELY AFTER INSTALLATION - LOGINMODE= 0 !!!!

    THIS WAS SUBMITTED ON "CRASH'S SITE" BY MEMBER APC




    MSDE 2000 is more or less the same as SQL Server 2000, and is totally (as far as I know) compatible. The main differences are a 2Gb limit per database - which isn't really a limit for hosting a portal - and the biggest difference - no GUI. MSDE 2000 is an excellent, if not preferable alternative to Access for those that have their own servers, and is easily and seamlessly migrateable to SQL Server 2000 should the need arise. MSDE 2000 is free to use, and therefore therefore price is not a barrier for hosting. MSDE will also host multiple databases, each of 2Gb. I created a few without any problem, but the limit I think is 16 databases. But again, anyone hosting 16 SQL databases should be very seriously considering migrating to SQL Server 2000 for all hosting.

    For those not used to, or not wanting to use the command line interfaces, another excellent possibility is to download the full SQL Server 2000 trial software, or get the CDROM from Microsoft, and use the excellent SQL Server 2000 Enterprise Manager GUI which also connects directly to MSDE 2000 for full database and service management. In many ways this is a much better option, as it provides a much faster and simpler and wider range of control over MSDE 2000 for maximum productivity. Note: you will still need to do stages 2) and 3) below before using SQL Server 2000 Enterprise Manager, in order to enable SQL authentication.

    Here are some links:

    MSDE 2000 info:

    http://www.microsoft.com/sql/techinf...0/MSDE2000.asp

    MS SQL Server 2000 evaluation including Enterprise Manager GUI:

    http://www.microsoft.com/sql/evaluat...al/default.asp

    For those wanting to use the command line, here are the step by step instructions to install MSDE 2000 using the command line:

    The inputs are in blue and the server responses are in red.

    Obviously you will need to use your own values for "server_name", "new_password", "database_name", "login_name", "login_password".

    Please note: the following was modified and simplifed on Sunday morning 11/08/2002 (08/11/2002 US date). Please use these stages:

    1) Download the full MSDE install from:

    http://www.asp.net/webmatrix/download.aspx?tabindex=4

    Install on server.

    2) Open "regedt32"

    3) Do the following:

    "HKEY_LOCAL_MACHINE : SOFTWARE : Microsoft : MSSQLServer : MSSQLServer"

    Double click on the entry that says "LoginMode" and set the value to "0"

    Note:

    "0" (zero) = logon using Mixed Mode Authentication (required)
    "1" (one) = logon using Integrated or NT authentication only

    Restart your server for these changes to take effect.

    4) Login to OSQL:

    From the Windows command prompt enter:

    osql /U sa /P /S server_name

    Press return and you should get:

    1>

    5) Add SA password:

    1> sp_password NULL, 'new_password'
    2> go

    Password changed.

    6) Add a login:

    1> sp_addlogin 'login_name', 'login_password'
    2> go

    New login created.

    7) Add login as a user:

    1> sp_adduser 'login_name'
    2> go

    Granted database access to 'login_name'.

    8) Grant database create and manage permissions to user:

    1> grant create database, create tables to login_name
    2> go

    9) Now exit, by entering "exit" and the command prompt and login again as login_name:

    1> Exit

    osql /U login_name /P login_password /S server_name

    1> create database database_name
    2> go

    The CREATE DATABASE process is allocating 0.63 MB on disk 'database_name'.
    The CREATE DATABASE process is allocating 0.49 MB on disk 'database_name_log'.

    10) The database is now ready to access by setting the above details in the config.asp connection string.

    In future, login to osql from the command line with:

    osql /U login_name /P login_password /S server_name

    Where "login_name" can either be "sa" for all MSDE 2000 admin functions, or alternatively any login/user that you have created for each database on the system - all with their associated passwords. SA is the highest level login (system administrator), and each database will have to be managed by its database owner who will be the login/user who created the database. I suggest that you create a new login/user for each database.


    The connection string for config.asp will be as follows in blue:

    strDBType = "sqlserver"
    'strDBType = "access"
    'strDBType = "mysql"

    '## Make sure to uncomment one of the strConnString lines!
    'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/fpdb/snitz_forums_2000.mdb") '## MS Access 97 using virtual path
    'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 97
    'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/tools/snitz_forums_2000.mdb") '## MS Access 2000 using virtual path
    'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/snitz3315/tools/snitz_forums_2000.mdb") '## MS Access 2000 using virtual path
    'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\fpdb\snitz_forums_2000.mdb;" '## MS Access 2000
    strConnString = "driver={SQL Server};server=server_name;uid=login_name;pwd=logi n_password;database=database_name" '## MS SQL Server 7
    'strConnString = "driver=MySQL;server=SERVER_NAME;uid=MYSQL_USER;pw d=PASSWORD;database=DATABASE_NAME" '## MySQL

  15. #15
    Join Date
    Apr 2004
    Posts
    13
    Well - its part of the answer ....

    It has serious problems in that many of the suggested lines just don't work! (Sorry to be leading other pople astray - the blind leading the blind ..)

    However, the key point was to set LoginMode which worked - horray!!!!

    Now I am attempting to login to a database I have created on my MSDE Server but just can't get it to work

    Using VB6, I keep getting Run Time error 424 - Object required

    I think the problem is in the Project References - I've tried the lot ( I think)

    Default References
    ADO 2.7
    SQLDMO
    OLE DB Simple Provider Library

    Which one have I missed (or have I got the wrong version of MDAC)

    As always - am greatful for your help!



    Private Sub Command1_Click()

    Dim cnn As New ADODB.Connection
    With ccn
    .ConnectionString = "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=Testdb; UserID=sa; PWD=;"
    .Open
    If Not .State = adStateOpen Then
    MsgBox "UNABLE TO CONNECT"
    End If
    End With

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •