Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Monday, March 19, 2012

Dumb Transaction log question.

I know I've been asking a lot of dumb questions here lately but - One must
learn somewhere.
In my test lab cluster that I'm building, W2k3 Cluster admin put each of my
physical disks in its own group. Now I'm keep one for the cluster group, and
one for the MSDTC, which leaves me four. I'm going to use 1 disk for data
and 1 disk for tranaction logs for each instance of sql. Are there any
advantages in putting the disks in the same group. (that is putting 1 disk
for the transaction logs and 1 disk for the data in the same group). I don't
see any advantages, but I'll ask anyway.
Also on transaction logs, where do I go to move the default location of
transaction logs in each instance of SQL.
The physical disk resources need to be in the same group as the SQL server resource that will use them, and the SQL server resource needs to have a dependancy on both physical disk resources.
As to the default locations, they are specified on the "Database Settings" tab of the Server Properties dialog in EM. (Not the "Edit registration properties" near the top of the right-click menu, but the "properties" near the bottom)
If you want to move database files or transaction logs, you can detach the database, move the files, and reattach the database files by specifying the new paths in the attach dialog box. Right-click on the database and select "all tasks >> detach" to detach the database. To attach the database, right click on the "databases" container and select "all tasks >> attach database".
You can also use T-SQL to call sp_detach and sp_attach, but the GUI works fine.
Just make sure that the SQL server resource has the physical disk resource(s) as a dependancy(ies) or you will not be able to attach the files.
Play around until you are comfortable with this stuff before you go live. It's quite geeky fun!
Good Luck
jg

Quote:

Originally posted by Wayne
I know I've been asking a lot of dumb questions here lately but - One must
learn somewhere.
In my test lab cluster that I'm building, W2k3 Cluster admin put each of my
physical disks in its own group. Now I'm keep one for the cluster group, and
one for the MSDTC, which leaves me four. I'm going to use 1 disk for data
and 1 disk for tranaction logs for each instance of sql. Are there any
advantages in putting the disks in the same group. (that is putting 1 disk
for the transaction logs and 1 disk for the data in the same group). I don't
see any advantages, but I'll ask anyway.
Also on transaction logs, where do I go to move the default location of
transaction logs in each instance of SQL.

|||There is no dumb question.
Its a good question. Since you are using one disk for data and another disk for log, both the disk resources will need to be in SAME SQL Server group (along with other SQL Server resources). Infact, if they are on
seperate group SQL Server cannot use it. During installation, we can just specify one disk. After installation, one has to move the second disk to the SQL group, take SQL Server resource offline, add the second disk
as a dependency for SQL Server resource and then take the SQL Server resource online. After that you can use your normal steps/techniques to move the logs on the second disk.
HTH,
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Wednesday, March 7, 2012

DTSTransformationSTATus constants !

Hi
I am building a DTS package, to read a IIS Log files into SQL-Server database file through a DTS package.

It is runing smooth, but sometimes the Log file include some CR LF, unexpected text,...etc so the DTS package can't read the fields perfectly and it fails, and I recieve an error.

I am up to use ActiveX Script in VBScript language to have more control over the flow of the transformation of the data operation.

Now, how can I use the DTSTransformationSTATUS constants to make my loops and check the different source fields?

I will appreciate an examples that control the folow of the Transformation of a TEXT file.

Thank you for your help in advance.

KhalidHow big are the log files ? What are the patterns to these hiccups ? Have you thought about writing a small app(vb,perl) that corrects the file first then use dts to import the file - you could actually make this a part of your dts package (calling the app) ?|||The log files are 50 MB to 60 MB in size.

About writing an Application to correct the log file, this is exactuly what I am up to, and since DTS is providing a powerful tools through VBScript or VBJScript to have more control over the Transformation process, I have decided to use these tools.

There are some constants such as DTSTransformationSTATUS_Error, DTSTransformationSTATUS_ErrorInfo,.. etc . These constants can be used to control the flow of the Transformation process and to handle the errors if any.

I need an example using these constants to make things more clear for me to build my own application.

Do you have any idea about these constants?

Thanks

DTSTransform.DataConvert programmatic access?

I am trying building a package from code. I have been able to follow the SSIS samples and build my control flow with foreach loop and SQL Commands pretty easily.

