Viewing 15 posts - 1,321 through 1,335 (of 1,957 total)
I am not an expert on this..., but please try this code - again be warned that it seems to only be good for data since the last engine startup.
It...
June 19, 2011 at 6:32 pm
You might want to check whether you have the "Perform volume maintenance tasks" user right in Windows, found in the "Local Security Policy" MMC snap-in, Local Policies, User Rights Assignment.
June 18, 2011 at 5:14 pm
I think the only time I used xp_cmdshell was to break into a colleagues laptop, add myself to the local administrators group in windows, and from there set up a...
June 17, 2011 at 5:07 pm
CREATE PROCEDURE GetSchemasMM
@UseDb [sysname],
@Output [varchar](MAX) OUTPUT
AS
SET NOCOUNT ON;
DECLARE @sql [nvarchar](MAX);
SELECT @sql = N'SELECT @result=STUFF((SELECT '',''+[SCHEMA_NAME] FROM ['+@UseDb+N'].[INFORMATION_SCHEMA].[SCHEMATA] WHERE [SCHEMA_OWNER] = ''dbo'' FOR xml PATH('''')),1,1,'''')'
EXEC sp_executesql @sql,N'@result [varchar](MAX) OUTPUT',@result...
June 17, 2011 at 5:01 pm
Slightly off-topic, but related to your reason for the original post....
You might like to try this : http://www.atlantis-interactive.co.uk/products/sqleverywhere/default.aspx
I am not affiliated - it is just a free tool for writing...
June 17, 2011 at 4:37 pm
also out of mild interest, can you query ok from the command line on the 2008 server to the 2005 server using that user?
June 17, 2011 at 8:25 am
It's not specifically related to SQLCMD. Perhaps you were using a different login?
June 17, 2011 at 12:28 am
Have you noticed/tested to see if tempdb is growing?
What is your tempdb configuration? #files , initial size, storage etc...
Have you noticed/tested to see if parallelism affects performance - i.e....
June 16, 2011 at 4:44 pm
Just out of interest, what happens if you try to expand the Linked Server Catalogs in SSMS Object Explorer?
June 16, 2011 at 4:35 pm
well that looks ok, can you do the same for the database permissions?
June 16, 2011 at 4:27 pm
It might be worth checking permissions by running this in the Test2005Database:
EXECUTE AS user = 'TEST_USER';
SELECT * FROM fn_my_permissions('dbo.Test2005Table', 'OBJECT')
REVERT;
Just to see exactly what the user can do.
June 16, 2011 at 3:22 pm
I take it that the code that calls the code you posted has the try ... catch block around the call?
I don't have an answer to why try...catch fails...previous answers...
June 13, 2011 at 2:29 am
No, you are right Jeff, I was leaving it to the OP to deal with that....
I would absolutely do it the way you so kindly offered.
June 12, 2011 at 9:44 am
BEGIN TRY
IF EXISTS(
select 1 FROM msdb.dbo.sysjobs_view sjv
join msdb.dbo.sysjobactivity sja
on sja.job_id = sjv.job_id
JOIN msdb.dbo.sysjobhistory sjh ON sja.job_history_id = sjh.instance_id
where name='test')
...
June 11, 2011 at 4:56 pm
Viewing 15 posts - 1,321 through 1,335 (of 1,957 total)