Installing Quickstart DB-Samples

Hello

I just installed configsamples.exe with SQL Server 2005 Express Edition. Then I installed the Quickstart Databases "Northwind", "Grocer" and "Pubs".
After that I tried to grant access to the ASPNET-useraccount with command (command copied and pasted from HTML-File "Configurationdetails for MS .NET Framework SDK-Quickstart (in german)):
  1. sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin <ASP.NET-useraccount>"
  2. sqlcmd -E -S (local)\SQLExpress -d Pubs -Q "sp_grantdbaccess <ASP.NET-Benutzerkonto>"
  3. sqlcmd -E -S (local)\SQLExpress -d Pubs -Q "sp_addrolemember 'db_owner', <ASP.NET-Benutzerkonto>"
  4. sqlcmd -E -S (local)\SQLExpress -d NorthWind -Q "sp_grantdbaccess <ASP.NET-Benutzerkonto>"
  5. sqlcmd -E -S (local)\SQLExpress -d NorthWind -Q "sp_addrolemember 'db_owner', <ASP.NET-Benutzerkonto>"
  6. sqlcmd -E -S (local)\SQLExpress -d GrocerToGo -Q "sp_grantdbaccess <ASP.NET-Benutzerkonto>"
  7. sqlcmd -E -S (local)\SQLExpress -d GrocerToGo -Q "sp_addrolemember 'db_owner', <ASP.NET-Benutzerkonto>"
(For <ASP.NET-Benutzerkonto> I entered <computername\ASPNET>) But I always receive the following Error-Message:

Meldung '102', Ebene '15', Status '1', Server 'computername\sqlexpress', Zeile 1
'Falsche Syntax in der Nahe von '<'.'
(wrong syntax near "<")

What's the right syntax for this command exactly My accountname is ASPNET.

Or can I change the default user ASPNET for the Quickstart Samples to another one to try the sql-db connection

Thanks.

Mike



Answer this question

Installing Quickstart DB-Samples

  • Debasish

    try putting it in single quotes. i.e.:

    sp_grantlogin 'orion\aspnet'


  • Daniel Pe&amp;#241;alba

    Remove the "<" and ">". Those are just place holders.


  • DJ Phil

    Hello

    Thanks.

    I just removed the < and > but still receive the same error:

    Meldung '102', Ebene '15', Status '1', Server 'orion\sqlexpress', Zeile 1
    'Falsche Syntax in der nahe von '\'.'

    I entered:

    sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin orion\aspnet"

    Mike

  • Installing Quickstart DB-Samples