Wednesday, March 21, 2012
Filegroups Properties
I am fairly new to sql server and need some help:-
We have a database with several file groups e.g primarry,
data1,data2,data3,index1,index2,index3 etc. Each file group has one file
associated with this and they are on seperated disks.
Is there any sql code that will display each table or index and its
allocated filegroup?
Basically I want to get a list of what is allocated to each file group, it
will take me hours within enterprise manager looking at each table.
Thanks for your help.
Jason - Hull, EnglandYes, See sysindexes system table...there is a column groupid, join this wit
h
sysfilegroups... If a clustered index exists in a filegroup then it means th
e
table data also exists in the same filegroup since clustered index and table
data are the same...If a table does not have a clustered index, we will not
know which filegroup it exists in any system table, but you can find out if
you script the table...
HTH..
"new_sql_dba" wrote:
> Hello
> I am fairly new to sql server and need some help:-
> We have a database with several file groups e.g primarry,
> data1,data2,data3,index1,index2,index3 etc. Each file group has one file
> associated with this and they are on seperated disks.
> Is there any sql code that will display each table or index and its
> allocated filegroup?
> Basically I want to get a list of what is allocated to each file group, it
> will take me hours within enterprise manager looking at each table.
> Thanks for your help.
> Jason - Hull, England|||Thanks for your help
How do you script the table?
"Ranga" wrote:
[vbcol=seagreen]
> Yes, See sysindexes system table...there is a column groupid, join this w
ith
> sysfilegroups... If a clustered index exists in a filegroup then it means
the
> table data also exists in the same filegroup since clustered index and tab
le
> data are the same...If a table does not have a clustered index, we will no
t
> know which filegroup it exists in any system table, but you can find out i
f
> you script the table...
> HTH..
> "new_sql_dba" wrote:
>|||For instance EM, right-click the table. Or QA, the same.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"new_sql_dba" <newsqldba@.discussions.microsoft.com> wrote in message
news:29285C84-0A23-4276-B6C2-ADF5B665F41C@.microsoft.com...[vbcol=seagreen]
> Thanks for your help
> How do you script the table?
>
> "Ranga" wrote:
>
Filegroups Properties
I am fairly new to sql server and need some help:-
We have a database with several file groups e.g primarry,
data1,data2,data3,index1,index2,index3 etc. Each file group has one file
associated with this and they are on seperated disks.
Is there any sql code that will display each table or index and its
allocated filegroup?
Basically I want to get a list of what is allocated to each file group, it
will take me hours within enterprise manager looking at each table.
Thanks for your help.
Jason - Hull, EnglandYes, See sysindexes system table...there is a column groupid, join this with
sysfilegroups... If a clustered index exists in a filegroup then it means the
table data also exists in the same filegroup since clustered index and table
data are the same...If a table does not have a clustered index, we will not
know which filegroup it exists in any system table, but you can find out if
you script the table...
HTH..
"new_sql_dba" wrote:
> Hello
> I am fairly new to sql server and need some help:-
> We have a database with several file groups e.g primarry,
> data1,data2,data3,index1,index2,index3 etc. Each file group has one file
> associated with this and they are on seperated disks.
> Is there any sql code that will display each table or index and its
> allocated filegroup?
> Basically I want to get a list of what is allocated to each file group, it
> will take me hours within enterprise manager looking at each table.
> Thanks for your help.
> Jason - Hull, England|||Thanks for your help
How do you script the table?
"Ranga" wrote:
> Yes, See sysindexes system table...there is a column groupid, join this with
> sysfilegroups... If a clustered index exists in a filegroup then it means the
> table data also exists in the same filegroup since clustered index and table
> data are the same...If a table does not have a clustered index, we will not
> know which filegroup it exists in any system table, but you can find out if
> you script the table...
> HTH..
> "new_sql_dba" wrote:
> > Hello
> >
> > I am fairly new to sql server and need some help:-
> >
> > We have a database with several file groups e.g primarry,
> > data1,data2,data3,index1,index2,index3 etc. Each file group has one file
> > associated with this and they are on seperated disks.
> >
> > Is there any sql code that will display each table or index and its
> > allocated filegroup?
> >
> > Basically I want to get a list of what is allocated to each file group, it
> > will take me hours within enterprise manager looking at each table.
> >
> > Thanks for your help.
> >
> > Jason - Hull, England|||For instance EM, right-click the table. Or QA, the same.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"new_sql_dba" <newsqldba@.discussions.microsoft.com> wrote in message
news:29285C84-0A23-4276-B6C2-ADF5B665F41C@.microsoft.com...
> Thanks for your help
> How do you script the table?
>
> "Ranga" wrote:
>> Yes, See sysindexes system table...there is a column groupid, join this with
>> sysfilegroups... If a clustered index exists in a filegroup then it means the
>> table data also exists in the same filegroup since clustered index and table
>> data are the same...If a table does not have a clustered index, we will not
>> know which filegroup it exists in any system table, but you can find out if
>> you script the table...
>> HTH..
>> "new_sql_dba" wrote:
>> > Hello
>> >
>> > I am fairly new to sql server and need some help:-
>> >
>> > We have a database with several file groups e.g primarry,
>> > data1,data2,data3,index1,index2,index3 etc. Each file group has one file
>> > associated with this and they are on seperated disks.
>> >
>> > Is there any sql code that will display each table or index and its
>> > allocated filegroup?
>> >
>> > Basically I want to get a list of what is allocated to each file group, it
>> > will take me hours within enterprise manager looking at each table.
>> >
>> > Thanks for your help.
>> >
>> > Jason - Hull, Englandsql
Filegroups Properties
I am fairly new to sql server and need some help:-
We have a database with several file groups e.g primarry,
data1,data2,data3,index1,index2,index3 etc. Each file group has one file
associated with this and they are on seperated disks.
Is there any sql code that will display each table or index and its
allocated filegroup?
Basically I want to get a list of what is allocated to each file group, it
will take me hours within enterprise manager looking at each table.
Thanks for your help.
Jason - Hull, England
Yes, See sysindexes system table...there is a column groupid, join this with
sysfilegroups... If a clustered index exists in a filegroup then it means the
table data also exists in the same filegroup since clustered index and table
data are the same...If a table does not have a clustered index, we will not
know which filegroup it exists in any system table, but you can find out if
you script the table...
HTH..
"new_sql_dba" wrote:
> Hello
> I am fairly new to sql server and need some help:-
> We have a database with several file groups e.g primarry,
> data1,data2,data3,index1,index2,index3 etc. Each file group has one file
> associated with this and they are on seperated disks.
> Is there any sql code that will display each table or index and its
> allocated filegroup?
> Basically I want to get a list of what is allocated to each file group, it
> will take me hours within enterprise manager looking at each table.
> Thanks for your help.
> Jason - Hull, England
|||Thanks for your help
How do you script the table?
"Ranga" wrote:
[vbcol=seagreen]
> Yes, See sysindexes system table...there is a column groupid, join this with
> sysfilegroups... If a clustered index exists in a filegroup then it means the
> table data also exists in the same filegroup since clustered index and table
> data are the same...If a table does not have a clustered index, we will not
> know which filegroup it exists in any system table, but you can find out if
> you script the table...
> HTH..
> "new_sql_dba" wrote:
|||For instance EM, right-click the table. Or QA, the same.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"new_sql_dba" <newsqldba@.discussions.microsoft.com> wrote in message
news:29285C84-0A23-4276-B6C2-ADF5B665F41C@.microsoft.com...[vbcol=seagreen]
> Thanks for your help
> How do you script the table?
>
> "Ranga" wrote:
Friday, March 9, 2012
filegroup and table
filgroup the table is,
Which catalog view/DM /SP can give the same info "on which filegroup my
table is"?Check out the following:
sys.indexes has a column data_space_id.
sys.filegroups also has that column.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SalamElias" <eliassal@.online.nospam> wrote in message
news:DA0B190B-B9C8-4378-8F44-9F6274830648@.microsoft.com...
> In SQL studio, when examining a table properties, we can see on which
> filgroup the table is,
> Which catalog view/DM /SP can give the same info "on which filegroup my
> table is"?|||Thanks, but I am asking about Tables not indexes. Correct, the sys.indexes
has the field but not sys.tables.
Would you please explaing if your answer refers to make a join to get the
property in someway.
thanks again
"Tibor Karaszi" wrote:
> Check out the following:
> sys.indexes has a column data_space_id.
> sys.filegroups also has that column.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "SalamElias" <eliassal@.online.nospam> wrote in message
> news:DA0B190B-B9C8-4378-8F44-9F6274830648@.microsoft.com...
>|||Thanks, I am talking about tables not indexes. You are correct, sys.indexes,
sys.database_files and sys.filegroups contain this field but not sys.tables.
If you ment to make a join to retreieve the value for a table,would you
please indicate how, thanks again
"SalamElias" wrote:
> In SQL studio, when examining a table properties, we can see on which
> filgroup the table is,
> Which catalog view/DM /SP can give the same info "on which filegroup my
> table is"?|||A table is also represented in sys.indexes. Either with indid 1 or 0. You ne
ed to look in
sys.indexes because this show the physical location for a heap or a b-tree,
sys.tables don't give
you that information.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SalamElias" <eliassal@.online.nospam> wrote in message
news:A42C7C88-2A2D-4A92-BA3B-E8C6E36D3F3B@.microsoft.com...[vbcol=seagreen]
> Thanks, but I am asking about Tables not indexes. Correct, the sys.indexes
> has the field but not sys.tables.
> Would you please explaing if your answer refers to make a join to get the
> property in someway.
> thanks again
> "Tibor Karaszi" wrote:
>|||Hello Salam,
I agree with Tibor that sys.indexes also has information of table. When
index_id =0, it is heap, and index_id=1, it is clustered index. Please see
following link in BOL for details:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/066bd9ac-6554-4297-88fe-
d740de1f94a8.htm
Therefore, you could use the following information to get the filgroup
information of tables.
select tbl.name,
dsidx.name, dsidx.type
FROM
sys.tables AS tbl
INNER JOIN sys.indexes AS idx ON idx.object_id = tbl.object_id and
idx.index_id < 2
LEFT OUTER JOIN sys.data_spaces AS dstext ON tbl.lob_data_space_id =
dstext.data_space_id
LEFT OUTER JOIN sys.data_spaces AS dsidx ON dsidx.data_space_id =
idx.data_space_id
In addtion, if you use profiler to trace the query when you show the
properties of a table, you shall see the query also references
sys.indexes/sys.tables/sys.data_space.
If anything is unclear, please feel free to let's know. We look forward to
your reply. Thanks.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications
<http://msdn.microsoft.com/subscript...ps/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscript...rt/default.aspx>.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
filegroup and table
filgroup the table is,
Which catalog view/DM /SP can give the same info "on which filegroup my
table is"?Check out the following:
sys.indexes has a column data_space_id.
sys.filegroups also has that column.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SalamElias" <eliassal@.online.nospam> wrote in message
news:DA0B190B-B9C8-4378-8F44-9F6274830648@.microsoft.com...
> In SQL studio, when examining a table properties, we can see on which
> filgroup the table is,
> Which catalog view/DM /SP can give the same info "on which filegroup my
> table is"?|||Thanks, but I am asking about Tables not indexes. Correct, the sys.indexes
has the field but not sys.tables.
Would you please explaing if your answer refers to make a join to get the
property in someway.
thanks again
"Tibor Karaszi" wrote:
> Check out the following:
> sys.indexes has a column data_space_id.
> sys.filegroups also has that column.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "SalamElias" <eliassal@.online.nospam> wrote in message
> news:DA0B190B-B9C8-4378-8F44-9F6274830648@.microsoft.com...
> > In SQL studio, when examining a table properties, we can see on which
> > filgroup the table is,
> > Which catalog view/DM /SP can give the same info "on which filegroup my
> > table is"?
>|||Thanks, I am talking about tables not indexes. You are correct, sys.indexes,
sys.database_files and sys.filegroups contain this field but not sys.tables.
If you ment to make a join to retreieve the value for a table,would you
please indicate how, thanks again
"SalamElias" wrote:
> In SQL studio, when examining a table properties, we can see on which
> filgroup the table is,
> Which catalog view/DM /SP can give the same info "on which filegroup my
> table is"?|||A table is also represented in sys.indexes. Either with indid 1 or 0. You need to look in
sys.indexes because this show the physical location for a heap or a b-tree, sys.tables don't give
you that information.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SalamElias" <eliassal@.online.nospam> wrote in message
news:A42C7C88-2A2D-4A92-BA3B-E8C6E36D3F3B@.microsoft.com...
> Thanks, but I am asking about Tables not indexes. Correct, the sys.indexes
> has the field but not sys.tables.
> Would you please explaing if your answer refers to make a join to get the
> property in someway.
> thanks again
> "Tibor Karaszi" wrote:
>> Check out the following:
>> sys.indexes has a column data_space_id.
>> sys.filegroups also has that column.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "SalamElias" <eliassal@.online.nospam> wrote in message
>> news:DA0B190B-B9C8-4378-8F44-9F6274830648@.microsoft.com...
>> > In SQL studio, when examining a table properties, we can see on which
>> > filgroup the table is,
>> > Which catalog view/DM /SP can give the same info "on which filegroup my
>> > table is"?
>>|||Hello Salam,
I agree with Tibor that sys.indexes also has information of table. When
index_id =0, it is heap, and index_id=1, it is clustered index. Please see
following link in BOL for details:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/066bd9ac-6554-4297-88fe-
d740de1f94a8.htm
Therefore, you could use the following information to get the filgroup
information of tables.
select tbl.name,
dsidx.name, dsidx.type
FROM
sys.tables AS tbl
INNER JOIN sys.indexes AS idx ON idx.object_id = tbl.object_id and
idx.index_id < 2
LEFT OUTER JOIN sys.data_spaces AS dstext ON tbl.lob_data_space_id =dstext.data_space_id
LEFT OUTER JOIN sys.data_spaces AS dsidx ON dsidx.data_space_id =idx.data_space_id
In addtion, if you use profiler to trace the query when you show the
properties of a table, you shall see the query also references
sys.indexes/sys.tables/sys.data_space.
If anything is unclear, please feel free to let's know. We look forward to
your reply. Thanks.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Wednesday, March 7, 2012
File System Task Error
Hi,
I am using the 'File System Task ' to create a directory structure (e.g ..\DB; ..\DB\LOG; ..\DB\BACKUP; )
I set following properties for the single tasks: UseDirectoryIfExists = True; Operation = Create Directory;
The task works fine before installing SP1 on the server. Now it creates an ERROR if the directory already exists and it is not empty.
SSIS package "testcreatedirectory.dtsx" starting.
Warning: 0xC002915A at Create DB Directory, File System Task: The Directory already exists.
Error: 0xC002F304 at Create DB Directory, File System Task: An error occurred with the following error message: "Das Verzeichnis ist nicht leer.". (The Directory is not empty.)
Task failed: Create DB Directory
Warning: 0x80019002 at Create Directorys: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at testcreatedirectory: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "testcreatedirectory.dtsx" finished: Failure.
Does anyone know if this is a known bug in SP1 or maybe its a feature and if there already exists a solution (maybe I have to set additional properties I have not discovered as yet).
Thanks in advance
Holger
I don't know if there is a proper fix for this but you might want to use a item loop container to loop over the paths that you want created and then just have two tasks in there. One task would be a script task to check the existance and the other to create if it does not.
This would achieve the same result as the former single task.
Fred
|||Has anyone been able to solve this problem without an unofficial workaround?
All my packages uses this task to ease logging and currently they are all failing.
No, I have not resolved the issue yet. The only soloution I have are work arounds.
|||Could some body help me with this same issue. How do we do the work around method.
The first time i run it works fine and creates some file inside but when i execute the pacakge for the second time. It throughs up error saying that the directory is not empty. If i go and delete the files manually it write the files corretly. i have the File system task with UseIFDirectoryExists = True and operation = create directory.
Any help,
Thanks,
JA
|||I had the same issue, but realized that within the constraints of the task there was no "real" solution. I set the "Force Execution Result" property of the File Systme Object (FSO) Task to "Success". This solved the issue. It would still create a directory if it didn't exist and leave it if it didn't. Then I used another FSO task to move the files I wanted to rename to the new directory. So in this case I used the move option to move and rename. I often use the move option to rename things, if the rename won't work. To tell you the truth the move option might do what you wan't as well. I can't tell because I used both, first the create, then the move.|||So you had the same the FSO with ForceExecutionResult = success and usedirectoryif exists = true and operation = create Directory. It does not work for me. Even if i use next step to move files to a new directory. you have to create the directory in first place and then move and then rename or delete. this is what i get.
Source: Creating Directoy Folder
Description: The Directory already exists.
End Warning
Error: 2006-09-08 12:21:31.59
Code: 0xC002F304
Source: Creating Directoy Folder
Description: An error occurred with the following error message: "The directory is not empty.
Any idea about this error
Thanks,
JA
|||Like I said, there is no "real" solution with the task. It just doesn't do what it should. What I offered was a temporary fix to have the task move on regardless. The only other fix, as others have mentioned is doing it in a script, utilizing the File System Object. It seems to be a bug.File System Task Error
Hi,
I am using the 'File System Task ' to create a directory structure (e.g ..\DB; ..\DB\LOG; ..\DB\BACKUP; )
I set following properties for the single tasks: UseDirectoryIfExists = True; Operation = Create Directory;
The task works fine before installing SP1 on the server. Now it creates an ERROR if the directory already exists and it is not empty.
SSIS package "testcreatedirectory.dtsx" starting.
Warning: 0xC002915A at Create DB Directory, File System Task: The Directory already exists.
Error: 0xC002F304 at Create DB Directory, File System Task: An error occurred with the following error message: "Das Verzeichnis ist nicht leer.". (The Directory is not empty.)
Task failed: Create DB Directory
Warning: 0x80019002 at Create Directorys: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at testcreatedirectory: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "testcreatedirectory.dtsx" finished: Failure.
Does anyone know if this is a known bug in SP1 or maybe its a feature and if there already exists a solution (maybe I have to set additional properties I have not discovered as yet).
Thanks in advance
Holger
I don't know if there is a proper fix for this but you might want to use a item loop container to loop over the paths that you want created and then just have two tasks in there. One task would be a script task to check the existance and the other to create if it does not.
This would achieve the same result as the former single task.
Fred
|||Has anyone been able to solve this problem without an unofficial workaround?
All my packages uses this task to ease logging and currently they are all failing.
No, I have not resolved the issue yet. The only soloution I have are work arounds.
|||Could some body help me with this same issue. How do we do the work around method.
The first time i run it works fine and creates some file inside but when i execute the pacakge for the second time. It throughs up error saying that the directory is not empty. If i go and delete the files manually it write the files corretly. i have the File system task with UseIFDirectoryExists = True and operation = create directory.
Any help,
Thanks,
JA
|||I had the same issue, but realized that within the constraints of the task there was no "real" solution. I set the "Force Execution Result" property of the File Systme Object (FSO) Task to "Success". This solved the issue. It would still create a directory if it didn't exist and leave it if it didn't. Then I used another FSO task to move the files I wanted to rename to the new directory. So in this case I used the move option to move and rename. I often use the move option to rename things, if the rename won't work. To tell you the truth the move option might do what you wan't as well. I can't tell because I used both, first the create, then the move.|||So you had the same the FSO with ForceExecutionResult = success and usedirectoryif exists = true and operation = create Directory. It does not work for me. Even if i use next step to move files to a new directory. you have to create the directory in first place and then move and then rename or delete. this is what i get.
Source: Creating Directoy Folder
Description: The Directory already exists.
End Warning
Error: 2006-09-08 12:21:31.59
Code: 0xC002F304
Source: Creating Directoy Folder
Description: An error occurred with the following error message: "The directory is not empty.
Any idea about this error
Thanks,
JA
|||Like I said, there is no "real" solution with the task. It just doesn't do what it should. What I offered was a temporary fix to have the task move on regardless. The only other fix, as others have mentioned is doing it in a script, utilizing the File System Object. It seems to be a bug.File System Task Error
Hi,
I am using the 'File System Task ' to create a directory structure (e.g ..\DB; ..\DB\LOG; ..\DB\BACKUP; )
I set following properties for the single tasks: UseDirectoryIfExists = True; Operation = Create Directory;
The task works fine before installing SP1 on the server. Now it creates an ERROR if the directory already exists and it is not empty.
SSIS package "testcreatedirectory.dtsx" starting.
Warning: 0xC002915A at Create DB Directory, File System Task: The Directory already exists.
Error: 0xC002F304 at Create DB Directory, File System Task: An error occurred with the following error message: "Das Verzeichnis ist nicht leer.". (The Directory is not empty.)
Task failed: Create DB Directory
Warning: 0x80019002 at Create Directorys: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at testcreatedirectory: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "testcreatedirectory.dtsx" finished: Failure.
Does anyone know if this is a known bug in SP1 or maybe its a feature and if there already exists a solution (maybe I have to set additional properties I have not discovered as yet).
Thanks in advance
Holger
I don't know if there is a proper fix for this but you might want to use a item loop container to loop over the paths that you want created and then just have two tasks in there. One task would be a script task to check the existance and the other to create if it does not.
This would achieve the same result as the former single task.
Fred
|||Has anyone been able to solve this problem without an unofficial workaround?
All my packages uses this task to ease logging and currently they are all failing.
No, I have not resolved the issue yet. The only soloution I have are work arounds.
|||Could some body help me with this same issue. How do we do the work around method.
The first time i run it works fine and creates some file inside but when i execute the pacakge for the second time. It throughs up error saying that the directory is not empty. If i go and delete the files manually it write the files corretly. i have the File system task with UseIFDirectoryExists = True and operation = create directory.
Any help,
Thanks,
JA
|||I had the same issue, but realized that within the constraints of the task there was no "real" solution. I set the "Force Execution Result" property of the File Systme Object (FSO) Task to "Success". This solved the issue. It would still create a directory if it didn't exist and leave it if it didn't. Then I used another FSO task to move the files I wanted to rename to the new directory. So in this case I used the move option to move and rename. I often use the move option to rename things, if the rename won't work. To tell you the truth the move option might do what you wan't as well. I can't tell because I used both, first the create, then the move.|||So you had the same the FSO with ForceExecutionResult = success and usedirectoryif exists = true and operation = create Directory. It does not work for me. Even if i use next step to move files to a new directory. you have to create the directory in first place and then move and then rename or delete. this is what i get.
Source: Creating Directoy Folder
Description: The Directory already exists.
End Warning
Error: 2006-09-08 12:21:31.59
Code: 0xC002F304
Source: Creating Directoy Folder
Description: An error occurred with the following error message: "The directory is not empty.
Any idea about this error
Thanks,
JA
|||Like I said, there is no "real" solution with the task. It just doesn't do what it should. What I offered was a temporary fix to have the task move on regardless. The only other fix, as others have mentioned is doing it in a script, utilizing the File System Object. It seems to be a bug.Sunday, February 26, 2012
File rollover in a trace
Thanks for your helpBest bet would be to let Profiler generate the script, then see how they do it. I believe all they do is to set a file size, and the next file is created when the first file gets to that size.
File properties for files stored in IMAGE field
properties (DocType, Keyword, etc) of files stored and indexed in image
fields? I'm searching the indexed contents with no problem but I also
want to search the properties. I know that this isn't possible in
versions prior to 2005 but I've seen referances that 2005 enables this,
I just can't find the details on how to do it. Was it maybe a feature
that got pulled before the finial release?
Hello,
Its not available directly. You would have to use index server and then your
performance will plummit
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in
> image fields? I'm searching the indexed contents with no problem but
> I also want to search the properties. I know that this isn't possible
> in versions prior to 2005 but I've seen referances that 2005 enables
> this, I just can't find the details on how to do it. Was it maybe a
> feature that got pulled before the finial release?
>
|||Its possible, I'll post a repro later.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<ddaiker@.gmail.com> wrote in message
news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in image
> fields? I'm searching the indexed contents with no problem but I also
> want to search the properties. I know that this isn't possible in
> versions prior to 2005 but I've seen referances that 2005 enables this,
> I just can't find the details on how to do it. Was it maybe a feature
> that got pulled before the finial release?
>
|||try this - save this as createdocument.vbs, make sure you have a c:\temp
directory.
set wordobj=createobject("Word.application")
set activedoc=wordObj.documents.Add
activeDoc.BuiltInDocumentProperties.item(2)="summa ry info is written here"
set docProp=ActiveDoc.CustomDocumentProperties
docProp.add "Property1", 0,4,"Property1Value"
activedoc.saveAs "C:\temp\Document1.doc"
activedoc.close
wordobj.quit
set docprop=nothing
set activedoc=nothing
set wordobj=nothing
After this has run this script in your SQL 2005 database.
create database test
use test
sp_fulltext_database 'enable'
GO
Create table DocumentPropertyTest(pk int not null identity constraint
DocumentPropertyTestPK primary key, imagecol image, documenttype char(4))
GO
create fulltext catalog doc as default
GO
create fulltext index on DocumentPropertyTest(imagecol type column
documenttype) key index DocumentPropertyTestPK
GO
then run this, save it as loadme.vbs
Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.RecordSet")
Set objStream=CreateObject("ADODB.Stream")
objConn.Open
"Provider=SQLNCLI;Server=dev-hcotter;Database=fulltext;UID=sa;PWD=se1cure#;"
Set objFileSystem=createobject("Scripting.FileSystemOb ject")
Set objDir=objFileSystem.GetFolder("c:\temp")
for each objFile in objDir.Files
count=count+1
wscript.echo objFile.name
objConn.Execute "insert into DocumentPropertyTest (ImageCol,documenttype)
values ('Jibberish','doc')"
objRs.Open "select imagecol from DocumentPropertyTest where pk=" & count,
objConn, 1, 3
objStream.Type = 1
objStream.Open
objStream.LoadFromFile objFile.Path
objRs.Fields("ImageCol").Value=objStream.Read
objRs.Update
objRs.Close
objStream.Close
next
objConn.Close
Set objStream=nothing
Set objShell=nothing
Set objConn=nothing
Set objFileSystem=nothing
Set objDir=nothing
then try this
select * from DocumentPropertyTest where contains(*,'Property1Value') -- no
hit
select * from DocumentPropertyTest where contains(*,'summary') --hit
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OgxTfxwIHHA.320@.TK2MSFTNGP06.phx.gbl...
> Its possible, I'll post a repro later.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> <ddaiker@.gmail.com> wrote in message
> news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
>
|||Wow, thank you for taking the time to write and post all that.
Unfortunatly I'm getting the same results with your sample as I got
with my own testing. The query with "summary" doesn't return a hit
either. I checked the poperties of the doc file from explorer and from
Word and the "Subject" and "Property1" properties are set correctly.
To make sure the indexing was working I put some content in the .doc
and added it agian. If I search for data in the file I get a hit, but
not for anything in the "Subject" property. I tried "summary" and
"written" with no luck.
Any idea what might be wrong?
Here is my setup of everything that I think could be relavant.
Windows XP SP2
IE7
SQL Server 2005 Developer Editition installed as second instance beside
SQL Server 2000 Developer Edition
Office 2003 SP2
Visual Studio 2003 and Visual Studio 2005
My Offfilt.dll version is 2003.5.28.0
|||So my sample does not work on your machine? It works on mine with the same
setup. It is the SQL 2005 instance you can't get it to work on right?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166535897.899606.47840@.73g2000cwn.googlegrou ps.com...
> Wow, thank you for taking the time to write and post all that.
> Unfortunatly I'm getting the same results with your sample as I got
> with my own testing. The query with "summary" doesn't return a hit
> either. I checked the poperties of the doc file from explorer and from
> Word and the "Subject" and "Property1" properties are set correctly.
> To make sure the indexing was working I put some content in the .doc
> and added it agian. If I search for data in the file I get a hit, but
> not for anything in the "Subject" property. I tried "summary" and
> "written" with no luck.
> Any idea what might be wrong?
> Here is my setup of everything that I think could be relavant.
> Windows XP SP2
> IE7
> SQL Server 2005 Developer Editition installed as second instance beside
> SQL Server 2000 Developer Edition
> Office 2003 SP2
> Visual Studio 2003 and Visual Studio 2005
> My Offfilt.dll version is 2003.5.28.0
>
|||Ok, it seems I'm having bigger problems. filtdump only brings back the
content of 2 Word and 1 Excel document that has properties on it. I
ran one of my files through an Index Server catalog and queried it on a
word in it's subject and it didn't get a hit either. I'm having issues
with the iFilter but I need to look into more. Do our versions of
offfilt.dll match?
|||Can you send me some of your problem docs?
My version has a date stamp of 8/18/2006 at 8:34, and has a version of
2006.0.5486.108.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||There was an error in my repro. There were some pre-existing word docs in
the doc directory and one of them had the word summary in it.
I can't get it to work now either, except with html. Once upon a time it did
work on RTM.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||I received word from Microsoft that SQL FTS 2005 does index and allow
querying of document properties should they be emitted by the iFilters as
strings.
The problem David and myself were having was that for the Word and Excel
documents the properties were not part of the Office documents themselves
but were stored in the file system.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23FOeh9KJHHA.3936@.TK2MSFTNGP02.phx.gbl...
> There was an error in my repro. There were some pre-existing word docs in
> the doc directory and one of them had the word summary in it.
> I can't get it to work now either, except with html. Once upon a time it
> did work on RTM.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "ddaiker" <ddaiker@.gmail.com> wrote in message
> news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
>
file properties
I'm having a problem need your help:
I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.
Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.
Thanks in advanced,
TNThere's a bunch of system procedures that can get your started; sp_helpfile and sp_spaceused.|||thanks for your help
but I want to know exactly used space in data file to shrink to.
because I have a DB:
current size : 10000MB
space used : 814 MB
I want ot shrink the data file down around 850 MB.
Thanks
TN|||The best way is to query sysindexes system table. Look into sp_spaceused code to see how the used space is computed.|||See BOL
DBCC SHRINKDATABASE|||use master;
select
'Data device'=fileproperty('master', 'spaceused'),
'Log device'=fileproperty('mastlog', 'spaceused')