Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Sunday, March 25, 2012

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt
sql

Can''t Aquire connections because OfflineMode is true

I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...

One of our developers had the same problem today... try this technet article. I think there are two places where you can set it. A config file and the project settings themselves.

http://technet.microsoft.com/en-us/library/ms137749.aspx

|||Error says OfflineMode is true, but actually it is not..
|||

One of my collegues ran into the same issue some time ago. After contacting MSF support and several rounds of troubleshooting, I think he ended up re-installing SSIS and the problem went away...Sorry, but I don't have more details.

|||

We encountered this issue some time ago. We incurred this error when trying to execute the 32bit DTEXEC (Program Files (x86)) on a 64bit machine.

As Rafael mentioned after contacting Microsoft support we simply reinstalled the client tools for SSIS and the problem was resolved. We were unable to identify the specific cause of the issue. I believe this is another very similar thread that was discussed a while back: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1557996&SiteID=1

|||I resolved the issue, I changed the connection settings and executed it using 64-bit dtexec from command prompt

Thursday, March 22, 2012

Cant access sql express stored procedure..help!

Hi everyone, im having alot of trouble trying to execute a stored proc from sql express. heres my code

DbProviderFactory db =DbProviderFactories.GetFactory("System.Data.SqlClient");

using(DbConnection conn = db.CreateConnection()){

ConnectionStringSettings s =ConfigurationManager.ConnectionStrings["constrolservicetest"];

conn.ConnectionString = s.ConnectionString;

conn.Open();

DbCommand cmd = conn.CreateCommand();

cmd.CommandText ="StoredProcedure1";

cmd.CommandType =CommandType.StoredProcedure;

DbParameter param = db.CreateParameter();

param.ParameterName ="@.test";

param.Value = 2;

cmd.Parameters.Add(param);

cmd.ExecuteNonQuery();

}

****************************procedure code***************************

Create PROCEDUREdbo.StoredProcedure1

(

@.testint

)

AS

Update temp

Settest = @.test

******************************************************************

The code just doesn't update. I know my connection string is correct because i got the datareader to work, but i just cant get the stored proc to call. Any help will be greatly appreciated.

Thanks,

-D

That code looks reasonable to me. Are you sure it's being called?

Monday, March 19, 2012

Cann't execute integration service package with SQL server agent

hi, can anyone explain, how to execute package with sql server agent:

the problem is::

i made a integration service package (in visual studio 2005). When I 'm in visual studio and do "execute" the package it works well. Then I build a dtsx file. When i double click on it, it opens and if i do execute, it works well.

I want to execute the package every week automatically. I write a job in SQL server agent, in Steps I choosed Type=SQL server Integration service packege, then General->packacge source -> file system, and then wrote where the dtsx file is (which was built). "Run as" I choose my user name.

then i'm trying to start a job, but it fails, and writes "The package execution failed."

What I'm doing wrong.

(sorry for my english)

The error message you are getting indicates that you are running the package in the SQL Serve agent as a 'Integration services package' step; right?

The problem with that is that if there is any problem with the execution you message error won't provide any details. To start change the step type to use CmdExec, so the error message is more descriptive. Most of the times the error is due to permission (when the agent executes the job it uses the account that it is being used to run the agent) or the protection level you used to saved your package (a package property).Look into this article for more details:

http://support.microsoft.com/default.aspx/kb/918760

Rafael Salas

Rafael Salas

|||

Some more notes on permissions, such as those for the file store, and a nice example that illustrates the difference between what you can get from the CmdExec step versus the SSIS subsystem-

Scheduled Packages
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html)

Cannot work with Scrip task

Hey guys,
It's sort of madness I guess. :))
I use Script Task.
It has no code inside, but "Dts.TaskResult = Dts.Results.Success"
I execute package. I'm getting error

Error: 0x5 at Script Task: The script files failed to load.

Task failed: Script Task
What is it? How I can fix it? What's wrong?
Thanks.

Check out this thread ...

http://forums.microsoft.com/msdn/showpost.aspx?postid=68546&siteid=1

Donald

|||Thanks. It works.

Friday, February 24, 2012

Cannot shrink transaction log of a SQL Server 2005 db

I have a SQL Server 2005 db for a Navision installation.
I have tried to execute DBCC Shrinkfile on the related transaction log after
the running of backup log. I have had this error:
"Cannot shrink log file 2 (...) because all logical log files are in use".
The transaction log is of 15 GB!
I know that it is possible to reduce the space of the log while the db is in
use.
How can I solve this issue?
Many thanksOpen transaction? Check using DBCC OPENTRAN.
Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>I have a SQL Server 2005 db for a Navision installation.
> I have tried to execute DBCC Shrinkfile on the related transaction log after
> the running of backup log. I have had this error:
> "Cannot shrink log file 2 (...) because all logical log files are in use".
> The transaction log is of 15 GB!
> I know that it is possible to reduce the space of the log while the db is in
> use.
> How can I solve this issue?
> Many thanks
>|||I have executed DBCC OPENTRAN(MyDB) and
there aren't any active transactions.
The DBCC SQLPERF(LOGSPACE) return 4% used for the log.
"Tibor Karaszi" wrote:
> Open transaction? Check using DBCC OPENTRAN.
> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
> >I have a SQL Server 2005 db for a Navision installation.
> > I have tried to execute DBCC Shrinkfile on the related transaction log after
> > the running of backup log. I have had this error:
> > "Cannot shrink log file 2 (...) because all logical log files are in use".
> > The transaction log is of 15 GB!
> > I know that it is possible to reduce the space of the log while the db is in
> > use.
> >
> > How can I solve this issue?
> >
> > Many thanks
> >
>|||I have executed a complete backup of the db after logging out of the users
from Navision. So I have executed first the backup log (copy and truncate)
and then the dbcc shrinkfile for three times.
I have obtained a log of 320 MB from 15 GB, but I have always the same error:
"Cannot shrink log file 2 (..._Log) because all logical log files are in use".
Do you have any suggests to understand this error?
Thanks
"Tibor Karaszi" wrote:
> Open transaction? Check using DBCC OPENTRAN.
> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
> >I have a SQL Server 2005 db for a Navision installation.
> > I have tried to execute DBCC Shrinkfile on the related transaction log after
> > the running of backup log. I have had this error:
> > "Cannot shrink log file 2 (...) because all logical log files are in use".
> > The transaction log is of 15 GB!
> > I know that it is possible to reduce the space of the log while the db is in
> > use.
> >
> > How can I solve this issue?
> >
> > Many thanks
> >
>|||Did you investigate the virtual log file layout as suggested i my article?
Also, are you saying that you got it down to 320 MB, and want to shrink it further? If so, why? See
http://sqlblog.com/blogs/tibor_karaszi/archive/2007/02/25/leaking-roof-and-file-shrinking.aspx
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:A3FEF114-AB29-41E5-A260-6B451C39706D@.microsoft.com...
>I have executed a complete backup of the db after logging out of the users
> from Navision. So I have executed first the backup log (copy and truncate)
> and then the dbcc shrinkfile for three times.
> I have obtained a log of 320 MB from 15 GB, but I have always the same error:
> "Cannot shrink log file 2 (..._Log) because all logical log files are in use".
> Do you have any suggests to understand this error?
> Thanks
>
> "Tibor Karaszi" wrote:
>> Open transaction? Check using DBCC OPENTRAN.
>> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>> >I have a SQL Server 2005 db for a Navision installation.
>> > I have tried to execute DBCC Shrinkfile on the related transaction log after
>> > the running of backup log. I have had this error:
>> > "Cannot shrink log file 2 (...) because all logical log files are in use".
>> > The transaction log is of 15 GB!
>> > I know that it is possible to reduce the space of the log while the db is in
>> > use.
>> >
>> > How can I solve this issue?
>> >
>> > Many thanks
>> >
>>|||320 MB for the log is enough for me, absolutely!
I want to underline that I have still the error every time that I shrink the
log.
"Tibor Karaszi" wrote:
> Did you investigate the virtual log file layout as suggested i my article?
> Also, are you saying that you got it down to 320 MB, and want to shrink it further? If so, why? See
> http://sqlblog.com/blogs/tibor_karaszi/archive/2007/02/25/leaking-roof-and-file-shrinking.aspx
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:A3FEF114-AB29-41E5-A260-6B451C39706D@.microsoft.com...
> >I have executed a complete backup of the db after logging out of the users
> > from Navision. So I have executed first the backup log (copy and truncate)
> > and then the dbcc shrinkfile for three times.
> > I have obtained a log of 320 MB from 15 GB, but I have always the same error:
> > "Cannot shrink log file 2 (..._Log) because all logical log files are in use".
> >
> > Do you have any suggests to understand this error?
> >
> > Thanks
> >
> >
> > "Tibor Karaszi" wrote:
> >
> >> Open transaction? Check using DBCC OPENTRAN.
> >>
> >> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://sqlblog.com/blogs/tibor_karaszi
> >>
> >>
> >> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> >> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
> >> >I have a SQL Server 2005 db for a Navision installation.
> >> > I have tried to execute DBCC Shrinkfile on the related transaction log after
> >> > the running of backup log. I have had this error:
> >> > "Cannot shrink log file 2 (...) because all logical log files are in use".
> >> > The transaction log is of 15 GB!
> >> > I know that it is possible to reduce the space of the log while the db is in
> >> > use.
> >> >
> >> > How can I solve this issue?
> >> >
> >> > Many thanks
> >> >
> >>
> >>
>|||As I stated twice before, the answer is in the virtual log file layout. Also, minimum number of
virtual log files is 2 or 4 (I don't remember).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:37F476C6-F5C1-4C15-8AD1-39ED6C5275D9@.microsoft.com...
> 320 MB for the log is enough for me, absolutely!
> I want to underline that I have still the error every time that I shrink the
> log.
>
> "Tibor Karaszi" wrote:
>> Did you investigate the virtual log file layout as suggested i my article?
>> Also, are you saying that you got it down to 320 MB, and want to shrink it further? If so, why?
>> See
>> http://sqlblog.com/blogs/tibor_karaszi/archive/2007/02/25/leaking-roof-and-file-shrinking.aspx
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> news:A3FEF114-AB29-41E5-A260-6B451C39706D@.microsoft.com...
>> >I have executed a complete backup of the db after logging out of the users
>> > from Navision. So I have executed first the backup log (copy and truncate)
>> > and then the dbcc shrinkfile for three times.
>> > I have obtained a log of 320 MB from 15 GB, but I have always the same error:
>> > "Cannot shrink log file 2 (..._Log) because all logical log files are in use".
>> >
>> > Do you have any suggests to understand this error?
>> >
>> > Thanks
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> Open transaction? Check using DBCC OPENTRAN.
>> >>
>> >> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://sqlblog.com/blogs/tibor_karaszi
>> >>
>> >>
>> >> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> >> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>> >> >I have a SQL Server 2005 db for a Navision installation.
>> >> > I have tried to execute DBCC Shrinkfile on the related transaction log after
>> >> > the running of backup log. I have had this error:
>> >> > "Cannot shrink log file 2 (...) because all logical log files are in use".
>> >> > The transaction log is of 15 GB!
>> >> > I know that it is possible to reduce the space of the log while the db is in
>> >> > use.
>> >> >
>> >> > How can I solve this issue?
>> >> >
>> >> > Many thanks
>> >> >
>> >>
>> >>
>>|||I'm not sure if this helps but, below is what I do to shrink and clean the
tlogs.
USE [mydb];
GO
BACKUP LOG [mydb] WITH TRUNCATE_ONLY;
GO
DBCC SHRINKFILE (mydb_Log, EMPTYFILE);
GO
DBCC SHRINKDATABASE('mydb')
GO
"Pasquale" wrote:
> I have a SQL Server 2005 db for a Navision installation.
> I have tried to execute DBCC Shrinkfile on the related transaction log after
> the running of backup log. I have had this error:
> "Cannot shrink log file 2 (...) because all logical log files are in use".
> The transaction log is of 15 GB!
> I know that it is possible to reduce the space of the log while the db is in
> use.
> How can I solve this issue?
> Many thanks
>

Cannot shrink transaction log of a SQL Server 2005 db

I have a SQL Server 2005 db for a Navision installation.
I have tried to execute DBCC Shrinkfile on the related transaction log after
the running of backup log. I have had this error:
"Cannot shrink log file 2 (...) because all logical log files are in use".
The transaction log is of 15 GB!
I know that it is possible to reduce the space of the log while the db is in
use.
How can I solve this issue?
Many thanks
I have executed DBCC OPENTRAN(MyDB) and
there aren't any active transactions.
The DBCC SQLPERF(LOGSPACE) return 4% used for the log.
"Tibor Karaszi" wrote:

> Open transaction? Check using DBCC OPENTRAN.
> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>
|||I have executed a complete backup of the db after logging out of the users
from Navision. So I have executed first the backup log (copy and truncate)
and then the dbcc shrinkfile for three times.
I have obtained a log of 320 MB from 15 GB, but I have always the same error:
"Cannot shrink log file 2 (..._Log) because all logical log files are in use".
Do you have any suggests to understand this error?
Thanks
"Tibor Karaszi" wrote:

> Open transaction? Check using DBCC OPENTRAN.
> Also, details on shrinking found at http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>
|||320 MB for the log is enough for me, absolutely!
I want to underline that I have still the error every time that I shrink the
log.
"Tibor Karaszi" wrote:

> Did you investigate the virtual log file layout as suggested i my article?
> Also, are you saying that you got it down to 320 MB, and want to shrink it further? If so, why? See
> http://sqlblog.com/blogs/tibor_karaszi/archive/2007/02/25/leaking-roof-and-file-shrinking.aspx
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:A3FEF114-AB29-41E5-A260-6B451C39706D@.microsoft.com...
>
|||I'm not sure if this helps but, below is what I do to shrink and clean the
tlogs.
USE [mydb];
GO
BACKUP LOG [mydb] WITH TRUNCATE_ONLY;
GO
DBCC SHRINKFILE (mydb_Log, EMPTYFILE);
GO
DBCC SHRINKDATABASE('mydb')
GO
"Pasquale" wrote:

> I have a SQL Server 2005 db for a Navision installation.
> I have tried to execute DBCC Shrinkfile on the related transaction log after
> the running of backup log. I have had this error:
> "Cannot shrink log file 2 (...) because all logical log files are in use".
> The transaction log is of 15 GB!
> I know that it is possible to reduce the space of the log while the db is in
> use.
> How can I solve this issue?
> Many thanks
>

Cannot shrink transaction log of a SQL Server 2005 db

I have a SQL Server 2005 db for a Navision installation.
I have tried to execute DBCC Shrinkfile on the related transaction log after
the running of backup log. I have had this error:
"Cannot shrink log file 2 (...) because all logical log files are in use".
The transaction log is of 15 GB!
I know that it is possible to reduce the space of the log while the db is in
use.
How can I solve this issue?
Many thanksOpen transaction? Check using DBCC OPENTRAN.
Also, details on shrinking found at http://www.karaszi.com/SQLServer/in...
ink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>I have a SQL Server 2005 db for a Navision installation.
> I have tried to execute DBCC Shrinkfile on the related transaction log aft
er
> the running of backup log. I have had this error:
> "Cannot shrink log file 2 (...) because all logical log files are in use".
> The transaction log is of 15 GB!
> I know that it is possible to reduce the space of the log while the db is
in
> use.
> How can I solve this issue?
> Many thanks
>|||I have executed DBCC OPENTRAN(MyDB) and
there aren't any active transactions.
The DBCC SQLPERF(LOGSPACE) return 4% used for the log.
"Tibor Karaszi" wrote:

> Open transaction? Check using DBCC OPENTRAN.
> Also, details on shrinking found at http://www.karaszi.com/SQLServer/in...r />
hrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:BF7E5E86-D439-47DA-B469-68526A22A19F@.microsoft.com...
>|||I'm not sure if this helps but, below is what I do to shrink and clean the
tlogs.
USE [mydb];
GO
BACKUP LOG [mydb] WITH TRUNCATE_ONLY;
GO
DBCC SHRINKFILE (mydb_Log, EMPTYFILE);
GO
DBCC SHRINKDATABASE('mydb')
GO
"Pasquale" wrote:

> I have a SQL Server 2005 db for a Navision installation.
> I have tried to execute DBCC Shrinkfile on the related transaction log aft
er
> the running of backup log. I have had this error:
> "Cannot shrink log file 2 (...) because all logical log files are in use".
> The transaction log is of 15 GB!
> I know that it is possible to reduce the space of the log while the db is
in
> use.
> How can I solve this issue?
> Many thanks
>

Tuesday, February 14, 2012

Cannot schema bind function 'fn_xxxx' because it contains an EXECUTE statement

Does anyone have any pointers on this error message?
Funny thing is that no where in the SQL documentation does it say that an
EXEC is not allowed in a function with SCHEMABINDING option set.Dynamic SQL is not allowed within a function at all, schemabinding or not...
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Steve Clark" <steve3264@.hotmail.com> wrote in message
news:e8o#nMX4EHA.4092@.TK2MSFTNGP14.phx.gbl...
> Does anyone have any pointers on this error message?
>
> Funny thing is that no where in the SQL documentation does it say that an
> EXEC is not allowed in a function with SCHEMABINDING option set.
>|||The rules for the allowable constructs in functions are not well documented.
This one is almost there though. EXEC is only permitted if it references an
extended proc (or another function - but that's pretty much redundant).
Extended procs reside in Master but schema binding requires that "All
objects referenced by the function must be in the same database as the
function". So as documented, you could only ever create functions containing
EXEC as schemabound if they were in Master... but in reality that doesn't
seem to work either - not that it would be very useful anyway... :)
As Aaron says, dynamic SQL isn't permitted in functions ever. Nor are calls
to regular SPs.
--
David Portas
SQL Server MVP
--

Cannot schema bind function 'fn_xxxx' because it contains an EXECUTE statement

Does anyone have any pointers on this error message?
Funny thing is that no where in the SQL documentation does it say that an
EXEC is not allowed in a function with SCHEMABINDING option set.
Dynamic SQL is not allowed within a function at all, schemabinding or not...
http://www.aspfaq.com/
(Reverse address to reply.)
"Steve Clark" <steve3264@.hotmail.com> wrote in message
news:e8o#nMX4EHA.4092@.TK2MSFTNGP14.phx.gbl...
> Does anyone have any pointers on this error message?
>
> Funny thing is that no where in the SQL documentation does it say that an
> EXEC is not allowed in a function with SCHEMABINDING option set.
>
|||The rules for the allowable constructs in functions are not well documented.
This one is almost there though. EXEC is only permitted if it references an
extended proc (or another function - but that's pretty much redundant).
Extended procs reside in Master but schema binding requires that "All
objects referenced by the function must be in the same database as the
function". So as documented, you could only ever create functions containing
EXEC as schemabound if they were in Master... but in reality that doesn't
seem to work either - not that it would be very useful anyway...
As Aaron says, dynamic SQL isn't permitted in functions ever. Nor are calls
to regular SPs.
David Portas
SQL Server MVP