Arcserve Backup Agent For SQL Server, Trouble?

Aug 7, 1998

This seems to happen just after our backups run. the result is that the SQL Server
Enterprise Manager can be brought up the next day but nothing can be accessed or
inquired of. The service is still running, the server is still up and rebooting the server
resolves the problem.

98/08/06 20:32:31.68 kernel dpdb_asyncread: mirror: Operating system error 6
(The handle is invalid.) encountered

Is anybody else using Arcserve Backup Agent for SQL Server for Windows NT, RAID 5?
Have you seen this? I`ve been to MS home page and on technet. No mention of this
problem. Next stop is Arcserve home page, if they have one. I have read the error logs
and this is the second time this has happened this week. Both times since we added
Arcserve to manage our MS SQL Server Database backups.

Best Regards and Thanks for your time.

View 1 Replies


ADVERTISEMENT

How SQL SERVER 2005 Backup && ArcServe Backup Coexist ??

Apr 15, 2008

I have only one tape drive.
My server is using the SQL server 2005 backup tool and arcserve backup tool to backup different files .

Everytime I need to disable and enable the tape device driver (in device manager /windows) before I can use SQL server 2005 backup tool.

Everytime I need to disable and enable the tape device driver (in device manager /windows) before I can use arcserve backup tool.

It seems that the tape device resource is held by softwares even the tape drive is not in use.

What should I do to make the tape drive shared by different softwares?


Regards,
Manuel

View 2 Replies View Related

Backup Agents ( Arcserve / Seagate)

Jan 21, 1999

Any thoughts or experiences (good or bad) on using the SQL agents from Arcserve or BackupExec for backups as opposed to standard dumps to disk?

I have always used dumps and taken the position that these tools work well, reliably and do not depend on another device ( tape device) for backups. Also they should be quicker and not cause any problem with table / log concurrency or delays in updates while the backup takes place.

Also, does anyone know how these products actualy maintain concurrency? Has anyone ever used one of these backups as a recovery?

Thanks in advance.

View 1 Replies View Related

Trouble With SQL Server Agent

Mar 27, 2008



Greetings
We're having trouble getting the Agent started. The service is set to login as NT AUTHORITY/System. In an effort to attempt to diagnose the problem we changed the service (using Service Control Manager) to login as a user with Administrator rights on the server and we got the same error, except for that user.

[298] SQLServer Error: 18456 Login failed for user NT AUTHORITYSYSTEM [SQL STATE 28000]
[298] SQL Server Error: 4060 Cannot open database "EP_SessionState" requested by the login. The login failed [SQL STATE 42000]

I'm sure this is a common problem with an easy solution however I can not find out much about EP_SessionState through Google and was hoping someone could help.

Thanks

View 4 Replies View Related

SQL Agent Trouble.

Mar 16, 2006

I have spent all day reading microsoft material and reading through this site to figure out what is wrong with my schedule job without success. I have come to the point where I can't take it no more. Would someone pleaseee help out a sister?

This is the situation: I created a very simple package on my server A. This package pull data from server B and load into server C:

B====> C

I deployed and copy and install the package successfully to the target server c. When

Now, I can run the package from either MSDB and file system storage.

My problem is when I schedule this package. It failed with the log below.

All my server are on the same domain and I have a domain account. When I schedule and run the job with my domain account, I get the following error: I have administrative rights in all the servers.



Job Name DW_DataImport
Step Name (Job outcome)
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
The job failed. Unable to determine if the owner (Weblogeomon) of job Dw_DataImport has server access (reason: Could not obtain information about Windows NT group/user 'Weblogeomon', error code 0x5. [SQLSTATE 42000] (Error 15404) The statement has been terminated. [SQLSTATE 01000] (Error 3621)).



When I change it to sa, I get the following:

Date 3/16/2006 2:25:05 PM
Log Job History (Dw_DataImport)

Step ID 0
Server DW_Server3
Job Name Dw_DataImport
Step Name (Job outcome)
Duration 00:01:55
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
The job failed. The Job was invoked by User sa. The last step to run was step 1 (Dw_DataImport).

Worst yet, I created

CREATE CREDENTIAL [SSISCredential] WITH IDENTITY = 'Weblogeomon',

secret = '<password>'

Sp_add_proxy @proxy_name='SSIS_Proxy', @credential_name='SSISCredential'

Sp_grant_login_to_proxy @login_name='DwAdmin', @proxy_name='SSIS_Proxy'

Sp_grant_proxy_to_subsystem @proxy_name='SSIS_Proxy', @subsystem_name='SSIS'



When I schedule and run the job with DwAdmin, It still fails.

What am I doing wrong? and whay do I need to do?

Your contribution will be appreciated.



Thanks

Omon

View 9 Replies View Related

SQL Server Agent - Backup Steps

Apr 7, 2008

Can anyone describe step by step how we specify a backup plan for our database? For example to backup our db and execute every night.

Thanks

View 4 Replies View Related

Trouble Getting Snapshot Agent To Initialize Publication

Nov 16, 2006

I have been trying to set up transactional replication between an OLTP SQL Server 2005 Standard edition server and a BI SQL Server 2005 Enterprise edition server. I am using a pull subscription. I was able to establish the replication from the developement server to the BI server however when I tried setting up the replication between the production environment and the BI server, using the same configuration settings, I ran into a problem. The production server had been renamed after it was initially set up. I used the sp_dropserver and sp_addserver to solve this issue and was able to run the replication wizard. However once the wizard finishes the snapshot agent doesn't initialize the publication. When I look at the replication monitor it has a status of "never run". I try to run it manually and it appears to run for a few seconds then stops and still has the status of "never run". I don't get any error messages and can't find anything in the log. I am wondering if this is related to the server rename? I am hoping to find a soultion that doesn't involve uninstalling SQL Server and reinstalling since this is a production environment.

Thanks.

View 3 Replies View Related

Trouble Running SSIS Package From SQL Agent Job

Mar 6, 2008

Hello-

I'm trying to deploy a SSIS package and am having issues getting it to execute from a SQL Agent job. I've read this article http://support.microsoft.com/?kbid=918760 over and over and although it's helpful I must still be missing something.

The SSIS package uses a configuration file for connection string information and the ProtectionLevel is set to DontSaveSensitive. I'm using a proxy account with the appropriate permissions. I can execute the package from SQL Management Studio and from dtexec.exe just fine. I even copied the command line out of the job and used that to execute it with dtexec.exe and it worked.

I'm not sure what to try next. It's like it's not even getting to the SSIS package. I have logging turned on in the package and I"m not getting back any errors from it. Any ideas? One thing that I think is strange is that the job is running on an instance of SQL but Integration Services doesn't seem to support instances. Could that be the issue?

I don't know what else to try at this point...any advice is greatly appreciated!

View 3 Replies View Related

Agent Jobs: Trouble Sending Notifications/Alerts

Sep 19, 2007

This is on sql server 2005: I created an agent job and I want to be able to notify people by email when it completes and when it fails. I first wanted to test the notification for when it completes. I created an operator and entered the E-mail name. In the job properties, I selected this operator in the Notifications page.

The job runs an ETL process. When I run the job, after it completes,
the email is not sent. This seems straight-forward. The email address is valid, I tested the email address and it does get sent when I do it from Outlook 2007.

Anyone have this problem?

View 7 Replies View Related

How To Schedule A Database Backup In SQL Server Agent Jobs?

Jan 7, 2008

I want to schedule a database backup using SQL Server Agent Jobs how can i do this?

View 1 Replies View Related

Trouble With Encryption Key - Have Had To Restore Backup Several Times

Feb 7, 2008

Hello all - I have an installation of SQL Server 2K5 Express with Reporting Services on an XP Pro SP2 PC. It has been running for about 6 months now. Within the 1st month, I had to restore the Encryption Key (the Report Manager failed to function properly).

All had been well until last week, when I had to restore the encryption key (for the same reason). After restoring the encryption key, the Report Manager immediately started to work again.

It happened again today, so I had to once again restore the encryption key. Can anyone offer any ideas as to why/how this would happen?

Thanks!

View 3 Replies View Related

ArcServe Versus BackupExec

Jun 21, 1999

We currently use CA ArcServe (ArcServe 6.5 Enterprise and Single Server Editions) to backup our Windows NT files and MS-SQL Server databases. We have experienced significant reliability issues with ArcServe. Many times we have found ourselves rebuilding a corrupt ArcServe Job (ArcServe’s backup schedule) database. One of our NT server occasionally NT bug checks when ArcServe is performing backups. Occasionally ArcServe Jobs incorrectly reschedule themselves. Sometimes the Jobs do not complete but stay executing, not performing any work, and to cancel them may require a lot of effort. The ArcServe job DB repair utility generally does not work. The user interface is lacking. For example, the job scheduling options are very limited. CA tech support for this product has been poor. Because we have issues with ArcServe stability we are now evaluating Veritas (formally Seagate) Backup Exec for NT. What are other people’s experiences with these 2 products?

View 1 Replies View Related

ArcServe Backups Now Show In SQL Restore Window --not Good

Feb 12, 2003

I'm not sure when it started, but...

It seems that very recently, the backups made during a nightly ArcServe tape backup procedure are showing up in the restore window on our SQL server. We don't want that! The application group makes it's own backup's to disk, and we want to see only them in the restore window.
(The tape ackup is a redudnant process, to be used if one of our on-hand disk backups are bad or non-existent, or if the DB needs to be recovered from an older date.)

What made the ArcServe files show up? How can we stop SQL server from thinking tyhat they are part of the backup set we are conccerned with?


Thanks.
MichaelGG

View 1 Replies View Related

SQL Agent Backup Failed. Help!!!

Jun 10, 2004

Hi All,

I got SQL agent backup failed problem which took me 2 days , but still couldn't figure out, so tired. Help please!!!

2 days ago,the database was using my domain account to logon both SQL server and SQL agent, the backup jobs worked good. Since I changed db to another domain account which has same permission as mine at both SQL server box and database, but almost all jobs got failed except "check integrity", and the error is "The job failed. The Job was invoked by User rose. The last step to run was step 1 (Step 1).". I checked the log files and backup report, could't get any clues, and I switch domain account back to mines, it works good . But my boss required me using another domain account , what should I do? HELP!!!

View 6 Replies View Related

Problems With Backup Exec 7.0 SQL Agent?

Jan 4, 2000

We've been experiencing some problems on some of our databases ever since we've updated our servers to SP5. Backup exec seems to hang up after reaching a small number of bytes and then goes no further. I've installed the new MDACS drivers but it hasn't solved the problem.

Any ideas would be greatly apreciated!

Thank you,

View 1 Replies View Related

Getting The Backup Exec Sql Agent To Work

Mar 22, 2004

i know this topic has been covered and i've searched but i can't find the answer.

-SQL server is a diffrent server than my backup server
-i've installed the sql agent option on the backup exec server
-i've installed the client network utility on the remote server

the backup server doesn't see the SQL server databases. any thoughts

could it be a security issue?

thanks!

View 11 Replies View Related

Execute Sql Server Agent Job Task - Job Immediately Returns Success... However Agent Job Is Still Running???

Nov 30, 2006

when I run a package from a command window using dtexec, the job immediately says success.
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 3:37:41 PM
Finished: 3:37:43 PM
Elapsed: 2.719 seconds



However the Job is still in th agent and the status is executing. The implications of this are not good. Is this how the sql server agent job task is supposed to work by design.



Thanks,

Larry

View 1 Replies View Related

Backup Agent For Msde Sql Version 2005

Jan 15, 2007

please help me, i need to know if i need to purchase a sql agent for veritas backup exec. i am using the sql msde version only, not the full scale version. any help would be great.

View 4 Replies View Related

SQL Backup Agent Service Account Permissions

Dec 11, 2007



Hi,

If we were to assign permissions to a backup agent such as Backup Exec to backup the databases on the SQL server, what role would give the least amount but sufficient permissions to perform the backup? I know domain admin would make the agent a local admin and therefore allow it to back up the database but is there a role available to allow backup only?

Please note that I'm referring to a domain account used by Backup Exec to directly backup the databases rather than sql server agent.

Thanks.

View 2 Replies View Related

Backup Database Aborts Job In The Agent, But Not When In A Query Window

Sep 17, 2007



Does anyone know why a backup database statement aborts a job in a stored procedure so that you can't handle the error with @@error, but when you run the same stored procedure in a query window the error handling does get run?

The snippet of code looks like this:


SET XACT_ABORT OFF

SET ANSI_NULLS OFF

set ansi_warnings off

set arithabort on

declare @backup_status int

declare @cmd varchar(1024)



SET NOCOUNT ON

print 'Options value: ' + convert(varchar, @@options)



set @backup_status = 0

if (@backup_mode = 'F')

begin


BACKUP DATABASE

@DB TO DISK = @BackupFile

with

NAME = @Name,

DESCRIPTION = @Description,

MEDIANAME = @MediaName,

MEDIADESCRIPTION = @Description,

STATS = 10,

init, nounload, noskip






if @@error != 0

begin


set @backup_status = 1


print '**************** Backup of ' + @DB + ' Failed'


end end

When this is run in a query window, the print statement at the bottom does get executed, but when run as a step in a sql agent job it does not.

Thanks.

View 1 Replies View Related

SQL Server Agent Could Not Access Replication Agent

Feb 19, 2007

We just moved source server to newer, bigger box ... Windows 2003 and Active Directory ... Snapshot agent worked but distribution failed ... Same login as on older machine, login is sysadm, used DCOMCNFG to allow ability to launch process ... What are we missing?

View 4 Replies View Related

Trouble - First Time With IIS And SQL Server

Nov 28, 2007

 Hey - I'm having a bit of trouble getting this website to run off of my local host.  I'm running IIS with SQL Server Express.  Here's the connection info from the Web.config file in the website...     <sessionState            mode="InProc"            stateConnectionString="tcpip=127.0.0.1:42424"            sqlConnectionString="data source=127.0.0.1;user id=sa;password=asdf"            cookieless="false"            timeout="20"    /> ...and here's the error I'm getting...An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Stack Trace: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105System.Data.SqlClient.SqlConnection.Open() +111kpl_testweb.Eventcal.bind_ddlocation() in E:WebsR2G2007controlsEventcal.ascx.vb:131kpl_testweb.Eventcal.Page_Load(Object sender, EventArgs e) in E:WebsR2G2007controlsEventcal.ascx.vb:94System.Web.UI.Control.OnLoad(EventArgs e) +98System.Web.UI.Control.LoadRecursive() +71System.Web.UI.Control.LoadRecursive() +154System.Web.UI.Control.LoadRecursive() +154System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4310any tips for me?  I'm not even sure where to start here... 

View 1 Replies View Related

Trouble With SQL Server 2005

Feb 5, 2006

I downloaded a sample blog sample from Scot Mitchel and wanted to try it out. I attached the .mdf file to SQL Server 2005 but noticed that, when I create users they don't come into the database that I attached, though all the necessary aspnet_ tables are in there but in the dedicated table I didn't see any new user. My dedicated database (LocalSqlServer) is in another database. I have the connectionstring made up in the machine.config file in the LocalSqlServer name.So I thought that the web.config does override the settings in the machine.config I could easily place this in my web.config:<remove name="LocalSqlServer"/>    <add name="LocalSqlServer" connectionString="Data Source=TESTINGDBSERVER;Initial Catalog=ScotBlog;Integrated Security=True" providerName="System.Data.SqlClient"/>But that too doesn't do the trick. Does anyone have an anwser on what's going wrong here? And especially how I can solve this...

View 3 Replies View Related

Trouble Installing SQL Server 6.5

Sep 15, 1998

I am trying to install SQL server 6.5 for my SMS server. The installation stops with the message "could not connect to SQL server". There was evaluation version of SQL server 6.5 previously in the same server. I doubt that it was completely removed as when I try the upgrade option instead of install option, I get a message " early beta version of SQL server 6.5 detected". I am unable to use the deinstall option in the setup as it is dimmed. How do I completely remove all the files and registry entries so that I can do a fresh install?

thanks,

Goutham

View 1 Replies View Related

Trouble Installing Sql Server

Feb 26, 2004

Hello,

I have run sql server 2000 and analysis manager on my laptop for a few months with no probs. On Monday I tried to connect to my computer server from sql server ent manager and it said "no datasource found." and something else about MS ODBC drivers being invalid. Analysis services still worked fine. I tired to connect and add servers and it just would not recognise anything so became software I could not use at all. I then uninstalled all sql server products on my computer. I thought a fresh reinstall would do the job. However now when I try to install sql server I get an error in the installation. It says that it cannot connect to the datasource and installation fails. It tells me to look in a sqlstp log and the bottom of this log is below

15:50:25 Begin Action: DialogShowSdUninstall
15:50:28 ShowDlgUninstall returned : 1
15:50:28 End Action DialogShowSdUninstall
15:50:28 Dialog 0x80000000 returned: 1
15:50:28 End Action ShowDialogsHlpr
15:50:28 ShowDialogsGetDialog returned: nCurrent=0x0,index=0
15:50:28 End Action ShowDialogs
15:50:29 Action CleanUpInstall:
15:50:29 StatsGenerate returned: 2
15:50:29 StatsGenerate (0xc0200805,0x2,0xf000000,0x400,1033,303,0x2,0x1,0 ,0,0
15:50:29 StatsGenerate -1,rj)
15:50:29 Installation Failed.

I havent shown the rest of the log because there is a lot of it. If needed I can copy in the rest.

The rest of the installation up to this point seems fine. HOwever it doesnt install the unistall files so I cannot uninstall SQL Server now. There is 105 MB of the program on my computer which I can only delete although I havent done this yet.

Why wont sql server let me install? It is a really annoying problem because it worked fine last Friday and then on Monday it went wrong and I cannot remember doing anything to make this happen. All MS updates are up-to-date. Any help is greatly appreciated

Thanks
Richard

View 1 Replies View Related

Trouble Using The CONTAINS() Function In Sql Server

Jul 20, 2005

I am having trouble using the CONTAINS function in sqlserver(enterprise manager). I am typing the following:Select *FROM mytableWHERE CONTAINS(myfield,'mystring')This returns the error:Query Designer encountered a MS Design Tools error:ODBC error:[Microsoft][ODBC SQL Server Driver]'CONTAINS' is not arecognizedfunction name.[Microsoft][ODBC SQL Server Driver][SQLServer]Statement(s) couldnot be prepared.According to the T-SQL reference on msdn this is a supported function?Am I typing something incorrectly? If this is not supported, isthere an equivalent to this function? In my field I have some commadelimited values ie 'apple,orange'. So I need to be able to discernwhich records contain orange. The LIKE keyword doesn't seem to workfor this scenario. Any help would be greatly appreciated.

View 3 Replies View Related

Trouble Installing SQL Server Help I Need It!

Dec 1, 2006

http://i69.photobucket.com/albums/i59/craig20102010/problems/SQLerror.jpg
http://i69.photobucket.com/albums/i59/craig20102010/problems/SQLerror2.jpg

Above are the errors that i get when im tryin to install SQL 2005 i think its the DATA base side of it i managed to install the Configuration tools and things just cant install the Data base side where u can actually do something with it.

View 4 Replies View Related

SQL Server 2008 :: Backup Running Long And Backup Threads Show Suspended

Feb 18, 2015

SQL Server 2008 r2 - 6 GB memory...I attempted a backup on a 500GB database but it was taking way too long. I checked the resources on the box and saw the CPU at 100%. I checked the SQL Server activity log and saw a hung query (user was not even logged on) that had multiple threads so I killed it and now the CPU utilization is back to normal.

Trouble is, now all of the threads in the activity monitor for the backup show 'suspended' and the backup appears to be not doing anything.

View 3 Replies View Related

SQL Server Admin 2014 :: Restore DB With Full Backup And Transactional Log Backup

Aug 3, 2015

Need to restore database,here's the scenario:

Data got deleted on Friday evening, need to have database restored to FRiday afternoon and also some data has been entered on Monday, which needs to be there.

View 8 Replies View Related

Can Windows 2003 Server Backup Utility Be Used To Backup A SQL 2000 Dbase

Dec 28, 2007

Windows 2003 backup utility uses the shadow copy option that allows it to copy open files.
Therefore, can I use this utility to backup the .mdf and .ldf files for my SQL 2000 database?
I can then attach the .mdf files if I need to restore the database to another server.
Can anyone tell me if this is safe? I've tried it and it worked but I'm worried there maybe some lurking danger in using this approach.

View 4 Replies View Related

SQL Server 2008 :: Count Number Of Backup Files Deleted From A Default Backup Location

Mar 13, 2015

I've written a custom script to delete backup files from location. But unable to modify now to count the number of files are deleted. How to modify the script...

/* Script to delete older than N days backup from a specific directory */

USE [db_admin]
GO
IF OBJECT_ID('usp_DeleteBackup', 'P') IS NOT NULL
DROP PROC usp_DeleteBackup
GO

[Code] .....

View 2 Replies View Related

Having Trouble Getting SP From Sql Server 2005 To Work In SQL Server 2000

Sep 18, 2006

I am getting an error saying incorrect syntax near fIt works in SQL Server 2005, but I cannot get it to work in SQL Server 2000  The error appears to be in the section that I marked in Bold. CREATE PROCEDURE [dbo].[pe_getReport]  -- Add the parameters for the stored procedure here    @BranchID INT,    @InvestorID INT,    @Status INT,    @QCAssigned INT,    @LoanOfficer nvarChar(40),    @FromCloseDate DateTime,    @ToCloseDate DateTime,    @OrderBy nvarChar(50)ASDECLARE         @l_Sql NVarChar(4000),        @l_OrderBy NVarChar(500),        @l_OrderCol NVarChar(150),        @l_CountSql NVarChar(4000),        @l_Where NVarChar(4000),        @l_SortDir nvarChar(4)BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements.   SET NOCOUNT ON;    SET @l_Where = N' Where 1=1'    IF (@BranchID IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.BranchID=' + CAST(@BranchID As NVarChar)    IF (@Status IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.Status=' + CAST(@Status As NVarChar)    IF (@InvestorID IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.InvestorID=' + CAST(@InvestorID As NVarChar)    IF (@QCAssigned IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.QCAssigned=' + CAST(@QCAssigned As NVarChar)    IF (@LoanOfficer IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.LoanOfficer LIKE ''' + @LoanOfficer + '%'''    IF (@FromCloseDate IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.ClosingDate>=''' + CAST(@FromCloseDate AS NVarChar) + ''''    IF (@ToCloseDate IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.ClosingDate<=''' + CAST(@ToCloseDate AS NVarChar) + ''''    IF @OrderBy IS NULL      SET @OrderBy = 'DateEntered DESC'   SET @l_SortDir = SUBSTRING(@OrderBy, CHARINDEX(' ', @OrderBy) + 1, LEN(@OrderBy))   SET @l_OrderCol = SUBSTRING(@OrderBy, 1, NULLIF(CHARINDEX(' ', @OrderBy) - 1, -1))  IF @l_OrderCol = 'InvestorName'     SET @l_OrderBy = 'i.InvestorName ' + @l_SortDir  ELSE IF  @l_OrderCol = 'BName'     SET @l_OrderBy = 'b.BName ' + @l_SortDir  ELSE IF  @l_OrderCol = 'StatusDesc'     SET @l_OrderBy = 's.StatusDesc ' + @l_SortDir  ELSE IF  @l_OrderCol = 'QCAssigned'     SET @l_OrderBy = 'q.LoginName ' + @l_SortDir  ELSE SET @l_OrderBy = 'f.' + @l_OrderCol + ' ' + @l_SortDir  SET @l_CountSql = 'SELECT f.FundedID As FundedID FROM FundedInfo AS f LEFT OUTER JOIN                     Investors AS i ON f.InvestorID = i.InvestorID LEFT OUTER JOIN                     Branches AS b ON f.BranchID = b.BranchID LEFT OUTER JOIN                     Status AS s ON f.Status = s.StatusID LEFT OUTER JOIN                     QCLogins AS q f.QCAssigned = q.LoginID '                     + @l_Where + ' ORDER BY ' + @l_OrderBy    CREATE TABLE #RsltTable (ID int IDENTITY PRIMARY KEY, FundedID int)  INSERT INTO #RsltTable(FundedID)  EXECUTE (@l_CountSql)SELECT f.DateEntered As DateEntered, f.LastName As LastName, f.LoanNumber As LoanNumber,       f.LoanOfficer As LoanOfficer, f.ClosingDate As ClosingDate,       i.InvestorName As InvestorName, b.BName As BName, s.StatusDesc As StatusDesc,       q.LoginName As LoginNameFROM       FundedInfo AS f LEFT OUTER JOIN       Investors AS i ON f.InvestorID = i.InvestorID LEFT OUTER JOIN       Branches AS b ON f.BranchID = b.BranchID LEFT OUTER JOIN       Status AS s ON f.Status = s.StatusID LEFT OUTER JOIN       QCLogins As q ON f.QCAssigned = q.LoginID WHERE FundedID IN(SELECT FundedID FROM #rsltTable) ORDER BY       CASE @OrderBy WHEN 'DateEntered ASC' THEN f.DateEntered END ASC,       CASE @OrderBy WHEN 'DateEntered DESC' THEN f.DateEntered END DESC,       CASE @OrderBy WHEN 'LastName ASC' THEN f.LastName END ASC,       CASE @OrderBy WHEN 'LastName DESC' THEN f.LastName END DESC,       CASE @OrderBy WHEN 'LoanNumber ASC' THEN f.LoanNumber END ASC,       CASE @OrderBy WHEN 'LoanNumber DESC' THEN f.LoanNumber END DESC,       CASE @OrderBy WHEN 'LoanOfficer ASC' THEN f.LoanOfficer END ASC,       CASE @OrderBy WHEN 'LoanOfficer DESC' THEN f.LoanOfficer END DESC,       CASE @OrderBy WHEN 'ClosingDate ASC' THEN f.ClosingDate END ASC,       CASE @OrderBy WHEN 'ClosingDate DESC' THEN f.ClosingDate END DESC,       CASE @OrderBy WHEN 'InvestorName ASC' THEN i.InvestorName END ASC,       CASE @OrderBy WHEN 'InvestorName DESC' THEN i.InvestorName END DESC,       CASE @OrderBy WHEN 'BName ASC' THEN b.BName END ASC,       CASE @OrderBy WHEN 'BName DESC' THEN b.BName END DESC,       CASE @OrderBy WHEN 'StatusDesc ASC' THEN s.StatusDesc END ASC,       CASE @OrderBy WHEN 'StatusDesc DESC' THEN s.StatusDesc END DESC,       CASE @OrderBy WHEN 'LoginName ASC' THEN q.LoginName END ASC,       CASE @OrderBy WHEN 'LoginName DESC' THEN q.LoginName END DESCENDGO

View 2 Replies View Related

Create/Register A Server/ Server Group -- Trouble.

Feb 23, 2002

Hi,

I am really new to SQL Server. I have trying to create/register a server. I came to know that I need to go to Query Analayser and then register a Server. Then in Enterprise Manager I need to register a Group. I did everything.

But...

Here is the error.

Unable to connect server.
Server: Msg 17, Level 16, State 1

[Microsoft] [ODBC SQL Server Driver] [Shared Memory]

SQL Server does not exit or access denied.

I really appreciate if u can give me steps. Thanks, Padma.

View 3 Replies View Related







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