Showing posts with label complete. Show all posts
Showing posts with label complete. Show all posts

Thursday, March 29, 2012

Error executing SQL Script from VB:NET

Hi.

I have a complete script from a Database.

But when I try to execute this script (script.txt) from VB.NET shows me many errors. Basically, the special caracters (vbreturn, vbtab, etc.)

How execute this script or format the text to generate the database without problems?

Thanks 4all

IF it is a SQL script, you need a SQL interpreter to run the script.

You would use either OSQL.exe or SQLCmd.exe. (Refer to Books Online for complete syntax details.)

OSQL -S servername -U username -P password -i Scriptfile

Similar command line parameters for SQLCmd.exe

|||You could also tell us what the errors are, what VB object you are trying to use, etc. There are lots of different reasons why this won't work, but I am sure that it could be made to work. Using sqlcmd, osql, or isql would be the easiest way to go, (it changes from one version of SQL Server to the next for the past few versions Smile but SQLCMD is just a .NET program running your batches, so we can make it happen if you will describe more about your issues.

Thursday, March 22, 2012

Error Description differs when logged with Redirect Rows compared with Debug mode

Hi,

Can any one please tell me how to get the complete error description for example when i dont Redirect Row for Error in OLEDB Source i get a detailed error message with column name as

[RCheck [385]] Error: There was an error with input column "CHECK_STATUS" (456) on input "OLE DB Destination Input" (398). The column status returned was: "The value could not be converted because of a potential loss of data.".

But when I set Redirect Row for error and use the Script component to log them into a Table with ErrorDescription based on ErrorColumnID it only gives me this.

The data value cannot be converted for reasons other than sign mismatch or data overflow.

Thanks

Sat

Can't make the FailComponent and RedirectRow error messages the same with stock OLEDB source component.

If you want to actually redirect AND get the original provider error message that you would get in Fail Component mode, well, that component has yet to be written by Microsoft.

Instead, as you're seeing, when performing redirection using the OLEDB source; only the generic ErrorCode => generic textual description is exposed via ComponentMetaData.GetErrorDescription().

With a custom component of course, you can amend error outputs with additional columns, which is exactly what I have had to do to circumvent this problem.

Wednesday, March 21, 2012

error defragging index

I received this meesage when trying to defrag an index.
DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
Server: Msg 3624, Level 20, State 1, Line 1
Location: pageref.cpp:1191
Expression: 0 == pageFull
SPID: 68
Process ID: 724
Connection Broken
Can anyone tell me what it means?
Thanks,
Dan D.
Looks like a bug or the database has a corrupt page. What SP are you
running?
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
> I received this meesage when trying to defrag an index.
> DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
> Server: Msg 3624, Level 20, State 1, Line 1
> Location: pageref.cpp:1191
> Expression: 0 == pageFull
> SPID: 68
> Process ID: 724
> Connection Broken
> Can anyone tell me what it means?
> Thanks,
> --
> Dan D.
|||When I run "select @.@.version" I get:
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50 Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Is service pack 4 for windows or Sql Server?
Dan D.
"Paul S Randal [MS]" wrote:

> Looks like a bug or the database has a corrupt page. What SP are you
> running?
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
>
>
|||You're on SP2 and you've hit a bug that is fixed in SP3. You should upgrade
if possible or contact PSS as there may be a hotfix you can apply to SP2.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:8DAA85A5-072D-4A3F-8E3C-4025D79BD770@.microsoft.com...
> When I run "select @.@.version" I get:
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50
Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)[vbcol=seagreen]
> Is service pack 4 for windows or Sql Server?
> --
> Dan D.
>
> "Paul S Randal [MS]" wrote:
rights.[vbcol=seagreen]
complete.[vbcol=seagreen]

error defragging index

I received this meesage when trying to defrag an index.
DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
Server: Msg 3624, Level 20, State 1, Line 1
Location: pageref.cpp:1191
Expression: 0 == pageFull
SPID: 68
Process ID: 724
Connection Broken
Can anyone tell me what it means?
Thanks,
--
Dan D.Looks like a bug or the database has a corrupt page. What SP are you
running?
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
> I received this meesage when trying to defrag an index.
> DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
> Server: Msg 3624, Level 20, State 1, Line 1
> Location: pageref.cpp:1191
> Expression: 0 == pageFull
> SPID: 68
> Process ID: 724
> Connection Broken
> Can anyone tell me what it means?
> Thanks,
> --
> Dan D.|||When I run "select @.@.version" I get:
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50 C
opyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT
5.0 (Build 2195: Service Pack 4)
Is service pack 4 for windows or Sql Server?
--
Dan D.
"Paul S Randal [MS]" wrote:

> Looks like a bug or the database has a corrupt page. What SP are you
> running?
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
>
>|||You're on SP2 and you've hit a bug that is fixed in SP3. You should upgrade
if possible or contact PSS as there may be a hotfix you can apply to SP2.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:8DAA85A5-072D-4A3F-8E3C-4025D79BD770@.microsoft.com...
> When I run "select @.@.version" I get:
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50
Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)[vbcol=seagreen]
> Is service pack 4 for windows or Sql Server?
> --
> Dan D.
>
> "Paul S Randal [MS]" wrote:
>
rights.[vbcol=seagreen]
complete.[vbcol=seagreen]

