SQL 2005, Build Scripts?

Dec 19, 2006

Am I missing something obvious in the 2005 Visual Studio
portion of SQL Server?

I have a database design, with a bunch of tables, views,
stored procedures, etc, etc. I want to store each object
in a separate file, so I can keep them in Source Safe.

Is there a command that will "rebuild" the database,
issuing the CREATE TABLE, VIEW and PROCEDURE statements
in the "right" order, such that foreign keys, and procedures
that call procedures get built in the right order?

I know that for tables/views, I could put every in a
CREATE SCHEMA, but then everything's in one file.

I've done this the hard way before (isql to get sysdepend
information, pipe through tsort, build the tables that way),
but was hoping for a more integrated solution.


Thanks,


Eric.

View 3 Replies


ADVERTISEMENT

Error On Build Solution, If SSIS Project Is Part Of Build

Mar 22, 2006

Hello,

we have automated build on every night. In our solution is SSIS project, where each package is encrypted per password. We call build process per command line like this..

C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (c:DevelopmentX3\X3.sln /build Release)' in 'c:DevelopmentProjectsDailyBuild

Through build process we get a error:


External Program Failed: C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (return code was 1):

We think a reason is, that on build of SSIS project must be entered a password. You can wonder for what we need that SSIS packages are part of our build. We hope that on build process is also created Deployment Utility, if so set in dtproject.user. Is it so? Is there any way to create Deployment utility on automated build process? Can be a password provided pre command line?

with best regards

Anton Kalcik

View 5 Replies View Related

SQL Server 2005 Build 9.00.3200 CU4

Apr 2, 2008

I would like to install this on my server which is a cluster. The server has 2 instances on it. I only want to install it on the dev instance. I got the executable from Microsoft. There is a hotfix.txt file but that doesn't have any installation information. Could someone please help me to find some documentation so that this will only update our dev instance. If there is documentation, could someone please send it to me?

Thanks.

View 6 Replies View Related

Is There A Build In FTP In MSSQL 2005 That Can Be Invoked With Tsql?

Jan 16, 2008

Hi. I was wondering if there is such thing in MSSQL 2005? Not the one in SSIS.

Any feedback will be greatly appreciated.

Thanks,

Rick..

View 11 Replies View Related

Which Edition And Build Of SQL Server 2005 To Use For Biztalk 2006?

Oct 12, 2007

Hi all -

We are planning to use a 2-node SQL Server 2005 cluster as part of a new Biztalk 2006 project, and I would like some advice regarding SQL Server service packs and editions.

Testing has already been running for some time without problems, but the test environment (a) is not clustered, (b) is using SQL Server 2005 Standard Edition rather than Enterprise and (c) has neither of the SQL Server service packs installed.

As this is a major project for us, my instinct would be to use Enterprise Edition (maximise performance and scalability)
and to apply SP2 (because I thought it was best practice to be up-to-date). I would have liked to do this before we go Live so we don't run the risk of having to change afterwards if we hit a problem.

Understandably, the project guys' perspective is this: testing so far has not been affected by SQL Server bugs, and we should go Live with the environment we have tested in, albeit with the planned 2-node cluster which is seen as a 'must have'.

I have trawled Books Online, Technet and other resources without success, so any thoughts or info on required, recommended or preferred combinations of Biztalk 2006 with SQL Server 2005 editions and service packs in a clustered
environment would be greatly appreciated - thanks!

Michael


View 5 Replies View Related

SQL Server 2005 SP1 Upgrade Results In Build 2040

Aug 3, 2006

I have SQL Server 2005 Standard installed on a Windows XP SP2 PC. I tried to install the SP1 upgrade from http://www.microsoft.com/downloads/details.aspx?familyid=CB6C71EA-D649-47FF-9176-E7CAC58FD4BC&displaylang=en, which is listed as build 2047. I installed the upgrade and each upgraded component reported success, and I rebooted the PC. However, checking the version of my SQL Server as per KB321185 results in version 9.00.2040.00. There are errors at the end of the SQL9_Hotfix_KB913090_sqlrun_sql.msp.log log file as follows :

MSI (s) (54:A8) [15:57:42:059]: Product: Microsoft SQL Server 2005 - Update 'Service Pack 1 for SQL Server Database Services 2005 ENU (KB913090)' installed successfully.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 1728
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Transforming table Error.

MSI (s) (54:A8) [15:57:42:059]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (54:A8) [15:57:42:059]: Product: Microsoft SQL Server 2005 -- Configuration completed successfully.


Attempting to reinstall SP1 resulted in the same errors. I need to fully upgrade to build 2047 so that I can install the cumulative hotfix build 2153. Does anyone have suggestions as to what causes this behavior?

Thanks,
Gary Thorne
HAL Systems

View 8 Replies View Related

Cannot Create Maintenance Plans 2005 Sp2 (build 9.00.3042)

May 21, 2008

I have a new SQL 2005 Standard Instance. Server Collation is Latin_General_CI_AI - which should be the default or Norm. build 9.00.3042

I cannot Create Maintenance Plans. All error messages below. Some of the links point to help which address possible wrong collation - but my Server Collation is Latin_General_CI_AI - which should be the default or Norm.

Has anyone ever seen this before or can anyone offer any suggestions? is there a post sp2 patch to fix this????


Saving maintenance plan failed.

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

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------

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

------------------------------

Invalid column name 'msx_job_id'. (Microsoft SQL Server, Error: 207)

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

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

OK
------------------------------
===================================

Saving maintenance plan failed.

===================================

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlanSubPlan.GetSubPlanJob(ServerConnection userConnection)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlanSubPlan.UpdateAgentJob(ServerConnection localConnObj, MaintenancePlan maintPlan)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlanSubPlan.OnMaintenancePlanSaved(MaintenancePlan maintPlan)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlan.OnSave()
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlan.Save()
at Microsoft.SqlServer.Management.MaintenancePlanWizard.MaintenancePlanWizardForm.PerformActions()

===================================

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

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataReader(String query)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)

===================================

Invalid column name 'msx_job_id'. (.Net SqlClient Data Provider)

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

------------------------------
Server Name: KOCSQLDEV01
Error Number: 207
Severity: 16
State: 1
Line Number: 5


------------------------------
Program Location:

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand)

View 2 Replies View Related

Problems Upgrading From SQL 2005 Build 3175 To 3186

Oct 9, 2007



All the tools upgraded with the exception of the engine. The error that I receive says its a permission issue, though when I check, the administrators group has full rights to the folder. Perhaps I'm missing what the true cause of the error is. Here is the relevent portion of the log. (I can post the full log if needed)

10/02/2007 02:28:23.906 Attempting to pause the 32 bit ngen queue
10/02/2007 02:28:24.178 Attempting to pause the 64 bit ngen queue
10/02/2007 02:28:25.177 Installing product: SQL9
10/02/2007 02:28:25.359 Registry: Opened registry key "SoftwareMicrosoftWindowsCurrentVersionUninstall"
10/02/2007 02:28:25.359 Installing instance: MSSQLSERVER
10/02/2007 02:28:25.427 Installing target: A1-HISTORY
10/02/2007 02:28:25.427 Stopping service: SQLSERVERAGENT
10/02/2007 02:28:31.239 Stopped service: SQLSERVERAGENT
10/02/2007 02:28:31.239 Stopping service: MSSQLServer
10/02/2007 02:28:37.052 Stopped service: MSSQLServer
10/02/2007 02:28:37.052 Installing file: sqlrun_sql.msp
10/02/2007 02:28:37.097 Copy Engine: Creating MSP install log file at: C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB936252_sqlrun_sql.msp.log
10/02/2007 02:28:37.256 Registry: Opened registry key "SoftwarePoliciesMicrosoftWindowsInstaller"
10/02/2007 02:28:37.256 Registry: Cannot read registry key value "Debug"
10/02/2007 02:29:51.704 MSP Error: 29506 SQL Server Setup failed to modify security permissions on file E:MSSQL.1MSSQLData for user tmrobinson. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that exists on the destination drive.
10/02/2007 02:30:20.358 MSP returned 1603: A fatal error occurred during installation.
10/02/2007 02:30:20.380 Registry: Opened registry key "SoftwarePoliciesMicrosoftWindowsInstaller"
10/02/2007 02:30:20.380 Registry: Cannot read registry key value "Debug"
10/02/2007 02:30:21.379 Copy Engine: Error, unable to install MSP file: y:1f1d3efcdddd961d092HotFixSQLFilessqlrun_sql.msp
10/02/2007 02:30:21.379 The following exception occurred: Unable to install Windows Installer MSP file Date: 10/02/2007 02:30:21.379 File: depotsqlvaultstablesetupmainl1setupsqlsesqlsedllcopyengine.cpp Line: 800
10/02/2007 02:30:21.924 Watson: Param1 = Do_sqlFileSDDL
10/02/2007 02:30:21.924 Watson: Param2 = 0x7342
10/02/2007 02:30:21.924 Watson: Param3 = ExceptionInSDDL
10/02/2007 02:30:21.924 Watson: Param4 = 0x7342
10/02/2007 02:30:21.924 Watson: Param5 = sqlcasqlsddlca.cpp@65
10/02/2007 02:30:21.924 Watson: Param6 = Unknown
10/02/2007 02:30:21.924 Watson: Param7 = SQL9
10/02/2007 02:30:21.924 Watson: Param8 = @
10/02/2007 02:30:21.924 Watson: Param9 = x64
10/02/2007 02:30:21.924 Watson: Param10 = 3186
10/02/2007 02:30:21.924 Installed product: SQL9
10/02/2007 02:30:21.924 Hotfix package completed
10/02/2007 02:30:21.924 Attempting to continue the 32 bit ngen queue
10/02/2007 02:30:21.970 Attempting to continue the 64 bit ngen queue

View 1 Replies View Related

How To Do Post-build Events In Reporting Services 2005

Oct 16, 2007



Does anyone know if it is possible to do Post-Build Events in Reporting Services? I am using Visual Studio 2005 Team Edition and creating Reports under the Business Intelligence Projects.

When creating C# projects, when you right click on the solution and go to properties there is a tab for Build Events at which point you can create Pre-build and Post-build events; however I am not finding this option available within a Reports project. Does anyone know if this is possible to do in Reporting Services?

Basically what I am trying to accomplish is, I am having to create multiple template files and there are multiple developers going to be working on this project and I would like to create a batch file of some sort that copies the template files that are created into the IDEPrivateAssembliesProjectItemsReportProject directory each time the project is built.

Thanks for any advice,
Flea

View 2 Replies View Related

Where To Build Client Application For SQL 2005 Standard Edition

Jul 24, 2006

Hi,
I have a database working on SQL Server 2005 Standart Edition and i want to create a client windows form aplication.
My problem is where to do it? Im trying to use MS visual basic 2005 express edition but it doent support SQL Server 2005 Standart Edition, it only supports SQL 2005 express edition.
What should i do ?
And in the visual studio 2005 that comes with the package of SQL Server 2005 standart edition there is no project of a winodws form.
Please help

View 8 Replies View Related

Installing CU4, Build 3200, On SQL Server 2005 Which Is Running On A Cluster

Apr 3, 2008

I have no idea how to apply "fixes" or updates to SQL Server when it is running on a cluster.

We are currently running SQL Server 2005 with SP2. The version would be Microsoft SQL Server 2005 - 9.00.3042.00 (X64) Feb 10 2007 00:59:02 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

I am hoping that someone can tell me of a document that exists, that includes the very basics, on how to do this. I need something that says go to the cluster and do these steps in this order, etc. from start to finish.


Thank you.

View 3 Replies View Related

How To Build A Own Silent Setup Of MS-SQL-Server 2005 Express For Installation On Customers PC ...

Feb 21, 2008

Hi,

I want to build a silent setup/installation of MS-SQL-Server-Express 2005 for installation on customers computers.
I want to integrate it in my own setup/installation routine of my application.
How can I do that?
Where can I get Infos or tutorials? Perhaps here ?

Sorry for my bad english

Regards Tron

View 7 Replies View Related

Cube Processing Hangs, MSSQLServerOLAPService Crashes On 2005 SP2 Build 3054

May 21, 2008

Hi,

*every processing* of a cube with 7 dimensions 5 measure groups (no table has more than 100.000 rows) hangs while trying to process the measure groups. I have to restart the Analysis Service all the time. But even worse every 2nd processing crashes the whole Analysis Services Process.

The only time I could sucessfully deploy a cube was with 1 measure group only.

How can anyone do any serious work with Analysis Services?

The error messages from evenlog are not helpful either.

Thanks,
Tobias



EventType sql90exception, P1 msmdsrv.exe, P2 9.0.3054.0, P3 46048069, P4 msmdsrv.exe, P5 9.0.3054.0, P6 46048069, P7 0, P8 005e9430, P9 00000000, P10 NIL.

The description for Event ID ( 22 ) in Source ( MSSQLServerOLAPService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Internal error: An unexpected exception occured..

View 1 Replies View Related

?? 933097 Cumulative Hotfix Package (build 3152) For SQL Server 2005 Service Pack 2 Is Available

Mar 8, 2007

I've read about this hotfix at http://www.kbalertz.com/Feedback_933097.aspx but I can't find anything on microsoft.com about it. It sounds like a worthwhile hotfix, but I'm wondering about the absence of an announcement on microsoft.com.

Anyone else know about this hotfix?

Thanks!

View 3 Replies View Related

Installation Of SQL Server 2005 Post-SP1 Hotfix 918222 (Build 2153) Fails At Copyengine.cpp Line: 689

Feb 5, 2007

I believe that I mistakenly attempted to apply the Analysis Services component of this update before applying the SQL Server component. The update now fails continuously with the following message:

02/05/2007 17:58:24.990 ================================================================================
02/05/2007 17:58:25.021 Hotfix package launched
02/05/2007 17:58:27.615 Product discovery successfully completed during the install process for MSSQLSERVER
02/05/2007 17:58:27.630 SP Level check successfully completed during the install process for MSSQLSERVER
02/05/2007 17:58:27.646 Product language check successfully completed during the install process for MSSQLSERVER
02/05/2007 17:58:27.661 Product version check successfully completed during the install process for MSSQLSERVER
02/05/2007 17:58:27.677 Command-line instance name check completed during the install process
02/05/2007 17:58:27.693 Baseline build check completed during the install process
02/05/2007 17:58:34.864 Attempting to install instance: MSSQLSERVER
02/05/2007 17:58:34.974 Attempting to install target: CHARLIDEVSRV
02/05/2007 17:58:35.005 Attempting to check for locked files: sqlrun_sql.msp
02/05/2007 17:58:35.052 Attempting to check for locked files: \CHARLIDEVSRVf$44923e05996203228c1608bea1hotfixsqlFilessqlrun_sql.msp
02/05/2007 17:58:35.067 Creating MSP locked file check log at: C:WINDOWSHotfixSQL9LogsSQL9_Hotfix_KB918222_sqlrun_sql.msp.out
02/05/2007 18:01:52.978 MSP returned 1635: This patch package could not be opened. Verify that the patch package exists and is accessible, or contact the application vendor to verify that this is a valid Windows Installer patch package.
02/05/2007 18:01:53.009 Unable to check MSP file: \CHARLIDEVSRVf$44923e05996203228c1608bea1hotfixsqlFilessqlrun_sql.msp
02/05/2007 18:01:53.025 The following exception occurred: Unable to install Windows Installer MSP file Date: 02/05/2007 18:01:53.025 File: depotsqlvaultstablesetupmainl1setupsqlsesqlsedllcopyengine.cpp Line: 689
02/05/2007 18:01:53.212 Failed to install instance: MSSQLSERVER
02/05/2007 18:01:53.259
02/05/2007 18:01:53.259 Product Status Summary:
02/05/2007 18:01:53.290 Product: SQL Server Database Services 2005
02/05/2007 18:01:53.306 MSSQLSERVER - Failure
02/05/2007 18:01:53.321


The update fails although I have cleaned the registry of any reference to it. Another article indicated that the hotfix may delete registry keys required, for instance, to operated SSIS if applied in the wrong order. Here, it appears to be preventing the hotfix from being reapplied. I have ensured that all necessary permissions are available and the services are running in domain user accounts with the necessary rights. I'm the administrator on the machine.

Is there a way to get this hotfix applied without having to completely rip and rebuild my server instance?

View 4 Replies View Related

Problems With Merge Rep After Upgrading From Sql Server 2000 Sp3a To Sql Server 2005 Build 2153

Mar 6, 2007

Hi,

We just upgraded 2 sql servers from sql server 2000 sp3a to sql server 2005 build 2153, and merge rep exists between these 2 servers.

However, after sql server upgrade, we had to reinitialize merge replication and now the merge agent is reporting 2 errors

1)

Error messages:


The Merge Agent failed to upgrade triggers, metadata and stored procedures on the Subscriber to versions compatible with SQL Server 2005. Restart synchronization, and if this failure continues to occur reinitialize the subscription. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199403)
Get help: http://help/MSSQL_REPL-2147199403

Invalid column name 'metadata_select_proc'. (Source: MSSQLServer, Error number: 207)
Get help: http://help/207

Invalid column name 'delete_proc'. (Source: MSSQLServer, Error number: 207)
Get help: http://help/207

2)

Command attempted:


{call sp_MSensure_single_instance (N'Merge Agent Name', 4)}

Error messages:


The merge process could not connect to the Publisher 'Server:database'. Check to ensure that the server is running. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199368)
Get help: http://help/MSSQL_REPL-2147199368

Another merge agent for the subscription(s) is running or the server is working on a previous request by the same agent. (Source: MSSQLServer, Error number: 21036)
Get help: http://help/21036

looking inside the sp_MSensure_single_instance stored procedure, it's trying to obtain an exclusive lock on resource 'Merge Agent Name' but fails and returns -1

this is the stored procedure executed by sp_MSensure_single_instance and @retcode = -1 and thus cannot obtain exclusive lock on resource

EXEC @retcode = sys.sp_getapplock @Resource = 'Merge Agent Name',

@LockMode = 'Exclusive',

@LockOwner = 'Session',

@LockTimeout = 0,

@DbPrincipal = 'MSmerge_PAL_role'

so i think it's failing because for some reason MSmerge_PAL_role database role does not have enough rights to obtain exclusive lock on necessary resources

i've tried many things to fix this, including scripting out and dropping all merge rep, turning off replication db option and reapplying replication create scripts on the server, and even manually deleting the MSmerge_PAL_role database role but still doesn't work

can anyone help?

Thanks

View 9 Replies View Related

What Build Is This?

Jan 12, 2001

Hey folks, I just inherited a machine where select @@version returns this:

Microsoft SQL Server 7.00 - 7.00.710 (Intel X86)

Okay, I know that:

623 is orig sql
699 is sp 1
842 is sp 2
961 is sp 3 -- but what's 710 ?

going to http://search.support.microsoft.com/kb/c.asp?ln=en-us gets me exactly 0 <zero> hits. Is this a hotfix someone's aware of?

Any thoughts/documentation/whatever would be appreciated.

Thanks,

Tom

View 1 Replies View Related

SQL To Build SQL

Nov 14, 2000

I know how to use sql to write a block of sql statements by cutting and pasting the results in to the execution window. Now my question is this...
is there a way to create the sql and execute the results. i.e. Automatically cut and paste the results into the execution window and run it??
Something to munch on if your bored. Ideas appreciated.

View 2 Replies View Related

RS Build

Feb 28, 2008

The common way that we use to delpoy reports in production server is using rsbuild.config file and running the command to execute it. Is this a Microsoft product ? does it have any licensing issue if i need to use this approach in my production environment to deploy the reports?

View 1 Replies View Related

I Need Help To Build This Query.

Jun 10, 2008

Hi,
    I have two tables called Actcodes and a another table called FundBalances...
 
The Act codes have the following format..
 
PlanId int,
ClientId int,
 StartDate datetime,
EndDate datetime,
ClientActCode char(2)
CodeDescription char(15)
so based on what the user has selected i am getting the names of each codes
 
and they have the following Rows.
PlanId         ClientId           Startdate     EndDate  ClientActCode     CodeDescription
111               1                   1/1/2008      3/31/2008     01                    Begininng balance
111               1                   1/1/2008       3/31/2008     02                   Contributions 
111               1                   1/1/2008      3/31/2008     03                   something
111               1                   1/1/2008       3/31/2008     04                   sdkfjdkf
111               1                   1/1/2008      3/31/2008     05                    dfdfd
111               1                   1/1/2008       3/31/2008     06                  dfddfs 
111               1                   1/1/2008      3/31/2008     09                  dfdf
111               1                   1/1/2008       3/31/2008     15                   dfdkfdlfk
 
and my fund balance i have the following rows..
PlanId int
Participantid int
StartDAte datetime,
end date datetime,
FundId int
Loans
Act1 char(2)
TotAct1 money
.
Act20 char(2)
TotAct20 money
and the data is as follows
PlanId   ParticipantId StartDate EndDate fundId Loans Act1 TotAct1 Act2 totact2 ----- Act20 TotAct20
111         1212           1/1/2008  3/31/2008  15   NULL   01    15.15    02    15.48           20    12.4561
111          1212           1/1/2008 3/31/2008   45   0        01        45.12 02    453.123      20          54.00
so on and so so forth
 
tht Act1 matches the ClientActCode in the Act..
So is there a way i can get those column in my select which have actCodes present in the Act code table. for in... in my act code table for this plan i have 01,02,03,04,05,06, 09, 15 clientAct codes
 
so can i get the its respective Acts and Totacts column as  Act1, Act, Act3, Act Act5, Act6 based on the ClientAct codes.
 
Any help will be appreciated..
Thanks
Karen

View 23 Replies View Related

How To Build My SQL Querry.

Nov 12, 2003

Hi.
I know this querry:

"SELECT TOP 10 * FROM MyTable ORDERBY ..."

will give the top 10 rows.

But how can I build a querry that can get the rows from 40-50 (ie).
Thanks.

View 2 Replies View Related

How To Build This Query

Mar 8, 2004

Hi,
Please Help me to build this query.

I have got a "User" Table
---------------------
UserID UserName
---------------------

1 Tuffy


Another Table "Groups" Table
---------------------
GroupID GroupName
---------------------
1 Manager
2 Employee
3 Sales

I have got a "UserGroup" Table HOLDING ID'S as Foreign key.
The data in the TABLE is like this

