Friday, March 30, 2012
Layout
studio gives me when editing and working with my projects. I have a dual
screen setup and like to build my environment around it to increase my
productivity. I noticed that in the release of the new SQL 2005 Management
Studio there are a number of enhancements but one that I'd like is that when
I'm working with a specific table or view or anything, I should be able to
split up the components onto my different screens so that I can maximize my
space. So perhaps to have the query on one dockable window, the table in
another and the SQL in another. If I switch to another query or stored
procedure then all of those windows should be maintained but for the new
information.
Thanks.Send an e-mail to:
sqlwish@.microsoft.com
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Andrew Middleton" <Andrew Middleton@.discussions.microsoft.com> wrote in
message news:BB7ADCA7-E3CC-4CF9-A779-6ECD2E2EA741@.microsoft.com...
> Just a general note. I'm a .NET developer and enjoy the setup that visual
> studio gives me when editing and working with my projects. I have a dual
> screen setup and like to build my environment around it to increase my
> productivity. I noticed that in the release of the new SQL 2005
Management
> Studio there are a number of enhancements but one that I'd like is that
when
> I'm working with a specific table or view or anything, I should be able to
> split up the components onto my different screens so that I can maximize
my
> space. So perhaps to have the query on one dockable window, the table in
> another and the SQL in another. If I switch to another query or stored
> procedure then all of those windows should be maintained but for the new
> information.
> Thanks.|||> productivity. I noticed that in the release of the new SQL 2005
> Management
> Studio there are a number of enhancements but one that I'd like
Please use the SQL Server 2005 newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
Launching and monitoring SSIS packages from a web app
Launch DTS with OLAP from .net application
Hi,
with reference to the following thread:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=740855&isthread=false&siteid=1&authhash=775a583435c503730bf96695fe78ffc77f04a290&ticks=632942355374528292
Which in summary is that I am trying to execute DTS packages containing OLAP tasks to process cubes from an application. It hangs and fails after an hour and some minutes.
the code :
Package2Class package = new Package2Class();
object pVarPersistStgOfHost = null;
package.LoadFromSQLServer(serverName,null,null,DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,null,null,null,packageName,ref VarPersistStgOfHost);
package.Execute();
I have launched the DTS on command prompt using DTSRUN on the computer I am trying to execute my code, and it executes marvellously.
DTSRUN can also execute a DTS on another physical server Alpha for instance which process a cube of AS2000 found on another physical server Beta for instance.
Since I need to check that each steps have been executed properly and that running DTSRUN from the application is not a possibility to do so, I need a way to be able to launch the DTS and get to know which steps is failing. the above code is supposingly a way but its failing on LoadFromSQLServer() method.
I am using SQL Server 2000 and AS2000 and .net 1.1 (modifying a legacy system to enable the above facility).
Any views please?
Thanks
Is there any error message?
If so, can you paste here its full text (replacing any confidential information like server names, IP addresses, user names, passwords etc.)?
|||There is no error page. The steps in the package are with status "failed". Thats it.|||
I am moving this to the "SQL Server Integration Services" forum (successor to DTS), which may be able to help troubleshooting.
|||
Failing on the LoadFromSQLServer method should be quick, and I would expect an exception.
The Execute on the other hand will not raise an exception. Use package logging and/or implement the events interface to get more detail of tasks that fail in the package.
If the LoadFromSqlServer fails, perhaps try another storage location just to see if you can isolate the problem for now.
|||HTH.
Dim EventsSSIS As Eventos
EventsSSIS = New Eventos()
sResultDts = pkg.Execute(Nothing, Nothing, EventsSSIS, Nothing, Nothing)
..
..
..
Public Class Eventos
Implements IDTSEvents
Sub OnExecutionStatusChanged(ByVal exec As Executable, ByVal newStatus As DTSExecStatus, ByRef fireAgain As Boolean) Implements IDTSEvents.OnExecutionStatusChanged
End Sub
Sub OnBreakpointHit(ByVal breakpointSite As IDTSBreakpointSite, ByVal breakpointTarget As BreakpointTarget) Implements IDTSEvents.OnBreakpointHit
End Sub
|||
I am using .net 1.1 and SQL server 2000. I do not have SSIS.
The solution is to use Stored procedure to launch it, this relieving this responsibility from the .net application.
there is a call from the stored proc called the LoadFromSQLServer that can be used for this purpose.
Thanks
Launch condition to detect SQL CE?
I have written a .NET application that uses SQL Server Compact Edition. It's deployed by a MSI file (setup project in VS - not ClickOnce).
How do I add a SQL CE launch condition to my setup project?
Never mind. I'm now using the bootstrapper and added the SQL CE requirement there.sqlLaunch condition to detect SQL CE?
I have written a .NET application that uses SQL Server Compact Edition. It's deployed by a MSI file (setup project in VS - not ClickOnce).
How do I add a SQL CE launch condition to my setup project?
Never mind. I'm now using the bootstrapper and added the SQL CE requirement there.Monday, March 26, 2012
Late Get error
an error message complaining of a Late Get. I am presuming that this is a
SQL Server related error, rather than a VB.NET error, but not sure. Any
know what might generally be causing this error message?
I have never seen this error during extensive testing of that form prior to
the demonstration, and tried to recreate it after the demonstration, but to
no avail.
Any thoughts would be appreciated.
Dean SlindeeCan you post the exact error message, plus some demo code. Someone might
have some insight to the problem.
-oj
"Dean Slindee" <slindee@.charter.net> wrote in message
news:hU1Wd.29517$Ep.6413@.fe06.lga...
> While doing a demonstration of an alpha application written in VB.NET, I
> got
> an error message complaining of a Late Get. I am presuming that this is a
> SQL Server related error, rather than a VB.NET error, but not sure. Any
> know what might generally be causing this error message?
> I have never seen this error during extensive testing of that form prior
> to
> the demonstration, and tried to recreate it after the demonstration, but
> to
> no avail.
> Any thoughts would be appreciated.
> Dean Slindee
>
Wednesday, March 7, 2012
Large Text FIeld: Easy Way to Copy and Paste Into?
file. For testing purposes before our .Net program is written, I would
like to populate that column in a few rows with some actual
text-representation of XML files. I thought I would just open the XML
file in a text editor (ultraedit) and then paste it in somehow.
Normaly I can go into Enterprise Manager and paste information into
columns from other apps - as long as the column can accept the data, no
problem.
However, there seems to be a limit on how much text I can paste into a
column via Enterprise Manager. It's not based on linefeeds
necessarily, because it handles multiple lines OK, just as long as you
don't try to paste too much.
Is there any other tool that I could use to slam some data quickly into
some columns. Insert statements using Query Analyzer are a pain (not
to mention needing to worry about apostrophes, etc.) - I was looking
for something rather visual and quick.
I tried this QA Lite tool which showed some promise
(http://www.rac4sql.net/qalite_main.asp) - but the limitation seems to
be similar there as well...
Any hints?
Thanks,
spedlists@.erstads.com
Try bulk insert.
It's just a matter of setting the end tags for the entries.
There are a few bugs associated with bulk inserting into text column though
so post again if you have problems - it might not be your code.
"Sped" wrote:
> I have a column that I want to store the entire contents of an XML
> file. For testing purposes before our .Net program is written, I would
> like to populate that column in a few rows with some actual
> text-representation of XML files. I thought I would just open the XML
> file in a text editor (ultraedit) and then paste it in somehow.
> Normaly I can go into Enterprise Manager and paste information into
> columns from other apps - as long as the column can accept the data, no
> problem.
> However, there seems to be a limit on how much text I can paste into a
> column via Enterprise Manager. It's not based on linefeeds
> necessarily, because it handles multiple lines OK, just as long as you
> don't try to paste too much.
> Is there any other tool that I could use to slam some data quickly into
> some columns. Insert statements using Query Analyzer are a pain (not
> to mention needing to worry about apostrophes, etc.) - I was looking
> for something rather visual and quick.
> I tried this QA Lite tool which showed some promise
> (http://www.rac4sql.net/qalite_main.asp) - but the limitation seems to
> be similar there as well...
> Any hints?
> Thanks,
> spedlists@.erstads.com
>
Friday, February 24, 2012
Large number of INSERT statements - not all are executed
I have a developer that is playing around with some SQL statements
using VB.NET. He has a test table in a SQL 2000 database, and he has
about 2000 generated INSERT statements.
When the 2000 INSERT statements are run in SQL query analyzer, all
2000 rows are added to the table. When he tries to send the 2000
statements to SQL Server through his app., a random number of
statements do not get executed. But, SQL Profiler shows that each of
the 2000 statements are getting sent to the server.
I suggested that he add a "GO" statement at the end of the INSERT
block, but the statement fails when that is sent to the server.
I know that this is not the ideal manner to insert bulk data to the
system, but now we are all just curious as to why SQL server doesn't
execute each individual INSERT.
Any thoughts?Hi Dmitri,
Quote:
Originally Posted by
I have a developer that is playing around with some SQL statements
using VB.NET. He has a test table in a SQL 2000 database, and he has
about 2000 generated INSERT statements.
>
When the 2000 INSERT statements are run in SQL query analyzer, all
2000 rows are added to the table. When he tries to send the 2000
statements to SQL Server through his app., a random number of
statements do not get executed. But, SQL Profiler shows that each of
the 2000 statements are getting sent to the server.
How were the statements sent to SQL Server?
One batch with 2k statements or one statement per batch?
What about transactions (autocommit mode)?
What events were set to be captured by Profiler?
Quote:
Originally Posted by
I suggested that he add a "GO" statement at the end of the INSERT
block, but the statement fails when that is sent to the server.
Wrong suggestion. "GO" is not an SQL statement and can be used only in
Query Analyzer (Enterprise Manager, Management Studio). It signals the
end of a batch to MSSQL utilities, SQL Server doesn't understand it at all.
--
Best regards,
Marcin Guzowski
http://guzowski.info|||Dmitri,
SQL Server doesn't just ignore transactions. If the statements are showing
up in SQL Server Profiler, then SQL is executing or attempting to execute
them. There may be other reasons why you are not getting the expected
results. Try these steps:
1. Backup the database.
2. Run a trace. Remove the Existing Connection and Audit events before
starting the trace. They are not necessary for this exercise and create
additional noise. You may want to set up a filter that captures only the
application being tested.
3. Save the trace as a SQL Script.
4. Restore the database.
5. Open the SQL Script and run it.
6. See if there are any errors or warnings that are not being trapped by the
VB.NET application.
-- Bill
"Dmitri" <nienna.gaia@.gmail.comwrote in message
news:1171036327.517795.9440@.s48g2000cws.googlegrou ps.com...
Quote:
Originally Posted by
Hello!
>
I have a developer that is playing around with some SQL statements
using VB.NET. He has a test table in a SQL 2000 database, and he has
about 2000 generated INSERT statements.
>
When the 2000 INSERT statements are run in SQL query analyzer, all
2000 rows are added to the table. When he tries to send the 2000
statements to SQL Server through his app., a random number of
statements do not get executed. But, SQL Profiler shows that each of
the 2000 statements are getting sent to the server.
>
I suggested that he add a "GO" statement at the end of the INSERT
block, but the statement fails when that is sent to the server.
>
I know that this is not the ideal manner to insert bulk data to the
system, but now we are all just curious as to why SQL server doesn't
execute each individual INSERT.
>
Any thoughts?
>
Quote:
Originally Posted by
I have a developer that is playing around with some SQL statements
using VB.NET. He has a test table in a SQL 2000 database, and he has
about 2000 generated INSERT statements.
>
When the 2000 INSERT statements are run in SQL query analyzer, all
2000 rows are added to the table. When he tries to send the 2000
statements to SQL Server through his app., a random number of
statements do not get executed. But, SQL Profiler shows that each of
the 2000 statements are getting sent to the server.
>
I suggested that he add a "GO" statement at the end of the INSERT
block, but the statement fails when that is sent to the server.
>
I know that this is not the ideal manner to insert bulk data to the
system, but now we are all just curious as to why SQL server doesn't
execute each individual INSERT.
Did he send one batch with 2000 statements, or 2000 batches? Without
seeing the code, it's difficult to know what we are talking about.
The most effective way of inserting data this way is:
INSERT tbl (...)
EXEC('SELECT ''thisvalue'', 1, ''thatvalue''
SELECT ''thisothervalue'', 2, ''thatothervalue''
...')
This keeps it down to one INSERT statement, but many small SELECT
statements that are easy to compile. (The alternative SELECT UNION
is very expensive to compile for 2000 rows.)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx