Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrleansQuery not exists #8962

Closed
Pragrammist opened this issue Apr 29, 2024 · 8 comments
Closed

OrleansQuery not exists #8962

Pragrammist opened this issue Apr 29, 2024 · 8 comments

Comments

@Pragrammist
Copy link

I attempted to integrate ADO.net into a project that included MSSQL and PostgreSQL. I got the same error as OrleansQuery does not exist; I saw sql scripts that are in here:
https://learn.microsoft.com/en-us/dotnet/orleans/host/configuration-guide/adonet-configuration
and I notice SQL scripts have no OrleansQuery table for MS SQL and Postgres. I can't find on the internet how to solve it.
I also tried to run scripts manually and got the same error.

@Pragrammist
Copy link
Author

System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'OrleansQuery'.

"Npgsql.PostgresException (0x80004005): 42P01: "orleansquery" relation does not exist" (translated error message)

@Pragrammist
Copy link
Author

Pragrammist commented Apr 29, 2024

builder.Host.UseOrleans(static siloBuilder =>
{
siloBuilder.UseLocalhostClustering();
siloBuilder.AddAdoNetGrainStorage("users", options =>
{
options.Invariant = "System.Data.SqlClient";
options.ConnectionString = @"
Data Source=(localdb)\MSSQLLocalDB;
Initial Catalog=Orleans;
Integrated Security=True;
Database=Orleans
";
});
siloBuilder.AddAdoNetGrainStorage("users2", options =>
{
options.Invariant = "Npgsql";
options.ConnectionString = @"Server=localhost;Port=5432;User Id=postgres;Password=postgres;Database=postgres;";
});
});

@Pragrammist
Copy link
Author

Pragrammist commented Apr 29, 2024

PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.3"
PackageReference Include="Microsoft.Orleans.Persistence.AdoNet" Version="8.1.0"
PackageReference Include="Microsoft.Orleans.Server" Version="8.0.0"
PackageReference Include="Npgsql" Version="8.0.2"
PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"
PackageReference Include="System.Data.SqlClient" Version="4.8.6"

My packages

@Joshhua5
Copy link

You need to run the setup scripts on the database, to create the table and stored procedures used.

https://learn.microsoft.com/en-us/dotnet/orleans/host/configuration-guide/adonet-configuration

@Pragrammist
Copy link
Author

I ran that scripts and they are not working

@Pragrammist
Copy link
Author

Pleas, First read and then answer

@Joshhua5
Copy link

You might want to look at that again, because the main script creates the OrleansQuery table.

https://github.com/dotnet/orleans/blob/main/src/AdoNet/Shared/PostgreSQL-Main.sql#L34

@Pragrammist
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants