Open BlueHtml opened 3 days ago
Hello !
Are you using the same version of sqlpage locally and on the remote server ? Are you sure you did not have a sqlpage_files when you started sqlpage that you then deleted ?
The logic in sqlpage is the following:
SELECT 1 from sqlpage_files WHERE last_modified >= @p1 AND path = @p2
If this fails, display the following debug log, and mark the on-database filesystem as unavailable:
[2024-11-27T11:54:19.218Z DEBUG sqlpage::filesystem] Using local filesystem only, could not initialize on-database filesystem. You can host sql files directly in your database by creating the following table:
CREATE TABLE sqlpage_files(path NVARCHAR(255) NOT NULL PRIMARY KEY, contents VARBINARY(MAX), last_modified DATETIME2(3) NOT NULL DEFAULT CURRENT_TIMESTAMP);
The error while trying to use the database file system is: In "autogenerated sqlpage query": The following error occurred while executing an SQL statement:
error returned from database: Invalid object name 'sqlpage_files'.
The SQL statement sent by SQLPage was:
SELECT 1 from sqlpage_files WHERE last_modified >= @p1 AND path = @p2
The error you see seems very strange. If you manage to reproduce it consistently with the latest sqlpage version, I would love to get reproduction instructions. If you have the full verbose logs (including of the time when sqlpage is starting up), that would be useful too!
The sqlpage.exe
program is the same; I only changed the database_url
to connect to the local database
and the server database
.
When connecting to the server database
, the sqlpage::filesystem
log is always missing.
It looks like everything is working smoothly on both sides.
The remote MSSQL instance has a sqlpage_files
table, so it sets up with the on-database filesystem enabled.
The local MSSQL instance doesn’t have a sqlpage_files
table, so it continues without the on-database filesystem.
The logs don’t show any issues, and queries should be processing normally on both sides. Everything seems to be running just as it should. 😊
@lovasoa The remote MSSQL
does not have the sqlpage_files
table. Whenever a request comes in, it reports an error: The sqlpage_files table does not exist
.
I have sent you an email titled SQLPage#718-Logs related to the non-existence of the sqlpage_files table
, which contains detailed logs. Please take a look.
Hi ! I received your email with the logs, and it indeed seems that there is a problem with sqlpage not detecting the absence of the sqlpage_files table on startup. I'll investigate, and may need you again for testing, since I cannot reproduce this issue locally.
Hello, I used the
table
component, and the SQL is as follows:When connecting to the local MSSQL, it works fine. However, when connecting to the MSSQL on the server, it reports an error as follows:
Then I manually created the
sqlpage_files
table (on the server's MSSQL), and it worked fine. However, the local MSSQL did not require creating this table. What could be the reason for this?Version information
windows 10 Simplified Chinese zh-CN
MSSQL 2012
0.31.0
Additional context
The console log is as follows: