I configured database mail profile as gmail smtp server, SSL and port 465. I didn't restart server. And this is first time to use Database Mail feature on that server.
When I send a testing mail it give me this error message:
The mail could not be sent to the recipients because of the mail server failure.
(The operation has timed out)
I tried…
Just wondering what backup processes you guys have.
I am currently operating a weekly full database backup with daily differential backups.
My understanding is that with such a set up, the difference between Full recovery mode and Simple recovery mode is that with Full recovery mode, I will be able to use the transaction logs to rollback my DB…
I would like to make a t-sql query to check which logins have 'view server state' permission in server type securables. How to achieve this?
This query from mssqltips don't show this:
http://www.mssqltips.com/tip.asp?tip=1718
SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission]
FROM [sys].[database_permissions] sec…
Hi,
I am a developer and would need some DBA-advices.
We are starting to get performance problem with a MSSQL2005 database. The visible effects of the incidents is mainly CPU-hog on the server but operations reported that it was also draining resources from the SAN (not always).
the main source of issues is for sure in some application but I am…
I have a maintenance plan to do backups and cleanup of old data. It has three subplans, each with their own schedule. Can I set the schedule of subtask 2 to be "after subtask 1 is complete"?
I have an IIS 6 site running on Windows 2003 Server x86 with MS SQL2005 Enterprise edition running ASP Classic (no choice). The site runs very fast with about 8000 page views per hour. All of my SQL tables are indexed and I have used the profiler to check my queries, the slowest of which is only about 10-15ms. I have autoshrink disabled,…
What's the simplest way to shrink transaction log file on a mirrored production database?
I have to, as my disk space is running out.
I will make a full database backup before I do this, so I don't need to keep anything from the transaction log (right? I have daily full database backup, probably never need point-in-time restore, though…
I've recently installed SSMA on my computer and after connecting to both the Oracle instance (which holds the database to be converted) and the SQL Server. I've mapped the needed schemas from oracle to mssql. The problem is that when i click on the report button for the assessment report there's an error popping up:
Assesment Error :…
Just want to check the syntax to make sure this is for one table and all indexes (default?).
--must be single user
ALTER DATABASE database_name SET SINGLE_USER;
DBCC CHECKTABLE
( "table_name"
, REPAIR_ALLOW_DATA_LOSS
)
WITH ALL_ERRORMSGS;
-- TURN BACK MULTI USER
ALTER DATABASE database_name SET MULTI_USER;
Also, should I…
I have a query which return the output like -- 5,4,6
Where 1 = apple, 2 = mango, 3 = banana, 4 = plum, 5 = cherry, 6 = kiwi etc.
I would like to update my output as cherry,plum,kiwi instead of 5,4,6
How can I achieve that in the same select statment.
I am okay to hard code the values.
Please confirm
May be I did explain clearly…
I have data in a table (below), and I need to select the most recent update from each user. Here the data has been sorted by date, so the 'SomeData' column of the most recent unique value of each user. Top 1 SomeData isn't going to work because it will only return for one user. Is this even possible using only SQL?
Date …
I know I am most likely using incorrect terminology so please correct me if I use the wrong terms so I can search better.
We have a very large database at a client's site and we would like to have up to date copies of some of the tables sent across the internet to our servers at our office. We would like to only copy a few of…
I have a MSSQL server, 3 volumes, that runs some processes that seem to take way too long. One of these processes reads in a zip file, then writes to a database based on what's in the zip file.... for each record. I have 2 volumes in use and am creating the third- so I am trying to plan how to do this. OS has to remain on vol.…
Hi
We have a full-text catalog that is populated via a job every 15 minutes like so:
ALTER FULLTEXT INDEX ON [dbo].[WorkItemLongTexts] START INCREMENTAL POPULATION
We have encountered a problem where the database containing this catalog locks up. There are a couple of scenarios, we either see the job execute and the…
I studied the new MERGE Statement and there is a nice example for importing a flatfile.
INSERT <Table>
SELECT * FROM OPENROWSET BULK <Import-Flat-File>, <Format-File>...
seems to be a good replacment for such a simple job and avoids to build a SSIS-Package.
EXEC XP_CMDSHELL bcp <Table or…
One of our in-house applications has a SQLCLR assembly which is currently experiencing problems. The developer is having problems recreating the issue using the version that is stored in our source control system, so he suspects that some code may have been released that was not uploaded to source control. Is…
I have been tasked with trying to find a method of updating about 500 customer email addresses in MAS90. I recently discovered that they had the ability to email invoices to their customers and because I opened my big mouth, they now want me to find a way to add about 500 emails into the system so they do not…
Update - I found that doing a manual detach/reattach using MSDN article "How to: Move a Database Using Detach and Attach (Transact-SQL)" got around this issue. I'll just be creating a script to dettach and reattach but do the file copies manually. Any info on how to overcome the problems with the wizard would…
I've got a Linked Server in my SQL Express install that is using SQL Server Authentication.
I've created a SQL Server login-mapping and it's using Impersonate.
I've confirmed that the account exists on both servers but I'm still getting the error.
Any suggestions?
We need to reformat the SQL cluster disk in our SQL cluster. The drive contains the shared installation files for SQL as well as databases.
My concern is how SQL/The Cluster will react to after we wipe the disk resource.
Questions:
Is there a defined procedure for this?
How should we backup and restore…
Hi
I have about 200 sites each of which have 2 servers running MSSQL (2k5 at some sites, 2k8 at others)
One server is production and the other is primarily there as a backup.
We're rebuilding all of these servers this year and as part of that we will have to set up mirroring for ... a lot ... of…
I need to be able to export SQL Server logs into CSV files, which I can easily do with the export function. However in doing so I've noticed there's a range of dates missing from the SQL Server logs in Management Studio, two months actually. I'm wondering where these logs might be found, and if…
I would appreciate if someone could help me with the following problem:
We use two SQL Server 2008 R2 databases under transactional replication: transactional publication with updatable subscriptions. because we run out of disk space we need to move the database files into a new drive. But I…