Unable To Restore To Other DB ?

Jul 22, 2004

Hi,

I have every nights a backup script that is running using the following command on my sql server 2000 :

backup database MYDB to disk="d:mssql2000MSSQLBACKUPdb_MYSERVER_MYDB.bak" with init

Now, i need to restore one of these files to a new Database with another name...in order to look at certain table and its content

I'm unable to find the correct RESTORE command and didn't find how to do it using enterprise Manager..

Any help would be VERY welcome ;-))

Florent -- Near the whole

View 6 Replies


ADVERTISEMENT

Unable To Restore Users!! Pls Help

Oct 4, 2004

Hi All,
Greetings,
Sql server 7

I am trying to restore a database of sql server 7 to another. Restoring is happening fine with respect to tables, stored procedures etc, but i am not able to restore the users that are present in the source database.

Please help in this.

TIA

View 1 Replies View Related

Unable To Specify UNC Path For Restore Through GUI??

Feb 24, 2007

Hi,After just installing sql 2005 on our test machine, I am trying torestore a database using a backup file on the network. However, thespecify backup diagol box allows only for browsing to a file on thelocal machine - I find no way to type a UNC path to choose the backupfile from. I can do this in 2000, is it no longer an option to doitthrough the GUI or am I missing something?ThanksKR

View 1 Replies View Related

Unable To Restore The Database Backup

Apr 22, 2006

Hi,

I took the backup of a database (called students) from one of the machine on our LAN and then tried to restore it on another machine but am unable to restore the database. Below are some details of the problem I am facing:

- The machine on which I am trying to restore the database (i.e. target box) previously had a database by the same name (no it was not a replica). I had deleted this database from the target box before trying to restore the database (of the same
name and which was backed-up from the source box)

- When trying to restore (via EM) I get a VERY LONG dialog box with lots of details. Below are some details of what this dialog box says:

The title of the database is MS SQL-DMO (ODBC SQL State: 42000) and It says "The physical name 'C:Program Files.....datastudents.mdf' may be incorrect. File 'students_Data' cannot be restored to 'C:Program Files.....datastudents.mdf'. Use with MOVE to identify a valid location for this file.

And the dialog box provides similar details related to 'students.ldf'
Can u please help me with this.

View 3 Replies View Related

Restore Database When Unable To Connect?

Feb 23, 2005

Hey

Quick question for the experts here! Wink

We have the issue of wanting to restore an MSSQL database (.BAK) but are unable to "Connect" to the existing database; but we are able to "Start" the database currently.

When we are unable to perform a "Connect", then under "All Tasks" you don't get the option to "Restore Database"

I am hoping there is a way around this and still a possibility of doing a restore without having to do an entire install of MSSQL again and then a restore?

Thanks!

View 2 Replies View Related

Unable To Restore The Database Backup

Apr 23, 2006

Hi,

I took the backup of a database (called students) from one of the machine on our LAN and then tried to restore it on another machine but am unable to restore the database. Below are some details of the problem I am facing:

- The machine on which I am trying to restore the database (i.e. target box) previously had a database by the same name (no it was not a replica). I had deleted this database from the target box before trying to restore the database (of the same name and which was backed-up from the source box)

- When trying to restore (via EM) I get a VERY LONG dialog box with lots of details. Below are some details of what this dialog box says:

The title of the database is MS SQL-DMO (ODBC SQL State: 42000) and It says "The physical name 'C:Program Files.....datastudents.mdf' may be incorrect. File 'students_Data' cannot be restored to 'C:Program Files.....datastudents.mdf'. Use with MOVE to identify a valid location for this file.

And the dialog box provides similar details related to 'students.ldf'
Can u please help me with this.

View 1 Replies View Related

Unable To Restore Database Backup.

Sep 21, 2007



I am trying to restore a SQL Server 2005 database backup file.The size of the database backup is 5.51 GB. I specify the source as a device and then provide the path of the .bak file and press OK i get the error as follows





TITLE: Microsoft SQL Server Management Studio
------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

The media family on device 'G:ITWeb DB BkupDB BkupNew BkupWSS_Content_ITWEB.bak' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Please let me know how we can solve this issue.

Satish

View 5 Replies View Related

Unable To Restore Database Backup

May 13, 2008

Hello,

My name is Elizabeth and I'm a SQL newbie.

So we do SQL 2005 Database backup daily. At one point, we have to restore the backup. However, we cannot restore it whatsoever; it keeps saying that the database is in use.

It is actually a SQL Database for a CRM Server. I stop the internet service, so CRM or any other instances cannot pull up information from the SQL Database. I try running sp_who and killing the processes that are still using the database, but those processes keep coming back again.

Here is the error that I keep getting.



Could anyone please help me on this one? Thanks in advanced!


-Elizabeth K.

View 4 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is urgent. WIll be VERY grateful for your urgent reply.

View 7 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is really urgent. Will be VERY grateful for your urgent reply.

View 13 Replies View Related

Unable To Connect To Server After Master DB Restore

Oct 25, 2014

I have restored the master db in single user mode.

---
Processed 440 pages for database 'master', file 'master' on file 1.
Processed 3 pages for database 'master', file 'mastlog' on file 1.
The master database has been successfully restored. Shutting down SQL Server.
SQL Server is terminating this process.
---

I removed single user mode parameter(-m;)

When I start SQL Server in configuration manager getting below error

---
The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details
--

View 1 Replies View Related

Unable To Restore Databases From Tape: Timeout Exp

Jul 6, 2007

I'm trying to test my backups by restoring from production onto a DEV machine.

However, when I insert the backup tape into the drive, then go into SSMS and right click on
Databases -> Restore Database -> From Device .... -> Tape -> Add -> (my tape drive \.Tape0) -> Contents
it displays the contents as it should.

So I click "Close" to close the contents and bring me back to the Specify Backup where I have \.Tape0 selected and I then click "OK"
SSMS sits for a few seconds, and then I get a time out error message:

TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------


That's all the further I can get... any suggestions?

I'm VERY perplexed by this...

View 2 Replies View Related

T-SQL (SS2K8) :: Unable To Restore Backup File To Different Database

May 28, 2014

I created a dummy database (TomsTest) and then I try to restore my other database "DEV" to it.Normally, you have to use the Move for both the mdf and ldf files to tell it to restore to another database.But the message I am getting is: The file 'D:SQLDataTomsTest.mdf' cannot be overwritten. It is being used by database 'TomsTest'.

USE [master]
RESTORE DATABASE [DEV] FROM DISK = N'D:SQLBackupDEV_backup_2014_05_28.bak' WITH FILE = 1,
MOVE N'Dev' TO N'D:SQLDataTomsTest.mdf',
MOVE N'DEV_log' TO N'D:SQLDataTomsTest_log.ldf', NOUNLOAD, REPLACE, STATS = 5

Of course it is in use, that's always the case. Even if I put it in single use mode, it still doesn't work.I tried it on another machine and had the same problem. Not sure why. If I call it the same name, it works fine but I don't want to overwrite the original database, I just need to get some data from the backup.

View 4 Replies View Related

Unable To Restore Backup Database In Sql Server 2005

Oct 5, 2007

I am using sql server 2005 and unable to restore backup file(.bak) file when i ry to restore it to other database it shows following error


restore failed for server (microsoft.sqlserver.smo)
additional information:
system.data.sqlclient.sqlerror : the media set has 2 media families but only 1 are provided.All members nust be provided.(microsoft.sqlserver.smo)

View 1 Replies View Related

Replication Issues After A Database Restore - Unable To Drop Or Create Transactional Replication

Sep 13, 2007

Hi,I have transactional replication set up on on of our MS SQL 2000 (SP4)Std Edition database serverBecause of an unfortunate scenario, I had to restore one of thepublication databases. I scripted the replication module and droppedthe publication first. Then did a full restore.When I try to set up the replication thru the script, it created thepublication with the following error messageServer: Msg 2714, Level 16, State 5, Procedure SYNC_FCR ToGPRPTS_GL00100, Line 1There is already an object named 'SYNC_FCR To GPRPTS_GL00100' in thedatabase.It seems the previous replication has set up these system viewsSYNC_FCR To GPRPTS_GL00100. And I have tried dropping the replicationmodule again to see if it drops the views but it didn't.The replication fails with some wired error & complains about thisviews when I try to run the synch..I even tried running the sp_removedbreplication to drop thereplication module, but the views do not seem to disappear.My question is how do I remove these system views or how do I make thereplication work without using these views or create new views.. Whyis this creating those system views in the first place?I would appreciate if anyone can help me fix this issue. Please feelfree to let me know if any additional information or scripts needed.Thanks in advance..Regards,Aravin Rajendra.

View 2 Replies View Related

Unable To Restore Databases From Tape: Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The

Jul 6, 2007

I'm trying to test my backups by restoring from production onto a DEV machine.



However, when I insert the backup tape into the drive, then go into SSMS and right click on

Databases -> Restore Database -> From Device .... -> Tape -> Add -> (my tape drive \.Tape0) -> Contents

it displays the contents as it should.



So I click "Close" to close the contents and bring me back to the Specify Backup where I have \.Tape0 selected and I then click "OK"

SSMS sits for a few seconds, and then I get a time out error message:

TITLE: Microsoft SQL Server Management Studio
------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------






That's all the further I can get... any suggestions?



I'm VERY perplexed by this...

View 11 Replies View Related

Reporting Services :: Cannot Click Restore Button In RS Configuration Manager To Restore Encryption Key

Oct 29, 2015

While migrating Report services in SQL Server 2005 to 2014, I am trying to restore the Encryption Key in RS Configuration Manager in2014. But I cannot click the 'Restore' button in RS Configuration Manager. So if I should be grant more right to do so or any other action?

View 2 Replies View Related

SQL Server Admin 2014 :: How To Do System Restore To Previous Restore Point

Dec 31, 2014

In Windows Server 2012. How do I do a System Restore to a previous restore point?I need to install the 64 bit and 32 bit Oracle Client Install for connections in SSIS and to create Oracle Linked Servers.

If you make a mistake it is not fun removing it. Sometimes it corrupts the machine and it is difficult to uninstall since there is not an Oracle Universal installer for Oracle 11g.If you install the 32 bit before the 64 you mess up the machine.how to create a restore point.

View 6 Replies View Related

Transact SQL :: Backup / Restore Tools Which Can Restore Multiple Environments

Jun 25, 2015

I am looking for a SQL Backup/Restore tools which can restore multiple environments.  Here is high level requirements.

1.  We have 4 DBs, range from 1 TB - 1.5 TB Each Database.  When we restore to QA, DEV, or Staging, we usually restore 4 of them.
2.  I am looking for the speed to complete restoring between 1 - 2 hours for 4 DBs.

I am evaluating the Dephix Software but the setup is very complex and its given us a lot of issues with Windows Authentions, and failure in the middle of the backup.  I used Guess Software many years ago but can't find it on the web site any more. Speed is very important for us mean complete restoring as fast as possible.  We are on SQL 2012 and SQL 2008 R2.We are currently using NETAPP Technology and I have Redgate Backup Tool but I am mainly looking for fast Restore Process.

View 4 Replies View Related

Syntex For Restore Filelistonly && Restore Verifyonly

Jun 30, 2006

Hello,

Would some one please help me with the syntex on how to run "restore filelistonly" or restore verifyonly" on a SQL backup which has multiple filesets?? My backups locations are as follow:
RESTORE VERIFYONLY
From disk = 'E:syndicated_databank__bkup_01.bak',
'E:syndicated_databank__bkup_02.bak',
€˜E:syndicated_databank__bkup_03.bak€™,
€˜E:syndicated_databank__bkup_04.bak€™, €˜E:syndicated_databank__bkup_05.bak€™

I tried to do a restore with the above, I got error The label 'E' has already been declared. Label names must be unique within a query batch or stored procedure.

Please advise!!

View 3 Replies View Related

Database Restore Failed, Now Inaccessible And Can Not Restore.

Apr 27, 2007

I have seen this before. A 2000 restore fails, leaving the database thinking it is being restored but the restore job failed and errors when it is restarted. EM is clueless. I believe there is a proc to reset some flag. Can you share it with me???



Thanks!

View 4 Replies View Related

SQL 2012 :: Restore DB From Prod To Test - How To Restore Users In Test

Jun 25, 2015

I need to restore test DB from production backup but once it is restored I would need all the permissions of sql logins and windows AD account intact in test Db as it was before.

View 4 Replies View Related

RESTORE Database - Database In Use, Restore Fails

Nov 19, 1999

11/19

Trying to keep out sysadmins & sa during/between database RESTORE

Configuration:
WINNT Server Enterprise 4.0 w/SP5
SQL Server 7 Enterprise & SP1

2 SQL Servers:
Production Server
Standby server

I Backup (full backup) databases to disk on primary server (logical backup devices are physicaly located on a Standby server (dedicated gigabit NIC in each server for this process). Transaction logs are applied to the Standby server throughout the day.

Problem:
How to keep out "sa" and sysadmins from a database while I'm restoring (or between restores) to a standby server?
The database being restored cannot be in use during a restore.
If a DBA forgets that this process is happening, the statement fails (RESTORE)for the database they happen to be in at the time of the restore.

Example restore statement:
Standby Server -
RESTORE DATABASE databasename FROM database_dd WITH DBO_ONLY, REPLACE, STANDBY = 'g:Mssql7FromPrimaryDatabaseName_undo.ldf'

I could restrict Domain sysadmin access and change sa password. I could also put the database in "Single user" mode, however this could become problem if my process disconnects and then someone else connects - then my process is locked out. What I'm really looking for is to lock out all activity for a database that is in "standby mode" except for RESTORE processes.

Any ideas??

Wade
wadej@vailresorts.com

View 1 Replies View Related

Unable To Connect To DB

Nov 27, 2006

Hello everybody
I wrote a vb.net win app that uses a mssql 2005 express DB.
On my localcomputer everything worked without a problem.
Now I wish to deploy my app on a remote computer (that has mssql 2005 express installed), so. I added an app setup project to my project using the vs2005 setup tool, installed the app on the remote computer, and copied the mdf file to the remote computer.
I'm able to see the DB through the remote computer mssql manager, But when I try to start the app on the remote computer I get this error massage :
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. error: 0 - No process is on the other end of the pipe.)
my connectionstring (in the config file) looks like that :
    <connectionStrings>        <add name="Info_Manager.My.MySettings.MaxinetConnectionString"            connectionString="Data Source=DOTAN-XPSQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataMaxinet.mdf;Integrated Security=True;User Instance=True"            providerName="System.Data.SqlClient" />        <add name="Info_Manager.My.MySettings.MaxinetConnectionString1"            connectionString="Data Source=DOTAN-XPSQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataMaxinet.mdf;Integrated Security=True;User Instance=True"            providerName="System.Data.SqlClient" />    </connectionStrings>
by the way changing the user instance attribute to "false" didn't help.
Does anybody know how to fix this problem.
 
 

View 2 Replies View Related

Unable To Use SQL Profiler

Aug 8, 2000

I am using SQL7. On the client network utility, I am using name pipe and have 4 entries and they are in the same format (ie. server name, named pipes and ip address). I have problem to connect to some of them and getting
[microsoft][ODBC SQL Server Driver]Client unable to establish connection
and [microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionOpen(CreateFile())
Any idea?

View 1 Replies View Related

Unable To Register

Jan 30, 2001

Hi,
I am trying to register one server and I get the following message -
"Client unable to establish connection Connection OpenCreatefile()"
Any advice highly appreciated.
Thanks
PD

View 1 Replies View Related

Unable To Connect

Aug 14, 1998

Howdy

Every time i reboot my NT Server and the SQL server service starts up. It logs this message to the event Viewer

Severity: 9 Error:10004, OS: 11001 Unable to connect: SQL Server is unavailable or does not exist. General network error. Check your documentation.ConnectionOpen (gethostbyname()()).

I don`t have any problem with the databases, all the users are able to connect to server and database without any problems, looks like everything is working at its best. But i am little concerned about this error message.

Please help

Thanks
vIVEk

View 1 Replies View Related

Unable To Connect

Apr 1, 2002

Everything has been working fine our SQL Server (lets call it Server A) (v2000 under NT 4), however sometime over the weekend it is unable to connect to one of our other SQL Servers (Server B).

In the Event Viewer I found this error:
SuperSocket info: Failed to get Exclusive port use(MSAFD Tcpip (TCP/IP)): Error 10013.

Everything on this server appears to be working fine, as in everything can connect to Sever A that needs to, but Server B can't connect to A, nor is it working the other way.

Also, Server A SQL Services run on port 2006, and B is on the standard 1433. Everything has been working with this up until today?

Any ideas?
Thanks!

Keith

View 1 Replies View Related

Unable To Backup All The Dbs

Apr 24, 2008

i am using sql 2005,i want to backup all the databases when i try to schedule a maintenance plan , i dont get all the databases listed event though i authenticate as SA.

View 6 Replies View Related

Unable To Complie

Jan 26, 2007

hi
i WAS ABLE TO COMPLIE this proc in the morning but droped unknowningly now iam unable to complie
all the column 'empr_id' exists when i run this speratly the select statement it works


CREATE PROCEDURE search_trans
(
@tpa_idvarchar(6),
@empr_idvarchar(18) = NULL,
@empe_keyint = NULL,
@service_start_dtedatetime= NULL,
@user_id_keyint,
@acct_type_cdevarchar(4) = NULL,
@batch_countint = 20
)
AS
BEGIN

SET NOCOUNT ON

DECLARE@total_errorstinyint,
@TXN_PROCESS_CDE_VALIDsmallint,
@DuplicateFlagint,
@user_type_cdesmallint,
@USER_TYPE_MBIsmallint,
@USER_TYPE_SYSTEMsmallint

SELECT@total_errors = 0,
@TXN_PROCESS_CDE_VALID= 1,
@DuplicateFlag=16,
@user_type_cde= dbo.udf_GetUserTypeCode(@user_id_key),
@USER_TYPE_MBI= 1,
@USER_TYPE_SYSTEM= 16,
@tpa_id = dbo.udf_IsDefaultString(@tpa_id, NULL),
@empr_id = dbo.udf_IsDefaultString(@empr_id, NULL),
@empe_key = dbo.udf_IsDefaultInt32(@empe_key, NULL),
@acct_type_cde = dbo.udf_IsDefaultString(@acct_type_cde, NULL),
@service_start_dte = dbo.udf_IsDefaultDateTime(@service_start_dte, NULL)


IF @tpa_id IS NULL
BEGIN
EXECUTE @total_errors = dbo.usp_ERR_InsertUserError @error_cde = 18015, -- TODO error code
@error_cnt = @total_errors
END

IF @total_errors > 0
BEGIN
GOTO EXITSP
END

DECLARE@TEMP_DUPLICATES TABLE
(
tpa_id VARCHAR(6) NOT NULL,
empr_id VARCHAR(18) NOT NULL,
empe_key INT NOT NULL,
service_start_dte datetime, -- TODO finish this declaration,
service_end_dte datetime,
cardholder_name VARCHAR(2000),
txn_amt_orig decimal(19,4),
approved_amt int,
denied_amt int,
merchant_name VARCHAR(50),
MTC char(4),
notes varchar(255),
txn_options smallint
)
INSERT INTO @TEMP_DUPLICATES
(
tpa_id,
empr_id,
empe_key,
service_start_dte,
service_end_dte,
cardholder_name,
txn_amt_orig,
--approved_amt
denied_amt,
merchant_name,
MTC,
notes,
is_dup
)
SELECT TOP 20 -- TODO latest entered @batch_count value duplicate records
FT.tpa_id,
FT.empr_id,
FT.empe_key,
FT.service_start_dte,
FT.service_end_dte,
(e.first_name+ ', '+ e.last_name ) AS cardholder_name, -- TODO: construct name with

firstname,lastname with joining with employee/dep tables if needed should decrypt the data
--E.first_name if cardholder_name is accessed by employee then these two column can be ignored,
--E.last_name,
FT.txn_amt_orig,
--approved_amt, -- --Need to to put condition to how to get approved amt,
FT.denied_fee, -- This column considered for denied_amt as this column doesnot exists
FT.merch_name,
FT.merch_id, -- MTC column on UI
FT.notes,
is_dup = '1'
FROM dbo.[vw_PDB_FLEX_TXN] FT (NOLOCK) INNER JOIN
dbo.[EMPLOYEE] E ON (E.[tpa_id] = FT.[tpa_id] AND E.[empr_id] = FT.[empr_id] AND E.[empe_key] =

FT.[empe_key])
inner join dbo.[TPA] T ON (E.[tpa_id] = T.[tpa_id]) INNER JOIN
dbo.[EMPLOYER] ER on (E.[tpa_id] = ER.[tpa_id] and E.[empr_id] = ER.[empr_id])
WHERE -- Duplicate records
FT.origin_cde >= 50 -- manual transactions
AND FT.txn_adjud_cde = 1 -- approved transactions
AND FT.txn_cde in ('10')
AND FT.txn_process_cde = @TXN_PROCESS_CDE_VALID -- valid
AND FT.[tpa_id] = @tpa_id
AND FT.[service_start_dte] = @service_start_dte
ANDFT.[etxn_seq_num] = 1
AND ((@acct_type_cde IS NULL) OR (@acct_type_cde IS NOT NULL AND FT.[acct_type_cde] =

@acct_type_cde))
AND (FT.txn_options & @DuplicateFlag = @DuplicateFlag)
AND FT.reimb_key is null -- not reimbused yet
-- Employer Id optional
AND ((@empr_id IS NULL) OR (@empr_id IS NOT NULL AND T.[empr_id] = @empr_id))
-- User has access to employer
AND(@user_type_cde IN (@USER_TYPE_MBI, @USER_TYPE_SYSTEM)
OR (@user_type_cde NOT IN (@USER_TYPE_MBI, @USER_TYPE_SYSTEM)
AND T.[empr_id] IN (SELECT[empr_id]
FROMdbo.[USER_EMPLOYER]
WHERE[tpa_id] = @tpa_id
ANDuser_id_key = @user_id_key)))
AND ((@empe_key IS NULL) OR (@empe_key IS NOT NULL AND FT.empe_key = @empe_key))
-- TPA is not active (All Status Except Perm Inactive)
AND T.[tpa_status_cde] < 4
-- Employer is active (All Status Except Perm Inactive)
AND ER.[empr_status_cde] < 4
ORDER BY FT.txn_dte DESC
--UNION ALL

-- join @TEMP_DUPLICATES table with dbo.[vw_PDB_FLEX_TXN]
-- to find out for each of above 20 records, possible duplicate claims
-- investigate more to make join/union/insert into -- the final goal is this SP should return all 'y' and 'n' data

EFFICIENTLY (NO CURSORS IN SP)


INSERT INTO @TEMP_DUPLICATES
(
tpa_id,
empr_id,
empe_key,
service_start_dte,
service_end_dte,
cardholder_name,
txn_amt_orig,
--approved_amt,
denied_amt,
merchant_name,
MTC,
notes,
is_dup
)
SELECT t.tpa_id,
t.empr_id,
t.empe_key,
t.service_start_dte,
t.service_end_dte,
(e.first_name+ ', '+ e.last_name ) AS cardholder_name, -- TODO: construct name with firstname,

lastname with joining with employee/dep tables
t.txn_amt_orig,
--t.approved_amt,
t.denied_fee,-- This column considered for denied_amt as this column doesnot exists
t.merch_name,
t.MTC,
t.notes ,
is_dup = '0'
FROM dbo.[vw_PDB_FLEX_TXN] T (NOLOCK) INNER JOIN @TEMP_DUPLICATES TP ON
(TP.tpa_id = T.tpa_id
AND TP.empr_id = T.empr_id
AND TP.empe_key = T.empe_key
AND TP.service_start_dte = T.service_start_dte
AND TP.[txn_amt_orig] = T.[txn_amt_orig]
)
INNER JOIN dbo.[EMPLOYEE] E ON E.empr_id = T.empr_id

WHERE (T.txn_options & @DuplicateFlag != @DuplicateFlag)
AND T.[tpa_id] = @tpa_id
AND T.[service_start_dte] = @service_start_dte
AND T.txn_cde in ('10','11','12')
ANDT.[etxn_seq_num] = 1
AND T.txn_process_cde = @TXN_PROCESS_CDE_VALID -- valid



-- NEED TO RETURN @TEMP_DUPLICATES ROWS
RETURN(0)

EXITSP:

IF @total_errors > 0
BEGIN
EXECUTE dbo.usp_ERR_GetUserErrors
END

RETURN (@total_errors)

END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

error:
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'is_dup'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'empr_id'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'empr_id'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 139
Invalid column name 'is_dup'.

krmm

View 7 Replies View Related

Unable To Take Backup

Jun 19, 2007

Hi
I have Database in SQL-Server2000 size is 1.37 GB i am tryn to take backup followin are the problems:-
1. Maintainence Plan for Backup Fails for DB
2. Jobs fails for Backup

--> I goto SQL Server Logs Error message is Operating system error 23(Data error (cyclic redundancy check).)

--> Now i am tryin Backup using command :-
Backup Database 'DB1' To Disk ='Path' followin error occurs:-
"Nonrecoverable I/O error occurred on file"

--> Now i am doing back-up directly from Enterprise Manager following error message occurs same error comes

Whats surprising Jobs, maintainence plan, Backup for other database is working perfectly, i checked HDD doesnt have any bad blocks etc. i have even changed path for Backups but still only for these database it gives problem

With Regards

View 2 Replies View Related

Unable To Remove SQL

Mar 10, 2008

I'm stuck. I'm a noob when it comes to SQL (learning as I go, reading books, etc). I've been trying to setup SQL on a Windows 2003 server, and there is a bit of an issue.

There is already an instance of SQL on the server. Someone before me tried to install SQL, and for some reason removed it. However, the default instance still exists on the machine, and I am unable to install SQL 2005 on it now. Setup keeps throwing back errors. There is nothing listed in the Add/Remove programs to remove the old Default Instance. Is there some way I can completely strip SQL off this machine so I can do a fresh install?

I googled a few articles about using the SQL tools to do a forced remove, but it did not work in this situation.

View 8 Replies View Related

MS SQL 6.5 Unable To Connect.

Jul 23, 2005

Let me start by saying that, yes we know v6.5 is no longer supported byMicrosoft and that moving to SQL2000 might resolve our problem.Actually the migration to SQL2000 is 1 to 2 months out and in the QAphase now. Unfortunately we need to resolve the current 6.5 issue nowas it heavily impacts a major revenue stream for the company with everyoutage we encounter.The Problem:At least once every 24 hours the SQL Server begins disallowing new userconnections. When this happens the 2 CPUs begin to thrash. About 5minutes later the error log begins to print out the following errormessage: "Unable to connect. The maximum number of '500' configured userconnections are already connected. System Administrator can configure toa higher value with sp_configure." No new connections can be made to theserver; however, the existing connections continue to function normally.We never see anywhere near 500 user connections in the system (it tendsto average around 350 connections). If we begin to disconnect users theserver continues reporting that the maximum number of users isconnected. Eventually running queries thru an open connection will hangand we have to resort to a hard reboot of the server as neither SQLServer will not shutdown nor will the operating system.The Server:Compaq Proliant DL380 with dual 863 MHz. processors (x86 Family 6 Model8 Stepping 3 GenuineIntel), 917,020 KB of physical memory, MicrosoftWindows 2000 Server (Version 5.0.2195 Service Pack 4 Build 2195), TotalVirtual Memory 3,138,688 KB, Page File Space 2,221,668 KBSQL Server:Microsoft SQL Server 6.50 - 6.50.479 (Intel X86). Some pertinentconfiguration settings: memory - 244100 (in 2K units), user connections– 500, RA worker threads – 3, max worker threads – 255We found one reference to the above error message in the MicrosoftKnowledge Base and that refers to a condition where the server has 2GBor more of physical memory with 1.5GB assigned to SQL Server. This doesnot pertain to our situation. Have any of you ever encountered thisproblem?I appreciate your insights.*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved