Viewing 14 posts - 106 through 119 (of 119 total)
Makes sense.. thanks very much for your replies.
June 22, 2012 at 8:14 am
SQLRNNR (6/21/2012)
EXECUTE [master].dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory'
Thanks.
I'm aware of this but.. What I'm trying to achieve here is to avoid hard coded paths so that SP would be more generic. For...
June 21, 2012 at 9:36 am
try
create database contacts
on primary
(
name='contacts',
filename='D:\contacts\contacts.mdf',
size=5mb,
filegrowth=3%
)
log on
(
name='contacts',
filename='D:\contacts\contacts_log.ldf',
size=5mb,
filegrowth=3%
)
June 13, 2012 at 9:33 am
I would look into SSIS and play with the fast load options and the batch size to get an optimal solution. Consider dropping and recreating your indexes on the target...
June 13, 2012 at 7:29 am
Good point but with a FK in place the op would have probably gotten an error msg while trying to delete? Anyway I'm a bit confused what he is after...
June 6, 2012 at 6:17 am
mohan.bndr (6/6/2012)
Yes I executed sp_helpdb <database name> but it is showing for one database, i need all the databases in server and datafiles size.
Forget the arguments, just simply do
EXEC sp_helpdb
Edit:
Database...
June 6, 2012 at 3:00 am
mohan.bndr (6/6/2012)
I want to know database sizes for all in my environment, and i am executing this query in 2008R2 it is working but when i am using this in...
June 6, 2012 at 2:09 am
mohammed moinudheen (5/25/2012)
May 25, 2012 at 8:32 am
There's no way to do that. However you can set up a trace and leave it running for a while to see which objects are accessed.
May 25, 2012 at 5:28 am
opc.three is correct the PrimaryFilePath won't help much here, apologies.
However doing something like this
$server = "svr"
$sqlserver = new-object “Microsoft.SqlServer.Management.Smo.Server” $server
Invoke-Sqlcmd -Query "SELECT a.name ,
...
May 24, 2012 at 7:50 am
Wouldn't this do the same?
$sName = "mysvr"
$dbName = "mydb"
$server = New-Object Microsoft.SqlServer.Management.Smo.Server($sName)
$db = $server.Databases[$dbName]
Get-ChildItem $db.PrimaryFilePath -Recurse | Where-Object{($_.psiscontainer)} | Get-Acl
# ..
May 21, 2012 at 9:22 am
Viewing 14 posts - 106 through 119 (of 119 total)