Web Only Version Pain

We seem to be having an issue with old “web only” .  There are times when the “web only” causes the other to not correctly.  So, below is the that can be used to select the “web only” .

SELECT count(*) FROM COPD811/F983051
WHERE VRVCC2='1'             

If you want to be more precise, you can grab the “web only” that have been executed prior to a certain date by using the VRVED field and the six digit date which can be found on the e1 dates page.

Tags: , , , , , , , , ,

Backup All SQL Server Databases

November 18, 2009 by Stewart Schatz · Leave a Comment
Filed under: Microsoft, sql, sql server 

I came across this script to backup all Server databases:

Code Snippet
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
DECLARE @fileDate VARCHAR(20) -- used for file name

SET @path = 'E:\Backups\Dynamics' 

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

DECLARE db_cursor CURSOR FOR
SELECT name
FROM master.dbo.sysdatabases
WHERE name NOT IN ('master','model','msdb','tempdb') 

OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name  

WHILE @@FETCH_STATUS = 0
BEGIN
       SET @fileName = @path + @name + '_' + @fileDate + '.BAK'
       BACKUP DATABASE @name TO DISK = @fileName 

       FETCH NEXT FROM db_cursor INTO @name
END  

CLOSE db_cursor
DEALLOCATE db_cursor

 

Tags: , , ,

Add Record To OCM – F986101

The other day, I had a need to insert many records into the (F986101).  So I set out to create a quick statement that would serve that purpose.  Below is what I came up with:

INSERT INTO SY811/F986101                         
VALUES('DV811',0,'OBJECTNAME','LOCAL','','*PUBLIC',  
'*ALL','P','','H95','AV','','BSFN',            
'USERNAME','','','',0,'',0,'','','','')            

Remember you may have to make entries in both the SY811 and SVM811 F986101 files.

Tags: , , , , , ,

Access To Environments

To find out what users or groups have access to a certain environment run the following :

select * from sy811/f0093
where llll='<enviornment>'    

To find out what environments a user or group has access to run the following :

select * from sy811/f0093
where lluser='<userid>'    

Related Posts with Thumbnails Tags: , , , ,