---------------------
UserID GroupID
---------------------
1 1(Manager from "Group" Table
1 2(Employee)
1 3(Sales)
2 2(Employee)
2 3(Sales)
---------------------

Now when a user logged in The Groups have to be returned as a string that contains pipe separated Group names
for example "Manager|Employee|Sales|"

So if User 1 log in I need something like that
UserID (1)-->"Manager|Employee|Sales|"

Please help me how to write this query.

Regards

View 5 Replies View Related

Trying To Build CASE

Mar 22, 2004

I'm trying to add a CASE to my statement, I keep getting a syntax error. Can anyone see the issue? Should this CASE work?

Thanks for your thoughts,

Select tmp.Alternate_Name,dbo.tblClient.Salutation
CASE
WHEN (tmp.Alternate_Name > '') Then tmp.Alternate_Name As Card_Name
Else dbo.tblClient.Salutation AS Card_Name END
From dbo.tblClient INNER JOIN dbo.tblCards tmp ON dbo.tblClient.ClientID = tmp.ClientID

View 1 Replies View Related

Need Help To Build A Select

Sep 29, 2004

Hi there, I have 3 columns that contain the same kind of information and I would like to do a select that would return all the distinct records of all 3 colums. Any help woulb be appreciated.
Thanks

View 4 Replies View Related

Need Help To Build Querry

Jan 21, 2005

I have two tables linked with the colunm name systemId and I need to get all the systems responding to the condition (t1.software & 0000000001) = 1 and if they have any contacts I would like to see them.
Here is what I have for the moment however my querry do not return the system info if no contact exist and that is wrong.

select customers.customerId,customers.systemId,customers.country
from customers,contacts
where (customers.software & 0000000001) = 1
and customers.SystemId = contacts.SystemId
order by customerid

Systems
-SystemId
-CustomerId
-Name
...

Contacts
-ContactId
-SystemId
-Name
-Tel
...

View 1 Replies View Related

Please Help Me About Build New Table

Dec 12, 2005

please help me
i need for example
when my user clicke in the button a new table build in my sql database
please help me
 

View 1 Replies View Related

Final Build?

Nov 16, 1998

Anyone know the final build # for the RTM version?

Thanks

View 2 Replies View Related

VERSION / Build # ??

Feb 23, 1999

I swear I saw a stored procedure that would tell me what version service pack and what build my sql servers are...
Does anybody know how to find out? I think its a transact query...
Also, I think I saw a stored procedure that would associate that cryptic string of numbers into text; ex: "SQL 6.5, Service Pack 5"

View 5 Replies View Related

Build Into One Procedure @@@@@

Jun 4, 2002

l would like to intergrate the the two procedures listed below into one procedure or function.
l'm doing it in two steps.This report will have each loan listed and a final line summed on each of the amounts?
enddate and startdate being my parameters and print the results to screen.And l'm failing to do that thats why its in two steps.Hope this makes it clear enough.



-- Exec New '2001-04-01 00:00:00.000','2002-05-29 23:59:59.000'
-- Exec New1 '2001-04-01 00:00:00.000','2002-05-29 23:59:59.000'


Alter procedure new (@startdate datetime,@enddate datetime)
as
begin

SELECT Distinct
Loan_no AS Loan_no,
Date_Issued AS Date_Issued,
Store AS Store,
Product AS Product,
Capital_Amount AS Capital_Amount,
Interest_Amount AS Interest_Amount,
Total_Amount AS Total_Amount,
Insurance_amount As Insurance_Amount,
Admin_Fee AS Admin_Fee,
User_Issued AS User_Issued,
LoanBook AS Company,
Status
FROM Loan
Where Date_Issued BETWEEN '2001-04-01 00:00:00.000' And '2002-05-29 23:59:59.000'
End

Alter procedure new1(@startdate datetime,@enddate datetime)
As
Begin

SELECT
Sum(Capital_Amount) AS Capital_Amount,
Sum(Interest_Amount) AS Interest_Amount,
Sum(Total_Amount) AS Total_Amount,
Sum(Insurance_amount) As Insurance_Amount,
Sum(Admin_Fee) AS Admin_Fee
FROM Loan
Where Date_Issued BETWEEN '2001-04-01 00:00:00.000' And '2002-05-29 23:59:59.000'

End

View 1 Replies View Related

Build A Calender

Jun 25, 2002

Whats the quickest way of building a calender split by day,month,year,day name of week. l want populate the table with that information.

View 1 Replies View Related

Better Way To Build A Report?

Nov 2, 2006

The Accounting Department needed some reports, and this was back when I was first learning SQL, so I wrote a batch file that used osql to run a procedure. This procedure created a second batch file with several hundred lines to run another stored procedure and output to .rpt files complete with page breaks.

Now I'm revisiting this process having learned alot since then, and would like some input on how to handle this better. The batch file works, but I've never been one of those "if it's not broke" type of people. I'm one of those "If it's not broke, give me 5 minutes and it will be" kind of people

I'm specifically interested in something to replace this CURSOR that builds the batch file:

Code:


DECLARE @Dealer Varchar(20)
DECLARE Dealer_Cursor CURSOR
FOR SELECT Dealer_id FROM Dealer WHERE (Dealer_id != '-1') AND (isnull(Category,'-1') != 'NOBILLING')

OPEN Dealer_Cursor
FETCH NEXT FROM Dealer_Cursor INTO @Dealer
WHILE @@Fetch_Status = 0
BEGIN

/* @Folder is passed as a fully qualified path to the billing folder */
/* Logging and Command Window Notification, to be placed into DealerBilling.bat */

PRINT 'ECHO Creating report for Dealer: ' + @Dealer + ' ...'
PRINT 'ECHO Creating report for Dealer: ' + @Dealer + ' ... >> "' + Substring(@Folder,1,3) + 'Reportlog.txt"'

PRINT '"osql" -SMYSERVER -UMYUSER -PMYPASS -w 103 -Q "EXEC MYSERVER.MYDB.dbo.Proc_Dealer_Listing '''
+ @Dealer + '''" -o "' + @Folder + '' + @Dealer + '.rpt"'


FETCH NEXT FROM Dealer_Cursor INTO @Dealer
END

PRINT ' '

CLOSE Dealer_Cursor
DEALLOCATE Dealer_Cursor

View 1 Replies View Related

Query Build Help

Apr 24, 2007

I have a table with 2 columns:
Col1 Col2
stat1,stat2 AV,AD
stat3 TD
I need to build a query like this:
SELECT *
FROM table3
WHERE stat1=AV and stat2=AD and stat3=TD
How do I do this?

View 6 Replies View Related

Build WHERE Clause

Apr 8, 2008

I have a stored procedure which expects one parameter @City

Let’s say @City holds pipe delimited value: "New York|London|Paris"

In my stored procedure I need to replace all pipes with OR operator? In other words my select statement needs to look like this :

SELECT * FROM City WHERE CityName= 'New York' OR CityName= 'London' OR CityName= 'Paris'

Thank you

View 7 Replies View Related







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