Viewing 15 posts - 46 through 60 (of 3,010 total)
At least 92,045 terabytes is below the maximum database size of 524,272 terabytes, but you would need to have at least 5,753 files in tempdb at a maximum of 16...
August 1, 2014 at 10:05 am
GilaMonster (7/31/2014)
Michael Valentine Jones (7/31/2014)
July 31, 2014 at 11:44 pm
salomon.frid (7/31/2014)
Thank you GailI am aware of that one, just some people in my shop have told me that is not the preferred way of doing this ...
😉
Any alternatives?
You...
July 31, 2014 at 3:15 pm
As a general rule, vendors have very little knowledge of DBA best practices, so they just toss out some misinterpreted stuff that some junior developer found on some web site...
July 31, 2014 at 3:02 pm
This should do what you need.
Why do you have WAITFOR DELAY '00:00:20' in your sample code?
declare @NextId_output table ( NextId int not null )
UPDATE TableIds
SET
NextId = NextId + 1
output
inserted.NextId...
July 31, 2014 at 2:34 pm
select [Date] = convert(date,'7/26/29')
Results:
Date
----------
2029-07-26
July 31, 2014 at 11:08 am
ba.saidou (7/31/2014)
Could you provide an example please?Thanks,
An example of what?
You haven't really explained your problem well enough for anyone to know what you are asking, and you haven't explained the...
July 31, 2014 at 10:00 am
Not sure what decimal you are actually after, but here are some examples of what you might be after.
select
a.CurrentDatetime,
a.CurrentTimeOfDay,
HourOfDay=
convert(numeric(18,4),round(datediff(ms,0,a.TimeOfDay)/3600000.000000,4)),
MinuteOfDay=
convert(numeric(18,4),round(datediff(ms,0,a.TimeOfDay)/60000.000000,4)),
SecondOfDay=
convert(numeric(18,4),round(datediff(ms,0,a.TimeOfDay)/1000.000000,4)),
MillisecondOfDay=
datediff(ms,0,a.TimeOfDay)
from
(
selectCurrentDatetime= getdate(),
CurrentTimeOfDay= convert(time(3),getdate()),
TimeOfDay= convert(datetime,convert(time,getdate()))
) a
Results:
CurrentDatetime ...
July 31, 2014 at 9:49 am
ChrisSut (7/25/2014)
This is a legal requirement, we cannot keep health records of US citizens in Canada or health records...
July 25, 2014 at 10:52 am
J.Faehrmann (7/23/2014)
If you set it to single user mode and some process connects to it before you start the restore, you will find it very difficult to disconnect that user.
That...
July 23, 2014 at 10:19 am
This is a sample of a restore command to use after dropping the restore target database:
declare @BackupFile nvarchar(500)
set @BackupFile = '\\MyBackupServer\MyBackupShare\MyBackupFolder\MyTestDBBackup.bak'
restore database [MyTestDB]
from disk = @BackupFile
with
-- Logical names to...
July 23, 2014 at 10:10 am
MrG78 (7/23/2014)
July 23, 2014 at 9:45 am
J.Faehrmann (7/23/2014)
I don't drop it, because I want to keep the old db in case the restore fails 😉Bringing it offline and online again to drop the connections is elegant.
I...
July 23, 2014 at 9:26 am
It's simpler if you just drop the test database before starting the restore to prevent it from being in use.
Example:
use master;
-- Set offline to disconnect all users from the database
alter...
July 23, 2014 at 9:17 am
Jeff Moden (7/21/2014)
SQLRNNR (7/21/2014)
Jeff Moden (7/21/2014)
Jack Corbett (7/21/2014)
SQLRNNR (7/21/2014)
Why do you have 2000 log...
July 21, 2014 at 1:27 pm
Viewing 15 posts - 46 through 60 (of 3,010 total)