1. John Willems
  2. Valentina Studio
  3. 金, 4月 05 2024, 06:32 PM
  4.  メールで購読
In working with the Document Generator in current the version, it appears to not work (limited) with MS SQL server. It only generates limited info for the first table in the database. Effectively one page.

When in MySQL it appears to generate all the information you expect, many pages of information.

There are not any error messages that I have seen.

Suggestions?

Regards

John Willems
コメント
There are no comments made yet.
John Willems 承諾済みの回答
FYI: The report does not run from the Menu item. I have to manually open it and execute it.

It does create the documenation I was looking for. It gives me a base of 100 plus pages which is a time saver.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
On the Start Page, right-click the schema_report project and click Reload.
After downloading a new version, this project will be opened. You can just close it and use the context menu of the database.

STRING_AGG is no longer used in any of the queries.
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello John,

We plan to fix this error today. I’ll add instructions on how to update this project within Valentina Studio.
コメント
There are no comments made yet.
John Willems 承諾済みの回答
Is there any progress on getting the documentation for SQL Server working? I have a use for it.

Thanks,

John W
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello John,

Thank you. It is now clear that one function is not available in the SQL Server being used by the hosting service, and we will need to rebuild the query without it.
コメント
There are no comments made yet.
John Willems 承諾済みの回答
This is the summary from running the report.

====== Report_MSSQL ======
!Page 1: SELECT
sys_idx.*,
( SELECT STRING_AGG( COL_NAME( sys_idx_cols.object_id,sys_idx_cols.column_id ),', ' ) FROM sys.index_columns sys_idx_cols WHERE is_included_column = 0 AND sys_idx_cols.index_id = sys_idx.index_id AND sys_idx_cols.object_id = sys_idx.object_id ) columns,
( SELECT STRING_AGG( COL_NAME( sys_idx_cols.object_id,sys_idx_cols.column_id ),', ' ) FROM sys.index_columns sys_idx_cols WHERE is_included_column = 1 AND sys_idx_cols.index_id = sys_idx.index_id AND sys_idx_cols.object_id = sys_idx.object_id ) included_columns
FROM
sys.indexes sys_idx
WHERE object_id = $1
AND index_id > 0
!Page 1: Binds: ( 1655012977 )
!Page 1: [FreeTDS][MSSQL Server] , Server SQL5090, Line 4
'STRING_AGG' is not a recognized built-in function name.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Thank you. It appears to be a different error; the subquery is empty for some reason.

I've attached a project in which the configuration dialog contains a button to view log messages.

This dialog is shown upon opening the project and can also be started manually (Form_Config).
添付ファイル
参照
  1. https://www.dropbox.com/scl/fi/9z7qop71vslzw6npppd5n/schema_report_ms_logs.mov?rlkey=0cfeew32gz6bqv2s3px1636sk&dl=0
コメント
There are no comments made yet.
John Willems 承諾済みの回答
I was not able to change the datasource for the report using the method shown. I went to the report and changed the data source for it. I hope that would give the same result. I then ran the report and saw the following errors reported. See image.
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello John,

I've added a video on how to diagnose an error in the generation of documentation in the latest version, 13.10.

1. Open the `schema_report` project on the start page.
2. Edit the datasource to point to any database on the target SQL Server.
3. Preview a report. If there is an error, it will be displayed at the bottom.

The built-in functions are not yet recognized.
添付ファイル
参照
  1. https://www.dropbox.com/scl/fi/p8h81ue50kpk61uknwde9/vs_schema_report_mssql.mov?rlkey=x5n7xigfistyn17vqjed6c4n6&dl=0
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Thank you, so queries to the system tables should work.
We'll create a test build with improved error processing, making it easier to diagnose the problem.
コメント
There are no comments made yet.
John Willems 承諾済みの回答
From what I can tell those queries run without error and return records. Here is an image of the Query Log. (See image) I ran them as a group and then individually.
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
The documentation is built on top of Valentina Reports engine. It uses a separate connection, so there are no entries in the Query Log.

As a first step, we can check if some tables are not accessible to the user.

For the table report, the following tables are queried:

SELECT * FROM sys.check_constraints;
SELECT * FROM sys.indexes;
SELECT * FROM sys.index_columns;
SELECT * FROM sys.triggers;
SELECT * FROM sys.foreign_keys;
SELECT * FROM sys.foreign_key_columns;

Are all of the queries executed, or are there some errors?
コメント
There are no comments made yet.
John Willems 承諾済みの回答
After I clear the Query Log and then run the documentation generator there are not any queries recorded.

I have attached the saved .pdf documenation that is recorded. Address is the first table in the database. You will see there are only the columns for the table and then it stops the process.

Suggestions are appreciated.

John W
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
One of the queries fails, need to find it.
What information is printed last for the first table?
コメント
There are no comments made yet.
John Willems 承諾済みの回答
Thank you I can work with disabling the checks.

Can you tell me how to get the Documentation Generator to run against a MS SQL database? It was the item that opened this thread.

Regards,

John W
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
The information about these functions is missing from the system tables, so they are not loaded automatically.
We will add them manually in the next version.

To avoid distractions, unresolved identifier checks can be disabled using "A" button.
添付ファイル
コメント
There are no comments made yet.
John Willems 承諾済みの回答
It appears that Valentina generally does not like MS SQL Server. It shows errors for common SQL functions.

Again hosted SQL Server 2016, current version of Valentina.

Suggestions?

John Willems
添付ファイル
コメント
There are no comments made yet.
John Willems 承諾済みの回答
Its a hosted server and SQL Server v2016. Same setup as the issue with the schema not showing.

John W
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello John,

What SQL Server version is used?
Is it own or hosted server?
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories