1. John Willems
  2. Valentina Studio
  3. Tuesday, March 19 2024, 04:02 PM
  4.  Subscribe via email
I am new to Valentina Studio Pro. I have a connection to a MS SQLServer database. However, VS is not showing me the schema. I can query data, but not see the schema. Since this is important to my dev workflow how do I make it visible.

I can see the schemas for the MySQL db's just not the MS SQLServer databases.

Any help is appreciated.
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello John,

What version of SQL Server is used? So for all databases, the schemas are not shown, right?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
John Willems Accepted Answer
SSMS tells me it is SQLServer 2016
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
John Willems Accepted Answer
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
Sergey Pashkov Accepted Answer
Let's check the Query Log (the last button on the main toolbar)
1. Disconnect from the SQL Server
2. Open the Query Log
3. Click Clear Log
4. Now connect again

On the Query Log tab, you will find all queries executed after connection.
Are there any errors?
How many records were returned for the database query?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 4
John Willems Accepted Answer
I have attached an image and the downloaded QueryLog. I can query data but I cannot see the schema. As I build data objects I need the information about datatype, field length, etc. It severly hampers my use of Valentina Studio Pro.

You will see I did run queries of two tables I know exist in the database I am connected to.

Am I missing a setting or is this a bug that needs fix?

Thanks for the help.

Regards,

John W
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 5
Sergey Pashkov Accepted Answer
So the query to get databases doesn't work.
If you double-click the row with the error - the text of this error will be shown.

What if you try to execute a simpler query, does it work?
SELECT
database_id AS ID,
CONVERT(NVARCHAR(128), DB.name) AS 'Database',
DB.user_access_desc AS 'AccessMode'
FROM sys.databases DB
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 6
John Willems Accepted Answer
The query you gave gives a list of the databases. See image
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 7
Sergey Pashkov Accepted Answer
Thank you, so partially it works.
The query used in the application is complex - it retrieves backup-related data, for example.
I think the error can be related to permissions.

Is it a database hosting service?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 8
John Willems Accepted Answer
It is one hosting service. Other tools can connect to is and show the schema just not Valentina. For what its worth, it is the same hosting service that has my MySQL databases that I connect to, they show their schema as well.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 9
John Willems Accepted Answer
It is on a hosting service. Other tools can connect to it and show the schema, but not Valentina. For what its worth, it is the same hosting service that has my MySQL databases. When I connect to them, they show their schema as well.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 10
Sergey Pashkov Accepted Answer
The problem is in some data we retrieve in the main query (other tools may do it differently).
I think we'll modify it in the next version.

Could you please check the error in the Query Log? (double-click on the failed database query)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 11
John Willems Accepted Answer
I have attached an image of the query and the what I assume to be the error in Red text. I like Valentina. I hope this gets resolved soon. Below is the query in text form

Thanks

John W
-----------------------------------------------

SELECT database_id AS ID,
CONVERT(NVARCHAR(128), DB.name) AS 'Database',
(SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = 'rows') AS DataFilesCount,
(SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = 'rows') AS DataSize,
CONVERT(VARCHAR(20), create_date, 103) + ' ' + CONVERT(VARCHAR(20), create_date, 108) AS CreationDate,
-- last backup
ISNULL((SELECT TOP 1
CASE type WHEN 'D' THEN 'Full' WHEN 'I' THEN 'Differential' WHEN 'L' THEN 'Transaction log' END + ' – ' +
LTRIM(ISNULL(STR(ABS(DATEDIFF(DAY, GETDATE(),backup_finish_date))) + ' days ago', 'NEVER')) + ' – ' +
CONVERT(VARCHAR(20), backup_start_date, 103) + ' ' + CONVERT(VARCHAR(20), backup_start_date, 108) + ' – ' +
CONVERT(VARCHAR(20), backup_finish_date, 103) + ' ' + CONVERT(VARCHAR(20), backup_finish_date, 108) +
' (' + CAST(DATEDIFF(second, BK.backup_start_date,
BK.backup_finish_date) AS VARCHAR(4)) + ' '
+ 'seconds)'
FROM msdb..backupset BK WHERE BK.database_name COLLATE DATABASE_DEFAULT = DB.name COLLATE DATABASE_DEFAULT ORDER BY backup_set_id DESC),'-') AS LastBackup,
DB.user_access_desc AS 'AccessMode'
FROM sys.databases DB
-----------------------------------------------
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 12
Sergey Pashkov Accepted Answer
Hello John,

Thank you, now it's clear how to fix it.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 13
Sergey Pashkov Accepted Answer
Hello John,

A new version is available for download.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 14
John Willems Accepted Answer
Thank you for quickly fixing this! I need to do a lot of SQLServer work in some of my applications and it this will be of great help.

Regards,

John W
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 15
  • Page :
  • 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