This question already has answers here:
Query to Snowflake database isn't working because no active warehouse is selected
(2 answers)
No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command
(1 answer)
Closed 5 months ago.
i am just a beginner on snowflake.
I am using trial version.
I am trying run basic command of select * and Db i am taking is Snowflake sample data.
I am getting this error = 000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
what am i missing?
Related
This question already has answers here:
How to see query history in SQL Server Management Studio
(14 answers)
Closed 3 years ago.
I have a need to pull all the recently executed SQL statements from SQL Server. What is the log file and location that I need to look for.
Try This
SELECT B.TEXT AS [Query], A.execution_count [Count], A.last_execution_time AS [Time]
FROM sys.dm_exec_query_stats AS A
CROSS APPLY sys.dm_exec_sql_text(A.sql_handle) AS B
ORDER BY A.last_execution_time DESC
I am using serlog for logging in my webapi and working fine. I used SQL Server to log and the following is the serlog config for the same.
__serilogLogger = new LoggerConfiguration()
.Enrich.WithProperty("ApplicationIPv4", _ipv4)
.Enrich.WithProperty("ApplicationIPv6", _ipv6)
.WriteTo.MSSqlServer(connectionString, tableName /*, columnOptions: columnOptions*/)
.WriteTo
.Seq(ConfigurationManager.AppSettings["SerilogServer"])
.CreateLogger();
I am beginner in serilog. My confusion is how to purge the logs in database. Any options in serilog to hold last 3 months data only like that.
Based on chat in serilog Gitter, there is no option for that. We can do using Sql Job Agent or any other scheduled job.
I'm facing issue with Linked Table, Access DB and Excel Report. I would provide the scenario, please suggest for a solution if you are aware:
1. Admin user, creates Linked Table in Access DB. This table is open 24/7. Data inserted to DB via Linked Table/Worksheet
2. End User, generates the report from Access DB
3. If the admin user does any data update and when the end user refreshes the report, the Linked worksheet changes to "Read-Only"
Note:
Linked worksheet and Access DB stored in Server-1
End users connected to Server-1 (or) different
This same scenario worked fine in 2007, but its causing issue after migration to 2013.
Thanks in advance.
You can install the Power Query Add-ins and select the option “From Database”
=> “from Microsoft access database” to import the data from access to excel (to generate the report for End users)
Download Power query from below link:
https://www.excelcampus.com/install-power-query/
Refer for more details:
https://www.excelcampus.com/install-power-query/
Note:
This features is already available in Excel 2016
Your post is not clear. Let's review:
Admin user, creates Linked Table in Access DB. This table is open 24/7. Data inserted to DB via Linked Table/Worksheet
*** do you mean that the Access db is linking to an excel file? ... if so what is meant by "inserted to db" ?? There are 2 choices: linked to excel - or - import excel data into Access table
End User, generates the report from Access DB
*** ok
If the admin user does any data update and when the end user refreshes the report, the Linked worksheet changes to "Read-Only"
*** admin is changing data in excel sheet?
*** In general; Access does not like an excel opened when it is communicating to it. i.e. generating a report. It wants exclusive use. There should be no problem working in the Excel when the Access app is closed.
This question already has answers here:
How to run a SQL query on an Excel table?
(11 answers)
Closed 8 years ago.
I have one excel sheet(name as:-LTATestData.xls). It contain some column with corresponding some value. I want select sql query which read the column value from excel sheet and display the result.
I have tried to search in google, i get below query which may solve my purpose
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 10.0;Database=C:\work\LTATestData.xls',
'SELECT * FROM [Sheet1$]')
But when I run this query I am getting below error message:- "OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode."
Please let me know how to do this. Thanks in advance.
The main cause for this might be because of a mismatch between a 64-bit SQL Server and a 32-bit Microsoft Office installation. Therefore rather upgrade to a 64-bit Microsoft Office than downgrade a sql server version.
Alternatively, here a couple of posts if your versions are all up to date (Please read the comments sections as well)
The following posts might be helpful solving the problem: HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"
AND
SQL SERVER – Fix: Error: MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode.
This question already has answers here:
Exit single-user mode
(18 answers)
Closed 8 years ago.
One of my databases is in single user mode, and i can't seem to switch it to multi user.
USE master
GO
ALTER DATABASE MyDB
SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO
When I run the above query, i get the following result
Changes to the state or options of database 'MyDB' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
I've tried to query SQL Server from the master database to find all active connections to MyDB (exec sp_who), but when i do so i get the following error
Database 'MyDB' is already open and can only have one user at a time.
What am i supposed to do to exit single user mode?
Use this:
exec sp_dboption 'db_name_here', 'single user', 'FALSE'