Questions tagged as ['sql']
We are seeing that our server will suddenly stop accepting new connection from SQL Server. The server itself is still accessible via RDP, but sharepoint portal/SSMS and any other remote SQL connection will timeout. Configuration manager shows that SQL Services are running, but if you attempt to stop/ restart the services manually, it will hang. Restarting the server will sometimes let the services go ba ...
Our new database is just inaccessible. I have tried to find it in the error log and find this error during that time. So when we went to the Configuration manager. we were seeing Browser service, SQL Agent, and SQL Server services were stopped, and then tried to restart it just hung and because of that, I have to do a reboot. It is a production server and this is a recurring issue. It happened a month a ...
I am new to SQL , could you please suggest me how do I improve below SQL code, I have observed using SQL profiler - XML reading operation is taking too much of time.
Kindly let me know how do I rewrite the below code, so that I can see improvement in the performance.
Here - edata is the XML Column And below code is part of my main stored procedure , only below code is having an issue with performanc ...
I connect to the production database and launch "SHOW TABLES" command, and the response is "Empty set". I never launch a DROP table command on this database.
Database log shows this message: "Storage size 999 GB is approaching the maximum storage threshold 1000 GB. Increase the maximum storage threshold."
The metric "Free Storage Space" shows that disk storage space is the same as before, so it look ...

I have old version of php site, which uses unescaped 'row_number' column number in its sql queries. It seems in the new version of mariadb there has been new function called "row_number()" added and thus the queries fail. To refactor the whole project is out of the question. Also I don't want to dockerize the whole thing with older version of mariadb. Is there a way to use new mariadb but also use olde ...
I don't know why searching in my "cities" table is so slow. My query looking for a table "cities" located about 25km from the city. I use this simple query and the database takes almost 20 seconds to return results.
SELECT city_destination,distance FROM cities WHERE city_start='Wien' AND distance <= 25 ORDER BY distance ASC
Table engine is InnoDB. The table has approx. 7 millions of rows:
+--- ...
When I try to install SQL Server Express I got this error
Unable to install SQL Server (setup.exe)
Then I'm trying to uninstall everything related to the SQL server to avoid previous installation files, but I can't delete 1 folder (see image below)

I'm in the process of trying to add a security certificate to a sql server running on a remote machine. I managed to generate the cert, but I'm a bit lost on the next step. All the instructions I have found assume local access to the machine running the sql server instance. Does anyone know of instructions for how to do it remotely? Is what I want to do even possible?

I'm trying to set up a security certificate for a sql server. According to the documentation, I need to set up the permissions so that the sql server instance can read the private key. I tried setting up the permissions through mmc (see https://stackoverflow.com/questions/36830411/how-can-i-give-sql-server-permission-to-read-my-ssl-key). I right click on the cert, select 'all tasks', select 'manage pri ...
We have migrated a database (backup to .bacpac and restore to the new tenant) but the database was encrypted using always encrypted and the key is stored in the original tenant's key vault. I can look at the data in SQL management studio by authenticating with the first tenant when it tries to decrypt (it automatically pops up the authentication dialog), but I need to move the key so my web app can acce ...
Hello i am running server with xenforo. i would like to know how can i restrict url from .htaccess.
Url is : https://mywebiste.com/index.php?members/find&q=oi%5Bp%5C&_xfRequestUri=%2Findex.php%3Fmembers%2F&_xfWithData=1&_xfToken=1648216864%2C89d40e7bf50a91b8a62f9fe448c5d1f3&_xfResponseType=json
there is sql injection so it think just blocking it would fix it.
i tried doing someth ...
I got a mail server using dovecot, postfix with mysql
I insert an email user through the following sql statement:
insert into users(email, password) values('dave@example.com',ENCRYPT('secret'))
Besides, the file /etc/dovecot/dovecot-sql.conf.ext contains:
driver = mysql
connect = host=127.0.0.1 port=3306 dbname=mail user=mail_admin password=password
default_pass_scheme = CRYPT
password_query = SELEC ...
for testing purposes I have a postgres service/database running on my local computer. Right now I am using a batch file to change default userlogin, but I cannot use SET PGPASSWORD to pass along a password.
start cmd /k "chcp 1252 & SET PGUSER=postgres"
With this I just have to type 'psql' into my CMD without the -U postgres flag. As I understand PGPASSWORD was depreciated so the correct way ...
I have SQL server 2008 R2 standard in house server and want to move my database to SQL 2019 Web edition in VM in AWS cloud. Can I just backup database and restore it there? would that work? or standard edition can only be restored to standard not web edition? Database is not that big, under 30GB.
Your help would be highly appreciated.
Thanks
I am running a local instance of MS SQL server 2014 Developer Edition, I enabled the certificate based encryption on it, so I want to verify that all the incoming and outgoing traffic is encrypted. I used Wireshark for that, but suddenly Wireshark stop showing the traffic of the SQL server. Furthermore, I uninstalled and reinstalled the SQL server may cause the issue. Am I missing any configurations tha ...

