We are using database having a current size of over 300GB
to store attachment files in an image column of a table.
is the approach of exporting and importing data records
from the table a good way to defragment the table? if so,
is it possible to export the data records as a flat file
to a tape drive.
thanks.
There are commands in SQL Server to defrag and reorg. I strongly suggest you start by reading below
excellent whitepaper:
http://www.microsoft.com/technet/pro.../ss2kidbp.mspx
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SY" <anonymous@.discussions.microsoft.com> wrote in message
news:1dd4a01c454d4$11ae92f0$a301280a@.phx.gbl...
> We are using database having a current size of over 300GB
> to store attachment files in an image column of a table.
> is the approach of exporting and importing data records
> from the table a good way to defragment the table? if so,
> is it possible to export the data records as a flat file
> to a tape drive.
> thanks.
>
Showing posts with label store. Show all posts
Showing posts with label store. Show all posts
Monday, March 19, 2012
Defragmentation of table
We are using database having a current size of over 300GB
to store attachment files in an image column of a table.
is the approach of exporting and importing data records
from the table a good way to defragment the table? if so,
is it possible to export the data records as a flat file
to a tape drive.
thanks.There are commands in SQL Server to defrag and reorg. I strongly suggest you
start by reading below
excellent whitepaper:
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SY" <anonymous@.discussions.microsoft.com> wrote in message
news:1dd4a01c454d4$11ae92f0$a301280a@.phx
.gbl...
> We are using database having a current size of over 300GB
> to store attachment files in an image column of a table.
> is the approach of exporting and importing data records
> from the table a good way to defragment the table? if so,
> is it possible to export the data records as a flat file
> to a tape drive.
> thanks.
>
to store attachment files in an image column of a table.
is the approach of exporting and importing data records
from the table a good way to defragment the table? if so,
is it possible to export the data records as a flat file
to a tape drive.
thanks.There are commands in SQL Server to defrag and reorg. I strongly suggest you
start by reading below
excellent whitepaper:
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SY" <anonymous@.discussions.microsoft.com> wrote in message
news:1dd4a01c454d4$11ae92f0$a301280a@.phx
.gbl...
> We are using database having a current size of over 300GB
> to store attachment files in an image column of a table.
> is the approach of exporting and importing data records
> from the table a good way to defragment the table? if so,
> is it possible to export the data records as a flat file
> to a tape drive.
> thanks.
>
Defragmentation of table
We are using database having a current size of over 300GB
to store attachment files in an image column of a table.
is the approach of exporting and importing data records
from the table a good way to defragment the table? if so,
is it possible to export the data records as a flat file
to a tape drive.
thanks.There are commands in SQL Server to defrag and reorg. I strongly suggest you start by reading below
excellent whitepaper:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SY" <anonymous@.discussions.microsoft.com> wrote in message
news:1dd4a01c454d4$11ae92f0$a301280a@.phx.gbl...
> We are using database having a current size of over 300GB
> to store attachment files in an image column of a table.
> is the approach of exporting and importing data records
> from the table a good way to defragment the table? if so,
> is it possible to export the data records as a flat file
> to a tape drive.
> thanks.
>
to store attachment files in an image column of a table.
is the approach of exporting and importing data records
from the table a good way to defragment the table? if so,
is it possible to export the data records as a flat file
to a tape drive.
thanks.There are commands in SQL Server to defrag and reorg. I strongly suggest you start by reading below
excellent whitepaper:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SY" <anonymous@.discussions.microsoft.com> wrote in message
news:1dd4a01c454d4$11ae92f0$a301280a@.phx.gbl...
> We are using database having a current size of over 300GB
> to store attachment files in an image column of a table.
> is the approach of exporting and importing data records
> from the table a good way to defragment the table? if so,
> is it possible to export the data records as a flat file
> to a tape drive.
> thanks.
>
Friday, February 24, 2012
Default values
How can I assign a field in a table a default date. I know that I can use
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
JeffInstead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
JeffInstead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
Default values
How can I assign a field in a table a default date. I know that I can use
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
Jeff
Instead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
Jeff
Instead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
Default values
How can I assign a field in a table a default date. I know that I can use
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
JeffInstead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.ph
x.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
getdate(), but I don't want to store the time, only the date. Can this be
done in the table definition?
Thanks
JeffInstead of...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT GETDATE())
...use...
CREATE TABLE foo(dt SMALLDATETIME DEFAULT CONVERT(CHAR(8), GETDATE(), 112))
Note that a time portion will still be stored, but it will be midnight...
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||Try making your default something like
convert(datetime, convert(varchar(20), getdate(), 1))
Jeff Duncan
MCDBA, MCSE+I
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message
news:e$B9q6rMEHA.620@.TK2MSFTNGP10.phx.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>|||This is covered in http://www.karaszi.com/sqlserver/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jeff Cichocki" <jeffc@.belgioioso.com> wrote in message news:e$B9q6rMEHA.620@.TK2MSFTNGP10.ph
x.gbl...
> How can I assign a field in a table a default date. I know that I can use
> getdate(), but I don't want to store the time, only the date. Can this be
> done in the table definition?
> Thanks
> Jeff
>
Friday, February 17, 2012
default vales
Hi,
How can I find table name, column name of all columns having default value
''
Is there any system table store the defalt values.
ThanksTry,
select table_name, column_default
from information_schema.columns
where column_default = '('''')'
HTH
Prasad
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>|||Include the column name as below,
Try,
select table_name, column_name, column_default
from information_schema.columns
where column_default = '('''')'
HTH
Prasad
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>|||Binu,
SELECT column_name,table_name,column_default
FROM information_schema.columns
WHERE column_default = '('''')'
OR column_default = '(space(0))'
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>
How can I find table name, column name of all columns having default value
''
Is there any system table store the defalt values.
ThanksTry,
select table_name, column_default
from information_schema.columns
where column_default = '('''')'
HTH
Prasad
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>|||Include the column name as below,
Try,
select table_name, column_name, column_default
from information_schema.columns
where column_default = '('''')'
HTH
Prasad
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>|||Binu,
SELECT column_name,table_name,column_default
FROM information_schema.columns
WHERE column_default = '('''')'
OR column_default = '(space(0))'
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Abraham" <binu_ca@.yahoo.com> wrote in message
news:en4e1T2WDHA.2256@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I find table name, column name of all columns having default
value
> ''
> Is there any system table store the defalt values.
> Thanks
>
Subscribe to:
Posts (Atom)