Sunday, March 25, 2012
ActiveX Script
Function Main()
ms_year = year(date())
ms_month = month(date())
ms_day = day(date())
ms_date = ms_year & "_" & ms_month &"_" & ms_day & "_"
dim objFSO, strFullNm
set objFSO = CreateObject("Scripting.FileSystemObject")
strFullNm = DTSGlobalVariables("FilePathRoot").value & "\IMS_ALL_DONATIONS.txt"
'check to see if file exist and then concatenate the file
if objFSO.FileExists(strFullNm) then
strFullNm = DTSGlobalVariables("FilePathRoot").value & "\ " & ms_date & "IMS_ALL_DONATIONS.txt"
MsgBox "This is the new filename: " & strFullNm
else MsgBox "File does not exist"
end if
set objFSO = nothing
Main = DTSTaskExecResult_Success
End FunctionUm, I'm not sure exactly what you are trying to achieve here.
You say the correct filename is being displayed but strFullNm is not being set to the right value, is that right??
After you display strFullNm what are you doing with it? Looking at the code you have there you aren't doing anything with it at all and it will be discarded. Are you trying to rename a file or move a file or something?
Thursday, March 22, 2012
active/passive w/o shared disk array
can you have an active/active without a shared disk array?
Where are the actual db files stored?
thanksNo you'll need to setup shared disks|||where are the db file stored? On the sared disk?
Can I set up a regular server as a "shared disk" instead of buying expensive disk arrays such as netapp? Any other options?
thanks|||Yes, db files are stored on shared disk, not local|||I think Microsoft advises against using a NAS device, or a shared network drive for SQL Server files. I think it can technically be done, but the chance of corruption of the database is inordinately high.|||Without a shared disk array, when one server goes down, how does the other server get to the data?
SAN is the perferred, although, we have 2 cluster environments here running with DELL PowerVaults and things have been going well so far.
Monday, March 19, 2012
Active Directory Reports
I'm not sure this is an actual reporting services question but has someone else created reports for active directory in Reporting Services
I want to create a report with users and their respective manager. I have this working in reporting services but I just want the manager name how could I strip out all the other information in the manager field?
SELECT personalTitle, manager, name, employeeid, distinguishedName
FROM 'LDAP://dc=xxx,dc=xxx,dc=xxxt'
WHERE objectClass = 'user' AND objectCategory = 'Person'
ORDER BY name
I get this as the manager name, I just want his name
CN=Smith\, Kurt,OU=Financial,OU=DataControl,OU=Users-Groups,DC=xxx,DC=xxx,DC=xxx
Thank you,
There should an AD property that gives you the name as entered. As a last resort, you can call a custom function to parse the name, e.g.
= Code.MyFunction(Field!name.Value)
|||Hi thank you, I had tried a function in the bids tool by calculating a new member using this
=Mid(Fields!manager.Value,4,(InStr(Fields!manager.Value,",OU=")-4)) and this works fine on my desk top but when I attemtp to deploy it I get an error
Warning 1 [rsRuntimeErrorInExpression] The Value expression for the field ‘ManagerName’ contains an error: Argument 'Length' must be greater or equal to zero. C:\mydocs\SQL Server Management Studio\Projects\Active Directory\Active Directory\Active Dir Manager Report.rdl 0 0
Managername is my new calculated column
Thank you for the response. It was a data issue with the manager, some of my manager names were blank I had to search for them and replace with values prior to using the other functions: in case your interested first I use IIF
I put in the same values as I plan to strip off with the next calculated member
new field LookforNoManager
=IIF(Fields!manager.Value Is Nothing,"CN=Not Available,OU=",Fields!manager.Value)
then I created this new ManagerName
=Mid(Fields!LookForNoManager.Value,4,(InStr(Fields!LookForNoManager.Value,",OU=")-4))
one way around it I guess.
Now after I upload them I can't connect to the either the OLE DB active directory datasource directly or my linkserver ADSI datasource from the webserver? is there any trick to this definition
Here is my connection string for the linkedserver
Provider=ADsDSOObject;Data Source=lifeeai602\devsqlservices
here is my connecting sting when I tried to define the datasource directly to active directory
Provider=ADsDSOObject
Do I need to change something to point to LDAP?
|||Not sure how you connect. If it works in VS.NET but it doesn't on the server it is probably security. What credentials do you specify on the data source and what provider do you use?|||Hi,
I use windows integrated security in the development tool and I set that up on the server to access the datasource as well, here is part of the error from the RS logfile
aspnet_wp!processing!5!3/30/2007-14:25:08:: e ERROR: An exception has occurred in data source 'NewDataSource'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'NewDataSource'. > System.Data.OleDb.OleDbException: 'ADsDSOObject' failed with no error message available, result code: DB_E_NOTABLE(0x80040E37).
aspnet_wp!processing!5!3/30/2007-14:25:08:: i INFO: Merge abort handler called for ID=-1. Aborting data sources ...
aspnet_wp!dataextension!5!3/30/2007-14:25:08:: w WARN: CommandWrapper.Cancel not called, connection is not valid
aspnet_wp!processing!5!3/30/2007-14:25:08:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'NewDataSource'. > System.Data.OleDb.OleDbException: 'ADsDSOObject' failed with no error message available, result code: DB_E_NOTABLE(0x80040E37).
End of inner exception stack trace
aspnet_wp!processing!5!3/30/2007-14:25:08:: w WARN: Data source 'NewDataSource': Report processing has been aborted.
aspnet_wp!processing!5!3/30/2007-14:25:08:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'NewDataSource'. > System.Data.OleDb.OleDbException: 'ADsDSOObject' failed with no error message available, result code: DB_E_NOTABLE(0x80040E37).
End of inner exception stack trace
***************************************************************************************
Connection type:
OLE DB
Connection string:Provider=ADsDSOObject;Data Source=lifeeai602\devsqlservices
Windows integrated security