Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Sunday, March 11, 2012

Data Connection to SQL Server 2000 using C#

I have asp code that uses C# to create a SQL connection and a command. Then I create a data set and fill the data set using my comand. Finally I bind my data set to a data grid named myDataGrid. I am not sure where myDataGrid comes from since it is never defined. Where does myDataGrid come from? Also, I believe that I do not need to call page_Load since auto wire is set to true by default so it is my understanding that this method page_Load will be called by default.
void page_load(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'"); SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection);
DataSet ds = new DataSet();
myCommand.Fill(ds, "people");
MyDataGrid.DataSource=ds.Tables["people"].DefaultView;
MyDataGrid.DataBind();
}

When I place a data grid controll on my page named myDataGrid, I do not see a data grid and there is no data either. The code in the HTML looks like this:

<body>
<form runat="server">
<p>
<asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid>
</p>
</form>
</body>
I tried using debug that comes with the .Net framework (since I am using Web Matrix) but I get an error saying no symbols were found for this document when setting break points. What are symbols and why do I need them?
So, I basically have four (4) important questions that I need help answering:
1) Why do I not have any data in my data grid?
2) Where did myDataGrid come from?
3) Is the page_Load method called by default if auto wire is set to true or not declared?
4) Why do I need symbols for debug?
Below is all my code in one complete view:
<%@. Page Language="C#" %>
<%@. Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %>
<%@. import Namespace="System.Data" %>
<%@. import Namespace="System.Data.SqlClient" %>
<script runat="server">

// Insert page code here
//

</script>
<html>
<head>
<script language="C#">
void page_load(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'");
SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection);

DataSet ds = new DataSet();
myCommand.Fill(ds, "people");

MyDataGrid.DataSource=ds.Tables["people"].DefaultView;
MyDataGrid.DataBind();
}

</script>
</head>
<body>
<form runat="server">
<p>

</p>
<p>
<asp:Label id="Label1" runat="server">This is a test!</asp:Label>
</p>
<p>
<asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid>
</p>
</form>
</body>
</html>
Thanks,
Ryan

(1) you could put a if not ispostback condition in your page_load.
(2) You could set the autogeneratecolumns property of the datagrid to true. I am not good at C#. So I wouldnt try writing code for you.

Sunday, February 19, 2012

Daily build - trying to deploy from the command line

Hi

I'm trying to automate the build of a SSIS VisualStudio solution (ie I want to generate the deploy package automatically), but I get a weird error:

Error: Could not get a list of SSIS packages from the project.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I get this error when launching devenv with the following command-line:

devenv.exe MySolution.sln /Deploy development /Out build.log

Did anyone already meet this error ? How can I avoid that ?

regards

Thibaut
I should add that this error only appears when I set the CreateDeploymentUtility variable to true under the Deployment Utility section of the properties...|||Hi

Is there actually a anyone launching devenv.exe to generate the deployment packages ?

If no, is there any other known alternative ? (the idea is to automate the deployment package creation on a build server).

any hint will be most welcome.

regards

Thibaut|||

This link might help.

http://mgarner.wordpress.com/2006/08/31/automating-ssis-deployment/

Daily build - trying to deploy from the command line

Hi

I'm trying to automate the build of a SSIS VisualStudio solution (ie I want to generate the deploy package automatically), but I get a weird error:

Error: Could not get a list of SSIS packages from the project.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I get this error when launching devenv with the following command-line:

devenv.exe MySolution.sln /Deploy development /Out build.log

Did anyone already meet this error ? How can I avoid that ?

regards

Thibaut
I should add that this error only appears when I set the CreateDeploymentUtility variable to true under the Deployment Utility section of the properties...|||Hi

Is there actually a anyone launching devenv.exe to generate the deployment packages ?

If no, is there any other known alternative ? (the idea is to automate the deployment package creation on a build server).

any hint will be most welcome.

regards

Thibaut|||

This link might help.

http://mgarner.wordpress.com/2006/08/31/automating-ssis-deployment/

Tuesday, February 14, 2012

cut the size of the log

I use this command but it doesnot work
cannot cut the size of the log to 2MB
DBCC SHRINKFILE(ABC_log,2)
what is the correct command actually pls?actually i want to cut the size
because it is testing environment
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||If you are using a FULL or BULK LOGGED recovery model (SELECT
SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
unless you backup the transaction log or truncate it. If you are using the
SIMPLE recovery model, you can't shrink it much if there are open
transactions that happen to occupy the end of the file.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||http://www.nigelrivett.net/Transact...ileGrows_1.html
"izumi" wrote:

> actually i want to cut the size
> because it is testing environment
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
>
>|||finnaly I offline the database
go to physical path and delete the abc_log
then get back much more disk space
"Peter Yeoh" <nospam@.nospam.com> wrote in message
news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> If you are using a FULL or BULK LOGGED recovery model (SELECT
> SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
> unless you backup the transaction log or truncate it. If you are using
the
> SIMPLE recovery model, you can't shrink it much if there are open
> transactions that happen to occupy the end of the file.
> Peter Yeoh
> http://www.yohz.com
> Need smaller SQL2K backup files? Try MiniSQLBackup
>
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
>|||I hope you did a backup before. This is not a safe operation, and you should
consider yourself lucky
if the database isn't corrupt after the operation.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"izumi" <test@.test.com> wrote in message news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...seagreen">
> finnaly I offline the database
> go to physical path and delete the abc_log
> then get back much more disk space
> "Peter Yeoh" <nospam@.nospam.com> wrote in message
> news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> the
>|||Yes i agree your point....
But this time it is testing environment...
so it is ok
next time, if it is live, i will backup
Thanks d><b
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9I4kyNXEHA.2940@.TK2MSFTNGP09.phx.gbl...
> I hope you did a backup before. This is not a safe operation, and you
should consider yourself lucky
> if the database isn't corrupt after the operation.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "izumi" <test@.test.com> wrote in message
news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...
file[vbcol=seagreen]
using[vbcol=seagreen]
>|||Hi Izumi
What does 'does not work' mean? Do you get an error message? If so, what
error? Do you get any response at all? What does it say?
What version of SQL Server are you running?
Please give us more information.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"izumi" <test@.test.com> wrote in message
news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||I also had a hard time with this problem. If it's a testing environment or
you just don't care about being able to recover to a point in time, change t
he recovery model to Simple and then issue the following command in SQL Quer
y Analyzer.
SHRINKFILE (logfilename_log, -1)
In the simple recovery model, a sequence of transaction logs is not being Ma
intained. All log records before the MinLSN can be truncated at any time, ex
cept while a BACKUP statement is being processed. The log file will shrink d
own to about 1mb.
"Kalen Delaney" wrote:

> Hi Izumi
> What does 'does not work' mean? Do you get an error message? If so, what
> error? Do you get any response at all? What does it say?
> What version of SQL Server are you running?
> Please give us more information.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "izumi" <test@.test.com> wrote in message
> news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
>
>|||it means the the size of the log is kept unchanged
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:O98aR8QXEHA.1684@.tk2msftngp13.phx.gbl...
> Hi Izumi
> What does 'does not work' mean? Do you get an error message? If so, what
> error? Do you get any response at all? What does it say?
> What version of SQL Server are you running?
> Please give us more information.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "izumi" <test@.test.com> wrote in message
> news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
>

cut the size of the log

I use this command but it doesnot work
cannot cut the size of the log to 2MB
DBCC SHRINKFILE(ABC_log,2)
what is the correct command actually pls?
actually i want to cut the size
because it is testing environment
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>
|||If you are using a FULL or BULK LOGGED recovery model (SELECT
SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
unless you backup the transaction log or truncate it. If you are using the
SIMPLE recovery model, you can't shrink it much if there are open
transactions that happen to occupy the end of the file.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>
|||http://www.nigelrivett.net/Transacti...leGrows_1.html
"izumi" wrote:

> actually i want to cut the size
> because it is testing environment
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
>
>
|||finnaly I offline the database
go to physical path and delete the abc_log
then get back much more disk space
"Peter Yeoh" <nospam@.nospam.com> wrote in message
news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> If you are using a FULL or BULK LOGGED recovery model (SELECT
> SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
> unless you backup the transaction log or truncate it. If you are using
the
> SIMPLE recovery model, you can't shrink it much if there are open
> transactions that happen to occupy the end of the file.
> Peter Yeoh
> http://www.yohz.com
> Need smaller SQL2K backup files? Try MiniSQLBackup
>
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
>
|||I hope you did a backup before. This is not a safe operation, and you should consider yourself lucky
if the database isn't corrupt after the operation.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"izumi" <test@.test.com> wrote in message news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...
> finnaly I offline the database
> go to physical path and delete the abc_log
> then get back much more disk space
> "Peter Yeoh" <nospam@.nospam.com> wrote in message
> news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> the
>
|||Yes i agree your point....
But this time it is testing environment...
so it is ok
next time, if it is live, i will backup
Thanks d><b
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9I4kyNXEHA.2940@.TK2MSFTNGP09.phx.gbl...
> I hope you did a backup before. This is not a safe operation, and you
should consider yourself lucky
> if the database isn't corrupt after the operation.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "izumi" <test@.test.com> wrote in message
news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
file[vbcol=seagreen]
using
>
|||Hi Izumi
What does 'does not work' mean? Do you get an error message? If so, what
error? Do you get any response at all? What does it say?
What version of SQL Server are you running?
Please give us more information.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"izumi" <test@.test.com> wrote in message
news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>
|||I also had a hard time with this problem. If it's a testing environment or you just don't care about being able to recover to a point in time, change the recovery model to Simple and then issue the following command in SQL Query Analyzer.
SHRINKFILE (logfilename_log, -1)
In the simple recovery model, a sequence of transaction logs is not being Maintained. All log records before the MinLSN can be truncated at any time, except while a BACKUP statement is being processed. The log file will shrink down to about 1mb.
"Kalen Delaney" wrote:

> Hi Izumi
> What does 'does not work' mean? Do you get an error message? If so, what
> error? Do you get any response at all? What does it say?
> What version of SQL Server are you running?
> Please give us more information.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "izumi" <test@.test.com> wrote in message
> news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
>
>
|||I also had a hard time with this problem. If it's a testing environment or you just don't care about being able to recover to a point in time, change the recovery model to Simple and then issue the following command in SQL Query Analyzer.
SHRINKFILE (logfilename_log, -1)
In the simple recovery model, a sequence of transaction logs is not being Maintained. All log records before the MinLSN can be truncated at any time, except while a BACKUP statement is being processed. The log file will shrink down to about 1mb.
"Kalen Delaney" wrote:

> Hi Izumi
> What does 'does not work' mean? Do you get an error message? If so, what
> error? Do you get any response at all? What does it say?
> What version of SQL Server are you running?
> Please give us more information.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "izumi" <test@.test.com> wrote in message
> news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
>
>

cut the size of the log

I use this command but it doesnot work
cannot cut the size of the log to 2MB
DBCC SHRINKFILE(ABC_log,2)
what is the correct command actually pls?actually i want to cut the size
because it is testing environment
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||If you are using a FULL or BULK LOGGED recovery model (SELECT
SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
unless you backup the transaction log or truncate it. If you are using the
SIMPLE recovery model, you can't shrink it much if there are open
transactions that happen to occupy the end of the file.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"izumi" <test@.test.com> wrote in message
news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||http://www.nigelrivett.net/TransactionLogFileGrows_1.html
"izumi" wrote:
> actually i want to cut the size
> because it is testing environment
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> > I use this command but it doesnot work
> >
> > cannot cut the size of the log to 2MB
> >
> > DBCC SHRINKFILE(ABC_log,2)
> >
> > what is the correct command actually pls?
> >
> >
>
>|||finnaly I offline the database
go to physical path and delete the abc_log
then get back much more disk space
"Peter Yeoh" <nospam@.nospam.com> wrote in message
news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> If you are using a FULL or BULK LOGGED recovery model (SELECT
> SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
> unless you backup the transaction log or truncate it. If you are using
the
> SIMPLE recovery model, you can't shrink it much if there are open
> transactions that happen to occupy the end of the file.
> Peter Yeoh
> http://www.yohz.com
> Need smaller SQL2K backup files? Try MiniSQLBackup
>
> "izumi" <test@.test.com> wrote in message
> news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> > I use this command but it doesnot work
> >
> > cannot cut the size of the log to 2MB
> >
> > DBCC SHRINKFILE(ABC_log,2)
> >
> > what is the correct command actually pls?
> >
> >
>|||I hope you did a backup before. This is not a safe operation, and you should consider yourself lucky
if the database isn't corrupt after the operation.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"izumi" <test@.test.com> wrote in message news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...
> finnaly I offline the database
> go to physical path and delete the abc_log
> then get back much more disk space
> "Peter Yeoh" <nospam@.nospam.com> wrote in message
> news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> > If you are using a FULL or BULK LOGGED recovery model (SELECT
> > SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
> > unless you backup the transaction log or truncate it. If you are using
> the
> > SIMPLE recovery model, you can't shrink it much if there are open
> > transactions that happen to occupy the end of the file.
> >
> > Peter Yeoh
> > http://www.yohz.com
> > Need smaller SQL2K backup files? Try MiniSQLBackup
> >
> >
> > "izumi" <test@.test.com> wrote in message
> > news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> > > I use this command but it doesnot work
> > >
> > > cannot cut the size of the log to 2MB
> > >
> > > DBCC SHRINKFILE(ABC_log,2)
> > >
> > > what is the correct command actually pls?
> > >
> > >
> >
> >
>|||Yes i agree your point....
But this time it is testing environment...
so it is ok
next time, if it is live, i will backup
Thanks d><b
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e9I4kyNXEHA.2940@.TK2MSFTNGP09.phx.gbl...
> I hope you did a backup before. This is not a safe operation, and you
should consider yourself lucky
> if the database isn't corrupt after the operation.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "izumi" <test@.test.com> wrote in message
news:e2z8mbMXEHA.644@.tk2msftngp13.phx.gbl...
> > finnaly I offline the database
> > go to physical path and delete the abc_log
> >
> > then get back much more disk space
> > "Peter Yeoh" <nospam@.nospam.com> wrote in message
> > news:%23IsFtKMXEHA.3988@.tk2msftngp13.phx.gbl...
> > > If you are using a FULL or BULK LOGGED recovery model (SELECT
> > > SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log
file
> > > unless you backup the transaction log or truncate it. If you are
using
> > the
> > > SIMPLE recovery model, you can't shrink it much if there are open
> > > transactions that happen to occupy the end of the file.
> > >
> > > Peter Yeoh
> > > http://www.yohz.com
> > > Need smaller SQL2K backup files? Try MiniSQLBackup
> > >
> > >
> > > "izumi" <test@.test.com> wrote in message
> > > news:%23VPGv%23KXEHA.2408@.tk2msftngp13.phx.gbl...
> > > > I use this command but it doesnot work
> > > >
> > > > cannot cut the size of the log to 2MB
> > > >
> > > > DBCC SHRINKFILE(ABC_log,2)
> > > >
> > > > what is the correct command actually pls?
> > > >
> > > >
> > >
> > >
> >
> >
>|||Hi Izumi
What does 'does not work' mean? Do you get an error message? If so, what
error? Do you get any response at all? What does it say?
What version of SQL Server are you running?
Please give us more information.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"izumi" <test@.test.com> wrote in message
news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
> cannot cut the size of the log to 2MB
> DBCC SHRINKFILE(ABC_log,2)
> what is the correct command actually pls?
>|||it means the the size of the log is kept unchanged
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:O98aR8QXEHA.1684@.tk2msftngp13.phx.gbl...
> Hi Izumi
> What does 'does not work' mean? Do you get an error message? If so, what
> error? Do you get any response at all? What does it say?
> What version of SQL Server are you running?
> Please give us more information.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "izumi" <test@.test.com> wrote in message
> news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
> > I use this command but it doesnot work
> >
> > cannot cut the size of the log to 2MB
> >
> > DBCC SHRINKFILE(ABC_log,2)
> >
> > what is the correct command actually pls?
> >
> >
>|||There are some links to articles regarding shrink of files for tlog at
http://www.karaszi.com/SQLServer/info_dont_shrink.asp.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"izumi" <test@.test.com> wrote in message news:OeFMDCbXEHA.2940@.TK2MSFTNGP09.phx.gbl...
> it means the the size of the log is kept unchanged
> "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
> news:O98aR8QXEHA.1684@.tk2msftngp13.phx.gbl...
> > Hi Izumi
> >
> > What does 'does not work' mean? Do you get an error message? If so, what
> > error? Do you get any response at all? What does it say?
> >
> > What version of SQL Server are you running?
> >
> > Please give us more information.
> >
> > --
> > HTH
> > --
> > Kalen Delaney
> > SQL Server MVP
> > www.SolidQualityLearning.com
> >
> >
> > "izumi" <test@.test.com> wrote in message
> > news:#VPGv#KXEHA.2408@.tk2msftngp13.phx.gbl...
> > > I use this command but it doesnot work
> > >
> > > cannot cut the size of the log to 2MB
> > >
> > > DBCC SHRINKFILE(ABC_log,2)
> > >
> > > what is the correct command actually pls?
> > >
> > >
> >
> >
>