+ Post New Thread
Results 1 to 6 of 6
Home Access Plus+ Thread, Can anyone tell me the length and Field Types for the Logon Tracker SQL table. in Projects:; The create database failed and I now can't logon to HAP anymore. I am getting the error message String or ...
  1. #1

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    912
    Thank Post
    202
    Thanked 80 Times in 74 Posts
    Rep Power
    52

    Can anyone tell me the length and Field Types for the Logon Tracker SQL table.

    The create database failed and I now can't logon to HAP anymore.

    I am getting the error message
    String or binary data would be truncated. The statement has been terminated.

    This is one of many errors, so near yet so far away.

    Is there any way of re-running the SQL table creater. Also what are the SQL permissions supposed to be, I have created the HAP user in SQL.

    Any help would be appreciated.

  2. #2

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    Open the hapConfig.xml file, change the provider back to XML.

    Drop the database and recreate it

  3. Thanks to nickbro from:

    Davit2005 (29th February 2012)

  4. #3

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    912
    Thank Post
    202
    Thanked 80 Times in 74 Posts
    Rep Power
    52
    Thanks for quick response.

    We are using v7.9.0105.2130

    We don't seem to have the ~/app_data/hap.sql to create the tables. I have created the HAP user as documented, I've done a bit of SQL database building before but no a lot.

    This is the current error message when I run the upgrade to covert from XML2SQL

    Cannot open database "hap" requested by the login. The login failed.
    Login failed for user 'IIS APPPOOL\HAP'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Cannot open database "hap" requested by the login. The login failed.
    Login failed for user 'IIS APPPOOL\HAP'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SqlException (0x80131904): Cannot open database "hap" requested by the login. The login failed.
    Login failed for user 'IIS APPPOOL\HAP'.]
    System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +5009598
    System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning() +234
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
    System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +35
    System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
    System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
    System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
    System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
    System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
    System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
    System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +524
    System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
    System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +479
    System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +108
    System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
    System.Data.SqlClient.SqlConnection.Open() +125
    System.Data.Linq.DataContext.SubmitChanges(Conflic tMode failureMode) +378
    HAP.Data.SQL.Tracker.UpgradeFromXML() +702
    HAP.Web.Tracker.XML2SQL.upgrade_Click(Object sender, EventArgs e) +12
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
    System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +112
    System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  5. #4

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    SQL Server Management Console
    Security
    Logins
    Right Click
    New Login
    Search
    IISApp Pool\HAP
    Search the local machine
    ok
    User Mappings
    Tick the HAP Database
    Select db owner role
    Ok

  6. #5

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    912
    Thank Post
    202
    Thanked 80 Times in 74 Posts
    Rep Power
    52
    Thanks again, think we are getting there, the end users will love it like I do (hope).

    Within the app_data folder I can't find the XML.SQL as per documentation '4. Execute ~/app_data/hap.sql to create the tables'

    hence when I run the upgrade I get the error 'Invalid object name 'dbo.TrackerEvents'.'

    When looking in the HAP database on the SQL I can only see the System Tables.

    Regards,
    David

  7. #6

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    Sorry about that, seems that Codeplex isn't syncing it.

    Here's the correct script
    Code:
    USE [hap]
    GO
    /****** Object:  Table [dbo].[WebTrackerEvents]    Script Date: 02/29/2012 15:30:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[WebTrackerEvents](
        [id] [int] IDENTITY(1,1) NOT NULL,
        [DateTime] [datetime] NOT NULL,
        [Username] [nvarchar](50) NOT NULL,
        [ComputerName] [nvarchar](50) NOT NULL,
        [EventType] [nvarchar](50) NOT NULL,
        [IP] [nvarchar](50) NOT NULL,
        [Browser] [nvarchar](50) NOT NULL,
        [OS] [nvarchar](50) NOT NULL,
        [Details] [nvarchar](max) NOT NULL,
     CONSTRAINT [PK_WebTrackerEvents_1] PRIMARY KEY CLUSTERED 
    (
        [id] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[TrackerEvents]    Script Date: 02/29/2012 15:30:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[TrackerEvents](
        [id] [int] IDENTITY(1,1) NOT NULL,
        [LogonDateTime] [datetime] NOT NULL,
        [Username] [nvarchar](50) NOT NULL,
        [ComputerName] [nvarchar](50) NOT NULL,
        [LogoffDateTime] [datetime] NULL,
        [domainname] [nvarchar](50) NOT NULL,
        [ip] [nvarchar](50) NOT NULL,
        [logonserver] [nvarchar](50) NOT NULL,
        [os] [nvarchar](50) NOT NULL,
     CONSTRAINT [PK_TrackerEvents_1] PRIMARY KEY CLUSTERED 
    (
        [id] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO

  8. Thanks to nickbro from:

    Davit2005 (29th February 2012)



SHARE:
+ Post New Thread

Similar Threads

  1. New ISP - With Static IPs... Can anyone tell me subnet mask?
    By BackCat3 in forum Wireless Networks
    Replies: 11
    Last Post: 24th June 2011, 05:13 PM
  2. Replies: 11
    Last Post: 20th May 2008, 01:19 AM
  3. Can anyone show me their VLE setup?
    By Butuz in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 23rd April 2008, 12:15 PM
  4. Can anyone help me...?
    By wwwmessenger in forum IT News
    Replies: 23
    Last Post: 29th November 2007, 02:07 PM
  5. Can anyone tell me why... [Adobe]
    By indiegirl in forum General Chat
    Replies: 3
    Last Post: 27th June 2006, 06:46 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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