Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Friday, March 30, 2012

How do I attach query results to send mail

I have several tasks that I don't want to use conditional failure on. I have a ON ERROR send mail task right now that works. I want to have that send mail task include query results from a separate query. How do I do that?

Peter Cwik

How about dropping the result of the query into a file usig the Flat File Destination and then attaching that file within Send Mail Task?

Just an idea...

-Jamie

|||SSIS is new to me...how do I do that?|||

What I just descibed is slightly advanced because it required the use of expressions. I don't want to try and cover those before you know the basics.

If I were you I would build the bit that populates a flat file first. You'll need a new data-flow. Drop an OLE DB Source Adapter into your data flow. Paste your query into the OLE DB Source Adapter.

Then, drop a Flat File Destination Adapter onto the data-flow. Drag a data path between your source adapter and your destination adapter. Open up the destination adapter editor and accept all the defaults - including building your flat file connection manager.

If none of that makes any sense then i recommend you work your way through the SSIS tutorial provided off the SQL Server install CD.

-Jamie

|||

That part makes sense.

Thanks!

Wednesday, March 28, 2012

how do I access an error cause inside an exec statement

Hello:
how do I access an error code when
SELECT @.RESULTS EXEC('DBCC DBREINDEX('''+@.NAME+''') ')
fails because the database..table does not exists ?
@.RESULTS comes back with nothing but
I get
Server: Msg 2501, Level 16, State 1, Line 1
Could not find a table or object named 'Internet_Forms.test'. Check
sysobjects.
(Problem since @.NAME is populated from sysobjects.....)
Thanks
TThe batch is aborted after encountering this specific error, so you cannot
followup and catch the error. One thing you could do is check if the table
exists like so:
if object_id('mytable') is not null
begin
<o.k. do something>
end
else
begin
<table does not exist>
end
The following is a good tutorial on the subject:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
"Support" <RemoveThis_Support@.mail.oci.state.ga.us> wrote in message
news:%23VCo9XZoFHA.1468@.TK2MSFTNGP12.phx.gbl...
> Hello:
> how do I access an error code when
> SELECT @.RESULTS EXEC('DBCC DBREINDEX('''+@.NAME+''') ')
> fails because the database..table does not exists ?
> @.RESULTS comes back with nothing but
> I get
> Server: Msg 2501, Level 16, State 1, Line 1
> Could not find a table or object named 'Internet_Forms.test'. Check
> sysobjects.
> (Problem since @.NAME is populated from sysobjects.....)
> Thanks
> T
>|||begin transaction
run querry
queryy @.@.error
commit when no error
rollback if erro
"Support" wrote:

> Hello:
> how do I access an error code when
> SELECT @.RESULTS EXEC('DBCC DBREINDEX('''+@.NAME+''') ')
> fails because the database..table does not exists ?
> @.RESULTS comes back with nothing but
> I get
> Server: Msg 2501, Level 16, State 1, Line 1
> Could not find a table or object named 'Internet_Forms.test'. Check
> sysobjects.
> (Problem since @.NAME is populated from sysobjects.....)
> Thanks
> T
>
>|||@.@.error returns noting becuase of JT's reason...
That's the problem
Thanks
"jose g. de jesus jr mcp, mcdba"
<josegdejesusjrmcpmcdba@.discussions.microsoft.com> wrote in message
news:B6A8654B-67F3-47F0-A93E-24D7E77F02F9@.microsoft.com...
> begin transaction
> run querry
> queryy @.@.error
> commit when no error
> rollback if erro
>
>
> "Support" wrote:
>

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.com
You don't. If you want to recover to a point in time which is between database backups, then you
should have proper operating measures for that requirement. I.e., do log backups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the information needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged, then you can give any of
the log reader tools a try. I have listed some on my links page.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>
|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>
|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed perform regular
transaction log backups as well as regular database backups, see Alejandro's post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference from not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
http://www.karaszi.com/SQLServer/inf...eral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between database backups, then you
> should have proper operating measures for that requirement. I.e., do log backups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the information needed to
> recover is most probably not in the ldf file anymore. If it is full or bulk logged, then you can
> give any of the log reader tools a try. I have listed some on my links page.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
>

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.comYou don't. If you want to recover to a point in time which is between databa
se backups, then you
should have proper operating measures for that requirement. I.e., do log bac
kups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the infor
mation needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged,
then you can give any of
the log reader tools a try. I have listed some on my links page.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed
perform regular
transaction log backups as well as regular database backups, see Alejandro's
post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference f
rom not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
http://www.karaszi.com/SQLServer/in...veral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between data
base backups, then you
> should have proper operating measures for that requirement. I.e., do log b
ackups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the inf
ormation needed to
> recover is most probably not in the ldf file anymore. If it is full or bul
k logged, then you can
> give any of the log reader tools a try. I have listed some on my links pag
e.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MS
FTNGP15.phx.gbl...
>sql

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.comYou don't. If you want to recover to a point in time which is between database backups, then you
should have proper operating measures for that requirement. I.e., do log backups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the information needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged, then you can give any of
the log reader tools a try. I have listed some on my links page.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed perform regular
transaction log backups as well as regular database backups, see Alejandro's post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference from not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
http://www.karaszi.com/SQLServer/info_restore_log_several_times.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between database backups, then you
> should have proper operating measures for that requirement. I.e., do log backups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the information needed to
> recover is most probably not in the ldf file anymore. If it is full or bulk logged, then you can
> give any of the log reader tools a try. I have listed some on my links page.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
>> Hello!
>> The database is giving the torn page error.
>> I have yesterday's backup and today's log file ldf.
>> How do I apply the log file to database? We didn't backup today's log...
>> Thanks for your help and attention.
>> Jorge C.
>> rdc02271@.yahoo.com
>>
>

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

u may need to change the connection string to something like

Server=ServerAddress;Database=DataBase;User ID=Username;Password=Password;Trusted_Connection=False

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

From MS:

During a logon process to SQL server the following error may appear:"Login failed for user 'username'. The user is not associated with atrusted SQL Server connection. (Microsoft SQL Server, Error: 18452)".

The SQL server has been configured to operate in "Windows Authentication Mode (Windows Authentication)" and doesn't allow
the use of SQL accounts.

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

Hope this helps

sql

Monday, March 26, 2012

how do 2 active statements for a connection ?

SQL Server 2000
ODBC driver
The second statement receive the error: "Connection is busy with result for
another hstmt"
There are ODBC driver for SQL Server that suport server side cursor such as
to be possible 2 active statements for a connection ?You can only have one active statement per connection.
Mike O.
"Pluta Gabriel" <Gabriel.Pluta@.deuromedia.ro> wrote in message
news:O6y$oeF3DHA.3216@.TK2MSFTNGP11.phx.gbl...
quote:

> SQL Server 2000
> ODBC driver
>
> The second statement receive the error: "Connection is busy with result

for
quote:

> another hstmt"
> There are ODBC driver for SQL Server that suport server side cursor such

as
quote:

> to be possible 2 active statements for a connection ?
>

how disable MSX server generated job

I have some jobs that when I want to delete or disable it I get bellow error
Msg:
"Error 14274 : cannot add, update, or delete a job that originated from an
MSX server"
what it means? how can I delete this job?
Thanks
TarvirdiIf memory servers, go into the MSDB.dbo.SysJobs table and update the
originating_server column to be that of the name the job currently resides
on. You should then be able to do whatever you want.
"Tarvirdi" wrote:

> I have some jobs that when I want to delete or disable it I get bellow err
or
> Msg:
> "Error 14274 : cannot add, update, or delete a job that originated from an
> MSX server"
> what it means? how can I delete this job?
> Thanks
> Tarvirdi
>
>

how disable MSX server generated job

I have some jobs that when I want to delete or disable it I get bellow error
Msg:
"Error 14274 : cannot add, update, or delete a job that originated from an
MSX server"
what it means? how can I delete this job?
Thanks
TarvirdiIf memory servers, go into the MSDB.dbo.SysJobs table and update the
originating_server column to be that of the name the job currently resides
on. You should then be able to do whatever you want.
"Tarvirdi" wrote:
> I have some jobs that when I want to delete or disable it I get bellow error
> Msg:
> "Error 14274 : cannot add, update, or delete a job that originated from an
> MSX server"
> what it means? how can I delete this job?
> Thanks
> Tarvirdi
>
>

Wednesday, March 21, 2012

How come this dont work?

Ok I am new to this command, BULK INSERT, I cant seem to get this to work or
error out for me.
Heres what I have;
BULK INSERT TBL_Master_DoNotCallList_Loader
FROM 'E:\DE_210652006.txt'
WITH
(
FIELDTERMINATOR = '~'
)
I am running this thru QA logged in as the Admin.
The file is in the location and the date looks like so, in Notepad.
302,2066707~302,2074122~302,2076346~302,2077647~302,2094465~
~ is the field and row terminator.
When I run above cmd I get it telling me it ran successfully.
But theres no data in table and it runs instantly.
Any help would be appreciated.
Thanks
Deasun
--
Deasun
Home Site: www.tirnaog.com
Check out: The Code Vault in my forums section.What is the definition of the table. Also, you didn't specify a row separator. Perhaps the table has
only one columns and you really want ~ as the row terminator?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Deasun" <Deasun@.discussions.microsoft.com> wrote in message
news:BCA35F53-B895-4F6A-9435-8AA493BA3338@.microsoft.com...
> Ok I am new to this command, BULK INSERT, I cant seem to get this to work or
> error out for me.
> Heres what I have;
> BULK INSERT TBL_Master_DoNotCallList_Loader
> FROM 'E:\DE_210652006.txt'
> WITH
> (
> FIELDTERMINATOR = '~'
> )
> I am running this thru QA logged in as the Admin.
> The file is in the location and the date looks like so, in Notepad.
> 302,2066707~302,2074122~302,2076346~302,2077647~302,2094465~
> ~ is the field and row terminator.
> When I run above cmd I get it telling me it ran successfully.
> But theres no data in table and it runs instantly.
> Any help would be appreciated.
> Thanks
> Deasun
> --
> Deasun
> Home Site: www.tirnaog.com
> Check out: The Code Vault in my forums section.|||"Deasun" wrote:
> Heres what I have;
> BULK INSERT TBL_Master_DoNotCallList_Loader
> FROM 'E:\DE_210652006.txt'
> WITH
> (
> FIELDTERMINATOR = '~'
> )
That should be:
BULK INSERT TBL_Master_DoNotCallList_Loader
FROM 'E:\DE_210652006.txt'
WITH
(
ROWTERMINATOR = '~'
)
ROWTERMINATOR <> FIELDTERMINATOR. You might need to specify both, but you
get the idea.
Maury|||Thanks to you both for the reply.
I had specified both row and field terminators at one point neither worked.
We now think it has something to do with the SQL server itself.
We have tried the cmd on another server and it worked fine. :)
Thanks again.
--
Deasun
Home Site: www.tirnaog.com
Check out: The Code Vault in my forums section.
"Maury Markowitz" wrote:
> "Deasun" wrote:
> > Heres what I have;
> > BULK INSERT TBL_Master_DoNotCallList_Loader
> > FROM 'E:\DE_210652006.txt'
> > WITH
> > (
> > FIELDTERMINATOR = '~'
> > )
> That should be:
> BULK INSERT TBL_Master_DoNotCallList_Loader
> FROM 'E:\DE_210652006.txt'
> WITH
> (
> ROWTERMINATOR = '~'
> )
> ROWTERMINATOR <> FIELDTERMINATOR. You might need to specify both, but you
> get the idea.
> Maury
>sql

How come Im getting error saying transaction log Full?

Hello,

I have a process that failed with the following error message. The SQL server error messages also said the Transaction log was full and there was not enough disc space.

Strangely, when I checked all the drives on the server, there was plenty of free space, the smallest amount free on one drive, where SQL server is located was 20GB. I am confused.

I backed up the DB to another server and deleted a lot of the transaction logs and now the drive has 30GB and is okay.

Does anyone know how the transaction log fills up? Can I change a setting somewhere to increase the maximum size of the transaction log? Or maybe change the location where it is saved to another drive? Or have it automatically cleared out every once in a while?

Any of your input is greatly appreciated.

Thanks.

Rodney

-----------------------
DS-DBMS-E400: UDA driver reported the following on connection 'Data Target
(ODBC)':
DMS-E-DBPARSER, The underlying database detected an error during processing of
the SQL request.
[Microsoft][ODBC SQL Server Driver][SQL Server]The log file for database
'ancosalesdm' is full. Back up the transaction log for the database to free up
some log space.
(for details, see Build_SAL_FA_ShipSKU_0584.log)
[PROGRESS - 00:32:42] Build Node 68 'SAL_FA_ShipSKU'; failed
DS-DBMS-E400: UDA driver reported the following on connection 'ALIAS_00DF1E74':
DMS-E-GENERAL, A general exception has occurred during operation 'execute
immediate'.
The log file for database 'ancosalesdm' is full. Back up the transaction log
for the database to free up some log space.
DMS-E-GENERAL, A general exception has occurred during operation 'execute
immediate'.
General SQL Server error: Check messages from the SQL Server.
DS-DBMS-E400: UDA driver reported the following on connection 'ALIAS_00DF1E74':
DMS-E-GENERAL, A general exception has occurred during operation 'rollback
transaction'.
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
DMS-E-GENERAL, A general exception has occurred during operation 'rollback
transaction'.
General SQL Server error: Check messages from the SQL Server.
-----------------------In Enterprise Manager, right click the DB and go to Properties. From there you can check to see if your Transaction Log has a size limit, and can adjust it if necessary.|||If you are not doing transaction log backups, you need to set the recovery mode on this database to Simple. This will make sure it doesn't just keep growing until it fills up.|||all this is good, but if a transaction affects a really large amount of data the recovery mode is irrelevant. the log will continue growing (if the setting to allow growth is on) until it reaches the limit specified or the limit of the disk.|||That's true, and if this is the case, you will need to break the transaction into smaller pieces. You can also insert CHECKPOINT at various places in your transaction if you need to, but this would be a pretty rare case.sql

How come i can't add a domain user?

how come when i try to add a domain user/group i get this error:
Error 15401: Windows NT user or group 'MYDOMAIN\Domain Users' not found.
Check the name again.Hi,
See the reply from Bill from a old postregarding the same issue.
Hi Biva,
I see this is a complex problem as usually the suggestions should work.
The Enterprise Manager will use sp_grantlogin to grant permissions. When we
use sp_grantlogin to grant the permissions to a NT User, the stored
procedure calls
LookupAccountSid function and that function looks in the SID cache on the
local
computer before it goes to a domain controller. If the SID in the cache is
incorrect, then the problem would occur. This problem may occur if we
rename the User account. As far as I know, the only method is to reboot the
computer. However, you may check with Windows 2000 newsgroups for
suggestions, e.g. microsoft.public.win2000.gener­al,
microsoft.public.win2000.activ­e_directory.
In addition, this indicates that domain names are not resolved properly.
Please check in Administators Group in Computer Management. If domains
accounts that are members 'ARE NOT' showing up like this,
domain\account
Instead, they show up as a long string of numbers, then it indicates that
it is not resolved properly. Please check with Windows 2000 newsgroups to
see if they have any suggestions.
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Bill Cheng
Microsoft Support Engineer
Thanks
Hari
"James" <See.My.Sig@.The.Bottom.com> wrote in message
news:s1wIe.13389$Bx5.11303@.trnddc09...
> how come when i try to add a domain user/group i get this error:
> Error 15401: Windows NT user or group 'MYDOMAIN\Domain Users' not found.
> Check the name again.
>
>|||thank you, i found my problem tho, i needed to apply ISA 2004 standard
server's service pack 1. isa doesn't like win2003's sp1... isa's firewall
was stoping rpc.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:OTxmREUmFHA.2852@.TK2MSFTNGP15.phx.gbl...
> Hi,
> See the reply from Bill from a old postregarding the same issue.
> Hi Biva,
>
> I see this is a complex problem as usually the suggestions should work.
>
> The Enterprise Manager will use sp_grantlogin to grant permissions. When
> we
> use sp_grantlogin to grant the permissions to a NT User, the stored
> procedure calls
> LookupAccountSid function and that function looks in the SID cache on the
> local
> computer before it goes to a domain controller. If the SID in the cache is
> incorrect, then the problem would occur. This problem may occur if we
> rename the User account. As far as I know, the only method is to reboot
> the
> computer. However, you may check with Windows 2000 newsgroups for
> suggestions, e.g. microsoft.public.win2000.gener­al,
> microsoft.public.win2000.activ­e_directory.
>
> In addition, this indicates that domain names are not resolved properly.
> Please check in Administators Group in Computer Management. If domains
> accounts that are members 'ARE NOT' showing up like this,
> domain\account
>
> Instead, they show up as a long string of numbers, then it indicates that
> it is not resolved properly. Please check with Windows 2000 newsgroups to
> see if they have any suggestions.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Regards,
>
> Bill Cheng
> Microsoft Support Engineer
>
> Thanks
> Hari
> "James" <See.My.Sig@.The.Bottom.com> wrote in message
> news:s1wIe.13389$Bx5.11303@.trnddc09...
>> how come when i try to add a domain user/group i get this error:
>> Error 15401: Windows NT user or group 'MYDOMAIN\Domain Users' not found.
>> Check the name again.
>>
>>
>

Friday, March 9, 2012

How can use 2 instance of SSRS?(WMI error code 80040219)

When I try to connect through SQL Server Management Studio,
the browser in the connect dialog can see the Reporting Services 2005 instance,
but when I try to connect, I get an error dialog with the message,
"An Unknown error has occured in WMI provider. error code 80040219."

it gives me no options for which instance to access
and connects to the default instance.
How do I connect to a 2nd named instance of SSRS via Management Studio?

i must use 2 different instance. (ex : 1) default instance 2) named instance) on the same physical server.
physical server os is cluster.
so i cant't remove one instance.

How can use 2 instance of SSRS via Management Studio?

Hi Jisungmon,

If you have installed on your machine named <Machine_Name> a second instance of Reporting Services named <Named_Instance>, you can connect to it using SQL Management Studio by following these steps:

- launch SQL Management Studio

- for Server type select: Reporting Services

- for Server name type: <Machine_Name>\<Named_Instance> ; or you can select <Browse for more ...>, expand the Reporting Services node, and select the same name from the list provided to you, then press OK

- for Authentication select what you prefer and eventually specify the parameters

- press Connect

Please let me know whether this is working for you.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

How can u remove my post ? Data migration from AS400 to Sql2005

Hi,

Yesterday I had posted a query of How to transfer the Data from AS400 files to Sql 2005 tables with DTS and the error I received for the same. I am not able to view the replies since it has been deleted. Pls repost the same. I posted the query expecting for a solution but instead my question was deleted..... the very purpose of forum is defeated.

Regds,

Anu

anu_ank wrote:

Hi,

Yesterday I had posted a query of How to transfer the Data from AS400 files to Sql 2005 tables with DTS and the error I received for the same. I am not able to view the replies since it has been deleted. Pls repost the same. I posted the query expecting for a solution but instead my question was deleted..... the very purpose of forum is defeated.

Regds,

Anu

Its possible that it was received because the question was concerning DTS. This is not a DTS forum.

Having said that, removing someone else's posts is completely improper. I would hope nobody would ever do that without a very good reason.

-Jamie

|||

Hi,

I want to migrate data from AS400 to Sql2005. From the Sql Management studio I invoke the Import Data wizard. For the source I connect to the ISereis system and for the Destination I select the Sql2005 Database , When I go to the next step i.e select source tables I get the error
"An error has occured which the SQL Server Integration Wizard was not prepared to handle
No error message available,result codeBig SmileB_E_CANTCANCEL(0*80040E15).(System.Data)" .After this I am unable to proceed .

I am using Client Access tool to connect to ISereis and the provider is "IBM DB2 UDB for isereis IBMDA400 OLE DB Provider"

I posted this question since I received the SSI error. If this is not the right place pls direct me to which forum I should post the above query .

Regds,

Anu

|||

I have not been successfull with the driver you mention. I am using AS400 iseries for V5R4

I would suggest you try with the oledb for ODBC driver or the microsoft driver, that I have been using recently in an SSIS package:

Microsoft DB2 driver

go to http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/featurepacks/default.mspx

and select the feature packs , in the list of feature packs you will see the Microsoft OLEDB Provider for DB2

|||

anu_ank wrote:

Hi,

Yesterday I had posted a query of How to transfer the Data from AS400 files to Sql 2005 tables with DTS and the error I received for the same. I am not able to view the replies since it has been deleted. Pls repost the same. I posted the query expecting for a solution but instead my question was deleted..... the very purpose of forum is defeated.

Regds,

Anu

When viewing your profile, you can click on the "Search" button. That will show you your threads you have started.

Your post is not deleted. It is in the SQL Server Tools General forum.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1487606&SiteID=1

How can this be ordered/grouped?

I have the following four columns:
1 3 ok 1
1 2 ok 1
1 1 server error 3
2 3 ok 1
2 2 ok 1
2 1 ok 1
9 3 ok 1
9 2 ok 1
9 1 not found 3
13 3 ok 1
13 2 ok 1
13 1 ok 1
Their data types are int, int, string, int. Call the columns
groupid, ordinalid, status, quantstatus.
I want the above to sort this way:
9 3 ok 1
9 2 ok 1
9 1 not found 3
1 3 ok 1
1 2 ok 1
1 1 server error 3
13 3 ok 1
13 2 ok 1
13 1 ok 1
2 3 ok 1
2 2 ok 1
2 1 ok 1
Notice those with a 3 in quantstatus appear first. They are ordered by:
groupid, ordinalid desc
Any suggestions?
Thanks,
BrettTry,
select
*
from
t
order by
case when left(groupid, 1) = '9' then 0 else 1 end asc,
ltrim(groupid) asc,
ordinalid desc
AMB
"Brett" wrote:

> I have the following four columns:
> 1 3 ok 1
> 1 2 ok 1
> 1 1 server error 3
> 2 3 ok 1
> 2 2 ok 1
> 2 1 ok 1
> 9 3 ok 1
> 9 2 ok 1
> 9 1 not found 3
> 13 3 ok 1
> 13 2 ok 1
> 13 1 ok 1
> Their data types are int, int, string, int. Call the columns
> groupid, ordinalid, status, quantstatus.
> I want the above to sort this way:
> 9 3 ok 1
> 9 2 ok 1
> 9 1 not found 3
> 1 3 ok 1
> 1 2 ok 1
> 1 1 server error 3
> 13 3 ok 1
> 13 2 ok 1
> 13 1 ok 1
> 2 3 ok 1
> 2 2 ok 1
> 2 1 ok 1
> Notice those with a 3 in quantstatus appear first. They are ordered by:
> groupid, ordinalid desc
> Any suggestions?
> Thanks,
> Brett
>
>|||That starts off OK. The first four groups are fine. But when a larger set
a data is considered, the query breaks down. Notice where group 19 and 20
are. They're column four has a 3. They should be where 13 and 14 are. How
can this be fixed?
9 3 ok 1
9 2 ok 1
9 1 na 3
1 3 ok 1
1 2 ok 1
1 1 na 3
10 3 ok 1
10 2 ok 1
10 1 na 3
11 3 ok 1
11 2 ok 1
11 1 na 3
13 3 ok 1
13 2 ok 1
13 1 ok 1
14 3 ok 1
14 2 ok 1
14 1 ok 1
17 3 ok 1
17 2 ok 1
17 1 ok 1
18 3 ok 1
18 2 ok 1
18 1 ok 1
19 3 ok 1
19 2 ok 1
19 1 na 3
2 3 ok 1
2 2 ok 1
2 1 ok 1
20 3 ok 1
20 2 ok 1
20 1 na 3
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:9C230AE9-FCFB-4EFE-A559-C99868B2BE66@.microsoft.com...
> Try,
> select
> *
> from
> t
> order by
> case when left(groupid, 1) = '9' then 0 else 1 end asc,
> ltrim(groupid) asc,
> ordinalid desc
>
> AMB
> "Brett" wrote:
>|||Brett,
Try
select
groupid, ordinalid, status, quantstatus
from T as T1
order by
case where exists (
select * from T as T2
where T2.groupid = T1.groupid
and T2.quantstatus = 3
) then 0 else 1 end,
groupid, ordinalid desc
Steve Kass
Drew University
Brett wrote:

>I have the following four columns:
>1 3 ok 1
>1 2 ok 1
>1 1 server error 3
>2 3 ok 1
>2 2 ok 1
>2 1 ok 1
>9 3 ok 1
>9 2 ok 1
>9 1 not found 3
>13 3 ok 1
>13 2 ok 1
>13 1 ok 1
>Their data types are int, int, string, int. Call the columns
>groupid, ordinalid, status, quantstatus.
>I want the above to sort this way:
>9 3 ok 1
>9 2 ok 1
>9 1 not found 3
>1 3 ok 1
>1 2 ok 1
>1 1 server error 3
>13 3 ok 1
>13 2 ok 1
>13 1 ok 1
>2 3 ok 1
>2 2 ok 1
>2 1 ok 1
>Notice those with a 3 in quantstatus appear first. They are ordered by:
>groupid, ordinalid desc
>Any suggestions?
>Thanks,
>Brett
>
>
>|||The CASE statement isn't fully constructed.
CASE input_expression
WHEN when_expression THEN result_expression
END
You need an expression before and after the WHEN part. Right now you only
have one expression.
Thanks,
Brett
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23skWdcACFHA.2180@.TK2MSFTNGP12.phx.gbl...
> Brett,
> Try
> select
> groupid, ordinalid, status, quantstatus
> from T as T1
> order by
> case where exists (
> select * from T as T2
> where T2.groupid = T1.groupid
> and T2.quantstatus = 3
> ) then 0 else 1 end,
> groupid, ordinalid desc
> Steve Kass
> Drew University
> Brett wrote:
>|||>> You need an expression before and after the WHEN part. Right now you
Not quite. Apart from Steve's typo with using "where" instead of WHEN, the
case expression is valid. You may want to check out SQL Server Books Online
for searched case, under the topic CASE.
ORDER BY CASE WHEN EXISTS (
SELECT * FROM T AS T2
WHERE T2.groupid = T1.groupid
AND T2.quantstatus = 3
) THEN 0 ELSE 1 END, groupid DESC, ordinalid DESC ;
Anith|||Sorry, didn't catch that. It works Perfect!
What exactly does this part do:
THEN 0 ELSE 1 END
Alejandro used it also.
Thanks,
Brett
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:OlxPpABCFHA.1392@.tk2msftngp13.phx.gbl...
> Not quite. Apart from Steve's typo with using "where" instead of WHEN, the
> case expression is valid. You may want to check out SQL Server Books
> Online for searched case, under the topic CASE.
> ORDER BY CASE WHEN EXISTS (
> SELECT * FROM T AS T2
> WHERE T2.groupid = T1.groupid
> AND T2.quantstatus = 3
> ) THEN 0 ELSE 1 END, groupid DESC, ordinalid DESC ;
> --
> Anith
>|||Thanks for the catch, Anith!
SK
Anith Sen wrote:

>Not quite. Apart from Steve's typo with using "where" instead of WHEN, the
>case expression is valid. You may want to check out SQL Server Books Online
>for searched case, under the topic CASE.
>ORDER BY CASE WHEN EXISTS (
> SELECT * FROM T AS T2
> WHERE T2.groupid = T1.groupid
> AND T2.quantstatus = 3
> ) THEN 0 ELSE 1 END, groupid DESC, ordinalid DESC ;
>
>|||On Mon, 31 Jan 2005 22:52:42 -0500, Brett wrote:

>What exactly does this part do:
>THEN 0 ELSE 1 END
Hi Brett,
It's part of the CASE expression. If the WHEN clause (containing the
subquery with exists) evaluates to true, the CASE expression will evaluate
to 0 (the THEN value); otherwise, it'll return 1 (the ELSE part). This
value (0 or 1) won't be in the result set, but it's the first value in the
ORDER BY clause. So after ordering, all rows for which the EXISTS subquery
is true will be first (sorted on the value 0); all others last (sorted on
the value 1).
Second and third argument to the ORDER BY clause are responsible for
fixing the order within these two sub-groups.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

how can sqldataobject error be traped

My database has two tables that are joined by a relation (Item category and the item). My relation will not permit the deletion of item categories if there are item referencing it.

How can that error be trapped to then show a message such as. Cannot delete item category that has item associated with it?

This is a asp.net web form with VB

this is the error I get

Server Error in '/TWGSalesInfo' Application.

The DELETE statement conflicted with the REFERENCE constraint "FK_PurchaseVendors_PurchaseItems". The conflict occurred in database "CustSegmentation", table "dbo.PurchaseVendors", column 'VendorPurchaseItemID'.
The statement has been terminated.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_PurchaseVendors_PurchaseItems". The conflict occurred in database "CustSegmentation", table "dbo.PurchaseVendors", column 'VendorPurchaseItemID'.
The statement has been terminated.

Source Error:

Line 1904: }Line 1905: try {Line 1906: int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();Line 1907: return returnValue;Line 1908: }

Thanks

Dj

Simply add a try/catch block

try

{

int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();

return returnValue

}

catch(SqlException)

{

/// throw your custom exception here

throw new MyCustomDeleteException("Unable to delete record...");

}

and in the upper level catch only exceptions of your custom type

Wednesday, March 7, 2012

How can I workaround this problem?

Hello everbody,

this query:

SELECT * FROM TBL_DEVICE_DRIVERS

WHERE (DD_CATEGORIES & 2147483648) > 0

bring the error message:

Invalid operator for data type.

The value 2147483648 is hex 0x80000000 for bitwise

joining defined.

I try to cast it to decimal, but it does not work.

Have anybody an idea?

Thanks for answers!

hi,

what is the datatype of DD_CATEGORIES column? The bitwise operator works only on int datatypes hence the Invalid Operator for DataType.

ADD'L:

I think what happens is an overflow of the datatype : 2147483648 (max int), so cast the constant (2147483648) to bigint ex:

SELECT someCol & CAST(2147483648 AS BIGINT)

HTH|||

Will you please elaborate what you want to achive? as far as i understand you are try to make logical AND operation in the where clause as "DD_CATEGORIES & 2147483648".

what type of DD_CATRGORIES is ? try to check it data type

OR send the table structure & some semple data to, so that we can check it.

Gurpreet S. Gill

|||

Thomas:

Good question! Look at this:

-- -
-- Representation problem with 0x80000000
--
-- Even though 0x80000000 is a valid integer representation of -2147483648, MS SQL Server does
-- not seem to interpret this constant as an integer.
--
-- 1. The datalength of -2147483648 is 5; this is clearly not an INTEGER representation.
-- 2. When the "constant" -2147483648 is converted to binary its representation is 0x0A00000000
-- and NOT 0x80000000.
-- 3. If -2147483648 is cast as an integer, it then takes on the 0x80000000 representation.
-- 4. When -2147483648 is cast as an integer it can now be operated on by the & operator.
--
-- Not what you expected is it!
-- -


select datalength ( -2147483648) as Results

Results
--
5


select convert (binary(5), -2147483648) as Results

Results
0x0A00000000


select convert (binary(4), cast(-2147483648 as int)) as results
results
-
0x80000000


select convert (binary (4), cast(-2147483648 as int) & cast(-2147483648 as int)) as Results

Results
-
0x80000000


Dave

how can i view customized error message?

hello
when error messages are added to my sql server, how can i view them?
i can not find them from the table (in master)
where does mssql 2000 store this information?
thank you
Hank,
Are you referring to master..sysmessages table?
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"hank" <anonymous@.discussions.microsoft.com> wrote in message
news:7DE6C377-84FF-411D-BCDD-A12848CA58C5@.microsoft.com...
> hello
> when error messages are added to my sql server, how can i view them?
> i can not find them from the table (in master)
> where does mssql 2000 store this information?
> thank you
|||thank you!!

how can i view customized error message?

hello
when error messages are added to my sql server, how can i view them?
i can not find them from the table (in master)
where does mssql 2000 store this information?
thank youHank,
Are you referring to master..sysmessages table?
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hank" <anonymous@.discussions.microsoft.com> wrote in message
news:7DE6C377-84FF-411D-BCDD-A12848CA58C5@.microsoft.com...
> hello
> when error messages are added to my sql server, how can i view them?
> i can not find them from the table (in master)
> where does mssql 2000 store this information?
> thank you|||thank you!!