cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
paprita
Champion Sweeper
I've upgrade SQL from 2000 to 2005 version using backup/restore procedure.
Then I've reinstalled lansweeperservice on a server and web site on another server (I've tryed both 3.5.1 and 3.5.2 beta versions).

Now situation is:
- db seems to run correctly;
- lsmanage.exe run correctly (I can see the db);
- lansweeperservice.exe can't start due to login error (Cannot connect to database, check your config file, service will be stopped Cannot open database "lansweeperdb" requested by the login. The login failed.
Login failed for user 'lansweeperuser'.)
- web site doesn't work due to login problem too as follow:

System.Data.SqlClient.SqlException: Cannot open database "lansweeperdb" requested by the login. The login failed.
Login failed for user 'lansweeperuser'.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Cannot open database "lansweeperdb" requested by the login. The login failed.
Login failed for user 'lansweeperuser'.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()

What's the problem?

In attach web.config and Lansweeperservice.exe.config
1 ACCEPTED SOLUTION
paprita
Champion Sweeper
After all we found a way to solve this problem:

- delete lansweeper schema (databases\lansweeperdb\security\schemas)
- delete lansweeperuser (databases\lansweeperdb\security\users)
- delete lansweeperuser (security\logins)
- create lansweeperuser (security\logins)
- create lansweeperuser (databases\lansweeperdb\security\users)
- create lansweeper schema (databases\lansweeperdb\security\schemas)

Now it seems to go properly but I'm not sure to see any improvement passing from SQL 2000 to 2005 ...

View solution in original post

21 REPLIES 21
Hemoco
Lansweeper Alumni
Do you get an error when you run it? or command completed successfully
paprita
Champion Sweeper
Lansweeper wrote:
Do you get an error when you run it? or command completed successfully


command completed successfully
Hemoco
Lansweeper Alumni
try from the sql execute console:

alter view web30OScount AS SELECT     TOP 100 PERCENT ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned') AS OS, COUNT(dbo.tblComputers.Computername) AS Total
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
GROUP BY ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
ORDER BY COUNT(dbo.tblComputers.Computername) DESC, ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
paprita
Champion Sweeper
Lansweeper wrote:
try from the sql execute console:

alter view web30OScount AS SELECT     TOP 100 PERCENT ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned') AS OS, COUNT(dbo.tblComputers.Computername) AS Total
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
GROUP BY ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
ORDER BY COUNT(dbo.tblComputers.Computername) DESC, ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')


Nothing good ...
Hemoco
Lansweeper Alumni
change to this

SELECT     TOP 100 PERCENT ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned') AS OS, COUNT(dbo.tblComputers.Computername) AS Total
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
GROUP BY ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
ORDER BY COUNT(dbo.tblComputers.Computername) DESC, ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
paprita
Champion Sweeper
Lansweeper wrote:
change to this

SELECT     TOP 100 PERCENT ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned') AS OS, COUNT(dbo.tblComputers.Computername) AS Total
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
GROUP BY ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')
ORDER BY COUNT(dbo.tblComputers.Computername) DESC, ISNULL(dbo.tblOperatingsystem.Caption, 'Not scanned')


I tryed to make this change but when I do anything else (like execute or save) the old code come back instead of the new one.
I tryed with a new view, put inside the new code but it was the same thing.

I tryed to give all permission and enter as local administrator but nothing change ...

Any idea?
Hemoco
Lansweeper Alumni
You will need to change the stored procedure "web30OScount"
paprita
Champion Sweeper
Lansweeper wrote:
You will need to change the stored procedure "web30OScount"


I found dbo.web30OScount but I'm not the "King of SQL" ... anyone can help me, please?
Hemoco
Lansweeper Alumni
That's how it should be