error defragging index

I received this meesage when trying to defrag an index.
DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
Server: Msg 3624, Level 20, State 1, Line 1
Location: pageref.cpp:1191
Expression: 0 == pageFull
SPID: 68
Process ID: 724
Connection Broken
Can anyone tell me what it means?
Thanks,
--
Dan D.Looks like a bug or the database has a corrupt page. What SP are you
running?
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
> I received this meesage when trying to defrag an index.
> DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38% complete.
> Server: Msg 3624, Level 20, State 1, Line 1
> Location: pageref.cpp:1191
> Expression: 0 == pageFull
> SPID: 68
> Process ID: 724
> Connection Broken
> Can anyone tell me what it means?
> Thanks,
> --
> Dan D.|||You're on SP2 and you've hit a bug that is fixed in SP3. You should upgrade
if possible or contact PSS as there may be a hotfix you can apply to SP2.
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:8DAA85A5-072D-4A3F-8E3C-4025D79BD770@.microsoft.com...
> When I run "select @.@.version" I get:
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50
Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
> Is service pack 4 for windows or Sql Server?
> --
> Dan D.
>
> "Paul S Randal [MS]" wrote:
> > Looks like a bug or the database has a corrupt page. What SP are you
> > running?
> >
> > --
> > Paul Randal
> > Dev Lead, Microsoft SQL Server Storage Engine
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> > "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> > news:78F2C631-D958-475C-88C4-5C610C8E557F@.microsoft.com...
> > > I received this meesage when trying to defrag an index.
> > >
> > > DBCC: Compaction phase of index 'tmxvesta_2.dbo.RNWLWEEK' is 38%
complete.
> > > Server: Msg 3624, Level 20, State 1, Line 1
> > >
> > > Location: pageref.cpp:1191
> > > Expression: 0 == pageFull
> > > SPID: 68
> > > Process ID: 724
> > >
> > > Connection Broken
> > >
> > > Can anyone tell me what it means?
> > >
> > > Thanks,
> > > --
> > > Dan D.
> >
> >
> >sql

Sunday, February 26, 2012

Error connecting new data source to SQL Server Express

In ODBC Data Source Administrator, I add the SQL Server driver, complete a name and select my local SQL Server instance, select Windows NT authentication (the client configuration is set to TCP/IP, dynamically determine port) and on clicking Next, the following errors occur:

Connection failed:
SQLState: '01000'
SQL Server error: 2
[Microsoft][ODBC SQL Server Driver][Shared Memory][ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.

I note that in the Help it says: "The SQL Server system administrator must have associated your Microsoft Windows login with a SQL Server login ID".

Is this the problem? If so, where do I make this association?

Thanking you in anticipation.

In a default installation of SQL Express, every user on a computer can at least connect to the server. The fact that you're connection is failing suggests that something else is wrong. Based on the error, the most likely cause is that you've mis-typed the server name. SQL Express installs to a named instance so you need to provide both the machine name and instance name in your connection, be default, the instance name is SQLEXPRESS, so your server name would be <machinename>\SQLEXPRES. For local connection you can replace <machinename> with "(local)" or "." Note that it's a back slash, people commonly use the forward slash which will cause an error.

If that doesn't help, verify which SQL driver you are using, there are two of them. It looks like you're using the Native Client, which is good, but if you're using the old MDAC driver (just says "SQL Server" in the list) then you'll need to enable the TCP protocol for the Server using the SQL Configuration Manager. MDAC ODBC connection go through TCP, even for local connections.

Mike

|||

Hi,

I would suggest to refer http://support.microsoft.com/kb/322336 & http://support.microsoft.com/kb/328306/en-us

Hemantgiri S. Goswami

Error connecting new data source to SQL Server Express

In ODBC Data Source Administrator, I add the SQL Server driver, complete a name and select my local SQL Server instance, select Windows NT authentication (the client configuration is set to TCP/IP, dynamically determine port) and on clicking Next, the following errors occur:

Connection failed:
SQLState: '01000'
SQL Server error: 2
[Microsoft][ODBC SQL Server Driver][Shared Memory][ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.

I note that in the Help it says: "The SQL Server system administrator must have associated your Microsoft Windows login with a SQL Server login ID".

Is this the problem? If so, where do I make this association?

Thanking you in anticipation.

In a default installation of SQL Express, every user on a computer can at least connect to the server. The fact that you're connection is failing suggests that something else is wrong. Based on the error, the most likely cause is that you've mis-typed the server name. SQL Express installs to a named instance so you need to provide both the machine name and instance name in your connection, be default, the instance name is SQLEXPRESS, so your server name would be <machinename>\SQLEXPRES. For local connection you can replace <machinename> with "(local)" or "." Note that it's a back slash, people commonly use the forward slash which will cause an error.

If that doesn't help, verify which SQL driver you are using, there are two of them. It looks like you're using the Native Client, which is good, but if you're using the old MDAC driver (just says "SQL Server" in the list) then you'll need to enable the TCP protocol for the Server using the SQL Configuration Manager. MDAC ODBC connection go through TCP, even for local connections.

Mike

|||

Hi,

I would suggest to refer http://support.microsoft.com/kb/322336 & http://support.microsoft.com/kb/328306/en-us

Hemantgiri S. Goswami