I have a user 'user_1' requesting access to sql server 'server1'. The user_1 is in domain 'domain1' and the sql server 'server1' is in domain2.
After I granted the user with permission, he found he couldn't connect to the server using name 'server1'. Instead, he has to connect using the name 'server1.domain2' (its FQDN).
I myself have no problem connecting to the server using either instance name on ...
I need to create a new user with sysadmin privilege.
I went to the Azure portal > Query Editor. Then I run this commands.
Unfortunately I got this error:
Any help is welcome.

I am receiving an error when trying to export and save a query to a CSV (Google Drive) sheet.
The error "Failed to export: Internal error encountered."
I'm trying to work out why MySQL is hitting 100% over the past week:
It's a server that does network/server monitoring called LibreNMS.
Top: https://pastebin.com/1qypfm0n
Here I access MySQL and look at the processes: https://pastebin.com/zCVMh2cL
and full processes https://pastebin.com/0ZFhqpiF
I then found a tool called MySQLTuner, but I'm not experienced enough to understand the results: http ...
I have a database my_database
, and it have some tables named my_table_1
, my_table_2
, ... , my_table_128
under schema public
. I need to grant select privileges for all tables in schema public
to user my_db_user
, so I execute SQL command below:
GRANT SELECT ON ALL TABLES IN SCHEMA public to my_db_user;
And it executed without error. But after I connect with user my_db_user
and tried to select somethin ...
I have a sql server with a pictures table with 25 million entries and it has become too slow to query i currently have a Xeon E5-2667v3 with 32g of ram, I am looking to get a hp ProLiant Gen 9 and I am not sure how to go with specs, is SQL single or multi-threaded? would I benefit from going many weaker cores or less stronger cores? does ram have a large effect? should I get more ram or faster ram? What ...

I had a bizarre issue today where NT SERVICE\MSSQLSERVER was being denied login as a service on a domain joined computer. I also noticed group policy was not being applied via gpupdate /force. I disconnected the computer from the domain, deleted the AD Object, re-created the AD Object, and re-joined the domain. The computer pulled policy successfully, and SQL Express worked. I know the GPO's don't have ...
Spec: 8 GB memory / 4 vCPUs / 25 GB ssd
Ubuntu 20.04
My website got hit with a DDoS recently and had this continuous high CPU usage error for 4 days and the site will not load up, I take a look using top -c and it showed 200% CPU usage. I tried SQL tuner but I did not see any significant differences and my site is not able to load up
MySQL Tuner:
>> MySQLTuner 1.8.5 - Major Hayden <maj ...
I'm working on a cybersecurity application and one of its features is machine learning to detect SQL injection attacks. I'm in the research phase right now and I'm looking at data collection and preprocessing. So far I've been able to write a script to extract recognizable SQL statements from Apache logs.
I started looking into implementing something similar for IIS logs and I stumbled across an ...
Good Morning, I have a SQL Server 2016 that is doing Log Shipping to a DR Site. I currently want to also to Replicate (Transactional) specific Tables to another Server for Reporting Purposes.
Will there be any issues or snafu's I should be aware of? Can I have Log Shipping and Transactional Replication configured on the same Publishing Database?
Can't connect to a sql server instance over the network, and all SSMS gives me is a 258 error.
Everything is supposed to be correct.
- Both machines are inside a domain and the user was added to the security\logins during installation.
- Server Authentication is set to "SQL Server and Windows Authentication mode"
- Firewall has the following ports open: 1433, 1434, 4022, 135, 2383, & 2382 TCP, and ...
Also posted in Stack Overflow. Any feed back would be much appreciated.
I have a need for a SQL job to send multiple emails, and I have come across this error that I am unable to find any solutions for. When I send emails this way is succeeds every time I have tested.
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'AzureManagedInstance_dbmail_profile',
@recipients = '*Valid Email Address*',
@body = 'tes ...
I'm having a bunch of docker-containers containing different databases. For every container there is a Jenkins-Job which performs a daily backup of the database as a .sql-file and then zips this file. As you can imagine this leads to a lot of redundant data over time:
-rw-r--r--. 1 admin admin 103475967 30. Aug 02:15 20210830021501_all-databases.sql.gz
-rw-r--r--. 1 admin admin 103475967 31. Aug 02 ...
In Oracle Database I need to execute SQL command RECOVER DATABASE UNTIL CANCEL BACKUP CONTROLFILE;
. After that I got input prompt. I should enter CANCEL
. Is there a way to enter only one command with automatic CANCEL
substitution? Thank you for your answers!
this has really baffled me for a few days and am seeking help. I am using SQL Server 2017.
I am trying to handle strings from a free format field and either convert them to a date in the format of "dd/mm/yyyy" or if they are not in this format then simply display the text verbatim.
I need this in a VIEW so can not use SET LANGUAGE. Sounds simple using convert and isdate but does not seem to work.
...