Thursday, September 30, 2021

[google-cloud-sql-discuss] Import on SQL Server hanging

Hi,

I tried to import SQL dump on two SQL Server 2017 instances (one Standard and one Express).

Dumps are ~400Mo, but both instances are stuck in the import process for  > 24 hours.

I can't restart / stop the instances. Or stop the import operation. How can I force to delete the SQL Server instances (I was for test purpose only).

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/35146b17-d82d-4d15-91e1-29599473ec5bn%40googlegroups.com.

Tuesday, September 28, 2021

[google-cloud-sql-discuss] Re: CloudSQL SQLServer Change Database Owner

I am also find solution for  structural engineer Adelaide. Guide me on how can I resolve this problem.

On Friday, 24 September 2021 at 18:17:57 UTC+5 fi...@omnyhealth.com wrote:
Is there a way to change the database owner for a SQL Server database?

Running sp_changedbowner allows this, but is not an available option for managed CloudSQL instances.

Thanks in advance,
Sean Fitzgerald

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5a64bebd-ac45-4e19-85dc-6d7f82e3125dn%40googlegroups.com.

[google-cloud-sql-discuss] Exported database gz dump file works only when imported to database of same name.

When I export a database to a cloud storage bucket in gz compressed mode. The file can be imported only on empty database of same name. 
If I import the file in empty database of different name the file is imported but the database is empty.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7027476a-0f85-4a98-8435-48b08de9aa84n%40googlegroups.com.

[google-cloud-sql-discuss] Cloud SQL Export/Import

I have written a script that exports my mysql database dump file to a cloud storage bucket:

gcloud sql export sql cloud_sql_server_name gs://path/to/bucketl/filename.gz --database=database_name

This export seems to work and a compressed file is created on my bucket.

when I try to import this file to new database in the same instance, it gets imported without any errors. 
But when I connect to the new db,its empty, it doesn't contain any tables.

Please can some one help me.
This is part of my disaster recovery process.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5ec2dbba-cc6a-4acd-b0b6-abe87b85ca24n%40googlegroups.com.

Friday, September 24, 2021

[google-cloud-sql-discuss] CloudSQL SQLServer Change Database Owner

Is there a way to change the database owner for a SQL Server database?

Running sp_changedbowner allows this, but is not an available option for managed CloudSQL instances.

Thanks in advance,
Sean Fitzgerald

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/72f0bdf3-9584-4235-98ef-7acc79b044f4n%40googlegroups.com.

Wednesday, September 22, 2021

[google-cloud-sql-discuss] Re: Unable to see query plan samples for query insights

We were running into this issue too and by chance noticed after deleting an existing database with many schemas (40k+) that insights were suddenly available. I do not know if the issue is related to the schema counts, nor if it will return when it grows 'high' again.

On Wednesday, August 25, 2021 at 8:15:21 AM UTC-5 her...@shopbehold.com wrote:
Hi,

I am using query insights, but I am unable to see any query plan samples:

Screen Shot 2021-08-24 at 11.37.50 AM.png

Looking at the database logs, I noticed these log messages:

storage/speckle/postgres/extensions/google_insights/google_insights.c:1102: Unable to report sampled query plan for <query> due to hashtable size limit

I cannot find any information on what hashtable this is referring to. Anyone have ideas on how to fix this?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e88ddc3e-1559-4b66-85de-0ea62f29454bn%40googlegroups.com.

[google-cloud-sql-discuss] Reg. Increase the number_partitions and chunk_time_interval using distributed_hypertable.

Dear All,
                 We are already using timescaledb.The table has been created as distributed_hypertable and data's are also inserting.

Now i want to know the query to increase the number_partitions and chunk_time_interval using distributed_hypertable.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f880060a-c138-4a34-93c1-e1ef083ae1adn%40googlegroups.com.

Thursday, September 16, 2021

[google-cloud-sql-discuss] Creating event triggers for postgres cloudSQL

Hi,

I am trying to create an event trigger in cloudSQL postgres. But it requires postgres superuser permission to create event triggers and no user in CloudSQL has superuser permission. 

However, we have some existing databases that were provisioned in the past and they DO contain the same event trigger. Was creating event trigger used to be supported in some way in CloudSQL? As far as I can tell from the current spec, there is no way we can create event triggers. 

We are using pg13 now.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/254765d9-35b3-4b22-92f3-552409a5e5ben%40googlegroups.com.

Friday, September 10, 2021

Re: [google-cloud-sql-discuss] CloudSQL MySQL 8 user access control problem

I don't understand how it can affect replication.

