DataSunrise Achieves AWS DevOps Competency Status in AWS DevSecOps and Monitoring, Logging, Performance

Google Cloud SQL Data Activity History

Google Cloud SQL Data Activity History

Introduction

A Google Cloud SQL Data Activity History records every relevant interaction with your database — from logins and queries to schema changes and permission updates. For organizations running SQL Server on Google Cloud SQL, this history is a critical tool for security, compliance, and operational oversight.

While SQL Server includes native auditing features for logging data activity, pairing them with a platform like DataSunrise extends visibility, adds real-time monitoring, and enables dynamic data masking. This combination turns static audit records into actionable intelligence.

How Google Cloud SQL and SQL Server Work Together

Google Cloud SQL is a fully managed relational database service that supports multiple engines, including MySQL, PostgreSQL, and Microsoft SQL Server. When you choose SQL Server on Google Cloud SQL, you’re running the familiar SQL Server database engine within Google’s managed infrastructure.

This means you benefit from:

  • Google Cloud’s management layer — automated backups, high availability, security patching, storage scaling, and VPC-based networking.
  • SQL Server’s full feature set — including SQL Server Audit, role-based access control, and transaction logging.

For database auditing, this combination allows you to use SQL Server’s built-in tools for capturing detailed activity history, while also leveraging Google Cloud services like Cloud Storage or BigQuery for storing and analyzing audit logs.

Native Capabilities in Google Cloud SQL

Google Cloud SQL is a managed database service — it handles infrastructure, networking, backups, and high availability for you. When you run SQL Server on Google Cloud SQL, you still get access to SQL Server’s built-in security and auditing tools, but with the added benefits of Google’s managed environment (automatic patching, storage integration, IAM-based access control).

SQL Server’s Native Auditing Features

Regardless of where SQL Server is hosted, its native audit system provides:

  • Server Audits — Define where and how audit logs are stored (TO FILE, TO APPLICATION_LOG).
  • Audit Specifications — Control what gets logged at the server or database level (logins, data modifications, schema changes).
  • Action Groups — Predefined categories of events (e.g., FAILED_LOGIN_GROUP, DATABASE_OBJECT_ACCESS_GROUP).
  • Audit Functions — Such as sys.fn_get_audit_file for reading stored audit data.
  • Integration Options — Logs can be stored locally or sent to external systems for correlation.
Google Cloud SQL Data Activity History - Native logging feature for SQL Server in Cloud SQL Studio
Cloud SQL Studio interface displaying the native audit logging configuration for a SQL Server instance, showing options for enabling and managing database event logs.

In Google Cloud SQL, these capabilities work the same way as on-premises or self-managed SQL Server, but storage paths and network access rules are managed by Google. This means you can still create server- and database-level audits while benefiting from Cloud SQL’s operational automation.

Example: Creating a Server Audit

CREATE SERVER AUDIT DataActivityHistory
TO FILE (
    FILEPATH = '/var/opt/mssql/audit/',
    MAXSIZE = 256 MB,
    MAX_ROLLOVER_FILES = 50
)
WITH (
    QUEUE_DELAY = 1000,
    ON_FAILURE = CONTINUE
);

ALTER SERVER AUDIT DataActivityHistory WITH (STATE = ON);

Database Audit Specification Example

Monitor all reads on a sensitive table:

CREATE DATABASE AUDIT SPECIFICATION AuditTransactions
FOR SERVER AUDIT DataActivityHistory
ADD (SELECT ON dbo.transactions BY public)
WITH (STATE = ON);

Querying Audit Files

SELECT TOP (200)
    event_time,
    server_principal_name,
    database_name,
    statement
FROM sys.fn_get_audit_file('/var/opt/mssql/audit/*', NULL, NULL)
ORDER BY event_time DESC;
Google Cloud SQL Data Activity History - Viewing native database logs
Audit log output from SQL Server on Google Cloud SQL, listing captured database events such as logins, queries, and schema changes with associated metadata.

These commands let you capture SELECT, INSERT, UPDATE, and DELETE events, as well as schema and permission changes.

Limitations of Native Logging