The data flow has been a different story, I am struggling with input and output columns. I trying to read from a flatfile, convert data, perform a lookup, and update or insert based on the results of the lookup. I was able to build this package in the designer and it works just as I want, but I am having problems duplicating the data flow in the code.

I was able add the flatfile, data conversion, and insert controls on the data flow and linked them together. However, I cannot figure out how get the input columns in the data convert object to become selected and generate the converted output columns.

I have tried to refresh metadata and mappings column, but to no success. The only custom property for this component seems to be SourceInputColumnLineageId, but I cannot figure how to set it. Can someone give me nudge or push in the right direction?

Here is what is left of my code:

IDTSComponentMetaData90 convert= dataFlow.ComponentMetaDataCollection.New();
convert.ComponentClassID = "DTSTransform.DataConvert";

// Get the design time instance of the component and initialize the component
CManagedComponentWrapper instance = convert.Instantiate();
instance.ProvideComponentProperties();

IDTSPath90 path = dataFlow.PathCollection.New();
path.AttachPathAndPropagateNotifications(srcComponent.OutputCollection[0], onvComponent.InputCollection[0]);

// Reinitialize the metadata.
instance.AcquireConnections(null);
instance.ReinitializeMetaData();
instance.ReleaseConnections();

// Iterate through the inputs of the component.
IDTSVirtualInput90 vInputLkUp = convert.InputCollection[0].GetVirtualInput();
foreach (IDTSVirtualInputColumn90 vColumn in vInputLkUp.VirtualInputColumnCollection)
{
IDTSInputColumn90 col = instance.SetUsageType(convert.InputCollection[0].ID, vInputLkUp, vColumn.LineageID, DTSUsageType.UT_READONLY);
//instance.SetInputColumnProperty(convert.InputCollection[0].ID, col.ID, "SourceInputColumnLineageId", 1);
}


Did you find a resolution to this issue? I am struggling through the same thing and have seen no example usage of the data conversion transformation anywhere.

Phil Burns

Aptify

DTSTransform.DataConvert programmatic access?

I am trying building a package from code. I have been able to follow the SSIS samples and build my control flow with foreach loop and SQL Commands pretty easily.

The data flow has been a different story, I am struggling with input and output columns. I trying to read from a flatfile, convert data, perform a lookup, and update or insert based on the results of the lookup. I was able to build this package in the designer and it works just as I want, but I am having problems duplicating the data flow in the code.

I was able add the flatfile, data conversion, and insert controls on the data flow and linked them together. However, I cannot figure out how get the input columns in the data convert object to become selected and generate the converted output columns.

I have tried to refresh metadata and mappings column, but to no success. The only custom property for this component seems to be SourceInputColumnLineageId, but I cannot figure how to set it. Can someone give me nudge or push in the right direction?

Here is what is left of my code:

IDTSComponentMetaData90 convert= dataFlow.ComponentMetaDataCollection.New();
convert.ComponentClassID = "DTSTransform.DataConvert";

// Get the design time instance of the component and initialize the component
CManagedComponentWrapper instance = convert.Instantiate();
instance.ProvideComponentProperties();

IDTSPath90 path = dataFlow.PathCollection.New();
path.AttachPathAndPropagateNotifications(srcComponent.OutputCollection[0], onvComponent.InputCollection[0]);

// Reinitialize the metadata.
instance.AcquireConnections(null);
instance.ReinitializeMetaData();
instance.ReleaseConnections();

// Iterate through the inputs of the component.
IDTSVirtualInput90 vInputLkUp = convert.InputCollection[0].GetVirtualInput();
foreach (IDTSVirtualInputColumn90 vColumn in vInputLkUp.VirtualInputColumnCollection)
{
IDTSInputColumn90 col = instance.SetUsageType(convert.InputCollection[0].ID, vInputLkUp, vColumn.LineageID, DTSUsageType.UT_READONLY);
//instance.SetInputColumnProperty(convert.InputCollection[0].ID, col.ID, "SourceInputColumnLineageId", 1);
}


Did you find a resolution to this issue? I am struggling through the same thing and have seen no example usage of the data conversion transformation anywhere.

Phil Burns

Aptify