On Fri, Sep 10, 2021 at 1:09 PM Goran Tepšić <purpleritza@gmail.com> wrote:
>
> Cool, can this affect replication with HA instances?
> On Sep 10, 2021, 6:29 PM +0200, Pavel Ivanov <paivanof@gmail.com>, wrote:
>
> You should execute
>
> REVOKE cloudsqlsuperuser FROM 'database_production'@'%';
>
> cloudsqlsuperuser is the role that is granted to all users created
> from web UI and that grants read/write permissions on all databases.
> See https://cloud.google.com/sql/docs/mysql/users#cloudsqlsuperuser.
>
>
> Pavel
>
>
> On Fri, Sep 10, 2021 at 6:13 AM Goran Tepšić <purpleritza@gmail.com> wrote:
>
>
> I just migrated a database to CloudSQL and trying to create users but with default settings for creating users from web UI, all my users are able to access all databases which is scary.
>
> I tried using GRANTS like:
> GRANT ALL ON user_production.* TO 'database_production'@'%';
>
> It doesn't work though, regardless of the grants above, when I login via CLI MySQL client as any user, I can freely browse all databases with the same user.
>
> Did I miss something? How do one limit CloudSQL's MySQL user to one particular database?
>
> --
> You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d378c165-9bc9-4e34-ac50-1f2ebcbe62ccn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAG1a4rvtQA5eeNtqtH4%2B%2BJ_1Gq%2B0yBLASbQ3YgvOogMH-ozicg%40mail.gmail.com.

Re: [google-cloud-sql-discuss] CloudSQL MySQL 8 user access control problem

Cool, can this affect replication with HA instances?
On Sep 10, 2021, 6:29 PM +0200, Pavel Ivanov <paivanof@gmail.com>, wrote:
You should execute

REVOKE cloudsqlsuperuser FROM 'database_production'@'%';

cloudsqlsuperuser is the role that is granted to all users created
from web UI and that grants read/write permissions on all databases.
See https://cloud.google.com/sql/docs/mysql/users#cloudsqlsuperuser.


Pavel


On Fri, Sep 10, 2021 at 6:13 AM Goran Tepšić <purpleritza@gmail.com> wrote:

I just migrated a database to CloudSQL and trying to create users but with default settings for creating users from web UI, all my users are able to access all databases which is scary.

I tried using GRANTS like:
GRANT ALL ON user_production.* TO 'database_production'@'%';

It doesn't work though, regardless of the grants above, when I login via CLI MySQL client as any user, I can freely browse all databases with the same user.

Did I miss something? How do one limit CloudSQL's MySQL user to one particular database?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d378c165-9bc9-4e34-ac50-1f2ebcbe62ccn%40googlegroups.com.

Re: [google-cloud-sql-discuss] CloudSQL MySQL 8 user access control problem

You should execute

REVOKE cloudsqlsuperuser FROM 'database_production'@'%';

cloudsqlsuperuser is the role that is granted to all users created
from web UI and that grants read/write permissions on all databases.
See https://cloud.google.com/sql/docs/mysql/users#cloudsqlsuperuser.


Pavel


On Fri, Sep 10, 2021 at 6:13 AM Goran Tepšić <purpleritza@gmail.com> wrote:
>
> I just migrated a database to CloudSQL and trying to create users but with default settings for creating users from web UI, all my users are able to access all databases which is scary.
>
> I tried using GRANTS like:
> GRANT ALL ON user_production.* TO 'database_production'@'%';
>
> It doesn't work though, regardless of the grants above, when I login via CLI MySQL client as any user, I can freely browse all databases with the same user.
>
> Did I miss something? How do one limit CloudSQL's MySQL user to one particular database?
>
> --
> You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d378c165-9bc9-4e34-ac50-1f2ebcbe62ccn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAG1a4rvLPX9h-r9tzGgF%3DmSwgzwLA1s2kE6z-Ljkyu4WKBYpYQ%40mail.gmail.com.

Thursday, September 9, 2021

[google-cloud-sql-discuss] CloudSQL MySQL 8 user access control problem

I just migrated a database to CloudSQL and trying to create users but with default settings for creating users from web UI, all my users are able to access all databases which is scary.

I tried using GRANTS like:
GRANT ALL ON user_production.* TO 'database_production'@'%';

It doesn't work though, regardless of the grants above, when I login via CLI MySQL client as any user, I can freely browse all databases with the same user.

Did I miss something? How do one limit CloudSQL's MySQL user to one particular database?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d378c165-9bc9-4e34-ac50-1f2ebcbe62ccn%40googlegroups.com.

Wednesday, September 8, 2021

[google-cloud-sql-discuss] read only access not possible due to connect needing "cloudsql.instances.update"

To connect to an instance and do "read only" things, I think I need to have "cloudsql.instances.update" , but that means I can do changes not just "read only" type things. 

Am I reading that right ?

This is , in my opinion, a problem.

Is there a way to grant connect privileges without giving a user the ability to change the instance?

references:
https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances/update

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/eb5760f4-06c5-4517-ac80-159f95e327f1n%40googlegroups.com.

Wednesday, September 1, 2021

[google-cloud-sql-discuss] Upgrade GCP hosted PostgreSQL while keeping existing user passwords

I have been tasked with upgrading our existing GCP hosted PostgreSQL databases from version 9.6 to version 13.

say that we need to create a new database and then
"Make sure the target instance has... The same user accounts, with the same PostgreSQL privileges and passwords"

We have a number of databases with dozens of users and roles, we allow users to connect directly and set their own passwords.
We would like to perform the database upgrade without changing all the passwords.

I've looked at using pg_dumpall to copy the users to a new database, but it fails as I don't have permission to read pg_authid.
It seems that we need a superuser account to be able to read pg_authid, and GCP does not permit superuser accounts.

Is there any way to upgrade the databases and keep the existing passwords?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1cfa368f-aa5d-4d70-8991-5c6d13c447a9n%40googlegroups.com.