LimitationImpact
No real-time alertsSecurity teams must check logs manually, delaying detection and response.
Sensitive data exposureQuery text may contain PII or PHI in plain form, creating compliance risks.
No cross-instance correlationActivity across multiple Cloud SQL instances is siloed, making correlation harder.
Minimal visual analyticsLacks dashboards and interactive filtering for rapid investigation.
Manual reportingNo built-in compliance-ready reporting; requires extra processing.

Enhancing Data Activity History with DataSunrise

DataSunrise is a database security, compliance, and monitoring platform that works with over 40 SQL, NoSQL, and cloud data storage systems. It acts as a proxy between your applications and databases, enabling real-time activity monitoring, dynamic and static data masking, sensitive data discovery, and granular auditing — all without requiring intrusive changes to your existing infrastructure.

In the context of Google Cloud SQL with SQL Server, DataSunrise enhances native auditing by adding centralized visibility, intelligent alerting, role-based masking, and automated compliance reporting.

Key EnhancementBenefit
Granular Audit RulesMonitor only specific users, IP ranges, query types, or objects to reduce log noise.
Real-Time AlertsReceive instant notifications for suspicious logins or unusual query patterns.
Dynamic Data MaskingConceal sensitive data in query results for unauthorized users without changing stored data.
Centralized Monitoring DashboardView and analyze events from all monitored Cloud SQL instances in one interface.
Data Discovery IntegrationAutomatically detects new sensitive objects and expands audit coverage.
Automated Compliance ReportingGenerate GDPR, HIPAA, PCI DSS, and SOX reports instantly.

Example: Setting Up Data Activity Monitoring in DataSunrise

  1. Connect Your Instance
    Add your Google Cloud SQL (SQL Server) database in the DataSunrise dashboard.

    Google Cloud SQL Data Activity History - Creating database instance in DataSunrise for MSSQL
    DataSunrise interface during setup of a new Microsoft SQL Server database instance for monitoring, with connection parameters and authentication details.
  2. Create an Audit Rule
    Target a sensitive table like transactions and choose the event types (SELECT, UPDATE, DELETE, INSERT).

    Google Cloud SQL Data Activity History - Creating an audit rule in DataSunrise
    DataSunrise audit rule creation window, allowing selection of database objects, query types, and filtering conditions to capture specific SQL Server events..
  3. Filter Sessions
    Limit auditing to specific IP ranges, usernames, or applications.

    Google Cloud SQL Data Activity History - Applying session filters in audit rule
    Audit rule configuration in DataSunrise with filters applied to track sessions from specific usernames or IP ranges, refining the scope of captured SQL activity.
  4. Enable Alerts
    Configure notifications via email, Slack, or a SIEM integration.

    Google Cloud SQL Data Activity History - Creating a new subscriber for alerts
    Subscriber creation form in DataSunrise, enabling email or external service notifications for audit events matching defined rules in a SQL Server environment.
  5. Review in Transactional Trails
    See every captured query with full metadata: timestamp, user, object, and SQL text.

    Google Cloud SQL Data Activity History - Viewing transactional trails in DataSunrise
    DataSunrise Transactional Trails dashboard showing a filtered list of SQL Server queries captured by audit rules, including timestamps, users, and accessed objects.

Best Practices

  • Deploy SQL Server and DataSunrise in the same VPC to minimize latency and improve security.
  • Store audit logs in Cloud Storage with lifecycle rules for automatic archiving.
  • Restrict log access with IAM roles.
  • Run regular data discovery scans to update audit scopes.
  • Integrate logs with SIEM or BigQuery for anomaly detection and trend analysis.

Conclusion

A well-implemented Google Cloud SQL Data Activity History strategy combines SQL Server’s native audit capabilities with DataSunrise’s advanced monitoring, masking, and compliance automation. This layered approach improves your security posture, reduces compliance overhead, and provides clear visibility into every important database event.

Protect Your Data with DataSunrise

Secure your data across every layer with DataSunrise. Detect threats in real time with Activity Monitoring, Data Masking, and Database Firewall. Enforce Data Compliance, discover sensitive data, and protect workloads across 50+ supported cloud, on-prem, and AI system data source integrations.

Start protecting your critical data today

Request a Demo Download Now

Next

Sybase Compliance Management

Sybase Compliance Management

Learn More

Need Our Support Team Help?

Our experts will be glad to answer your questions.

General information:
[email protected]
Customer Service and Technical Support:
support.datasunrise.com
Partnership and Alliance Inquiries:
[email protected]