We’re currently experiencing a high volume of support requests, which may result in longer response times — Thank you for your patience and understanding.
Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DeltaUK
Engaged Sweeper
Hi,

I've just downloaded and started the upgrade to 3.2. I unzipped and moved the files, stopped the service and loaded the 3.1 to 3.2 sql. When I have executed this, I received Cannot insert "NULL" into table, script failed. If I try to run it again now, I receive there is already object... in database.

Can you suggest anything please??

Thanks

Ed
9 REPLIES 9
Hemoco
Lansweeper Alumni
Is the service running on the server?
Maybe you installed 2 services running on the same port.
nilesf
Engaged Sweeper
Not sure if this is the correct thread.

Upgraded from 3.1 to 3.2. Failed. Uninstalled 3.1 and reinstalled 3.2, succesful except for an error with starting the Lansweeper service. It appeared to be pointing to the old folder location for 3.1. Uninstalled 3.2 and reinstalled agian 3.2 but this time I told the install to put the files in the old folder location (Please note that the old folder location did not exsist prior to this procedure). Now I get an error when testing the LSClient connection from any computer on the network and my dashboard looks completely different from 3.1


Please advise,
Niles
Carlp
Engaged Sweeper
Thanks, the new code worked.
DeltaUK
Engaged Sweeper
Hi,

I've run that new script, worked perfectly

Thanks
Carlp
Engaged Sweeper
I am experiencing the same problem. The following error was given from sql query analyser

Msg 2714, Level 16, State 6, Line 1
There is already an object named 'tblADComputers' in the database.
Msg 1779, Level 16, State 0, Line 2
Table 'tblADComputers' already has a primary key defined on it.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 1781, Level 16, State 1, Line 2
Column already has a DEFAULT bound to it.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'Domain', table 'lansweeper31.dbo.tsysadmins'; column does not allow nulls. UPDATE fails.
Hemoco
Lansweeper Alumni
Carlp wrote:

Msg 2714, Level 16, State 6, Line 1
There is already an object named 'tblADComputers' in the database.


Users with this error can use this script :
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblADComputers]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblADComputers]
GO

CREATE TABLE [dbo].[tblADComputers] (
[Computername] [varchar] (300) NOT NULL ,
[Comment] [varchar] (500) NULL ,
[Company] [varchar] (256) NULL ,
[Description] [varchar] (256) NULL ,
[DNSHostname] [varchar] (500) NULL ,
[Location] [varchar] (500) NULL ,
[OperatingSystem] [varchar] (256) NULL ,
[OperatingSystemServicePack] [varchar] (256) NULL ,
[OperatingSystemVersion] [varchar] (256) NULL ,
[OU] [varchar] (1000) NULL ,
[Lastchanged] [datetime] NOT NULL ,
[sAMAccountType] [varchar] (50) NULL ,
[primaryGroupId] [varchar] (50) NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tblADComputers] WITH NOCHECK ADD
CONSTRAINT [PK_tblADComputers] PRIMARY KEY CLUSTERED
(
[Computername]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tblADComputers] ADD
CONSTRAINT [DF_tblADComputers_Lastchanged] DEFAULT (getdate()) FOR [Lastchanged]
GO


Problem is also fixed in the download
Neptune
Engaged Sweeper
I had a similar problem but it was refeering to the 'tsysadmins' table in the following line in the upgrade SQL script:

ALTER TABLE tsysadmins ALTER COLUMN Domain varchar(256) NOT NULL

I removed the NOT NULL from this command as the table currently has a record for Administrator with a NULL domain (and I'm not sure if this is really needed).

Cheers
Hemoco
Lansweeper Alumni
Neptune wrote:
I had a similar problem but it was refeering to the 'tsysadmins' table in the following line in the upgrade SQL script:

ALTER TABLE tsysadmins ALTER COLUMN Domain varchar(256) NOT NULL

I removed the NOT NULL from this command as the table currently has a record for Administrator with a NULL domain (and I'm not sure if this is really needed).

Cheers

You cannot have a NULL in this field so you need to delete the record first (that's why this is fixed now)
Hemoco
Lansweeper Alumni
Was there anything else except the "Cannot insert NULL into table"?

When you run it a second time you can ignore the "already in database", this is from the part of the script that worked.

Could you try running the script with the sql query analyser to see if it gives a better error.

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now