Changing Linked Server Names Between Environments

May 1, 2007

If I have stored procedures that reference linked servers, is there any way to avoid changing the procedures when moving between environments (dev, qa, prod)?

Do i resort to dynamic sql? Use case statements to switch between environments?

Any experience or advice is appreciated.

View 1 Replies


ADVERTISEMENT

Dynamically Changing SQL ConnectionString For Live/test Environments

Sep 11, 2007

Hello. What I'm trying to do should be fairly simple, but after an hour of searching and trials, I can't seem to get it working.When I run my website on my test machine, I would like it to use a certain value for my connectionString. But when it's run on the live server, it should use a different connection string. This way, when it's on the test server it'll use the test database.In my Web.Config file, I have this:<connectionStrings>        <add name="myConnectionString" connectionString="Data Source=TEST_DB;Initial Catalog=tester;Integrated Security=True"            providerName="System.Data.SqlClient" /></connectionStrings>I would like to be able to change the connectionString in something like the Global.asax file, when the application is loaded. I'd check for a certain environment variable, or some other condition, and change the value of the connectionString.I tried this in my Global.asax, but it told me the value was read_only: ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString = "Data Source=LIVE_DB;Initial Catalog=live;Integrated Security=True" Does anyone have a good way of doing this, so I don't need to juggle Web.Config files when I publish my site? Thanks.  
  

View 2 Replies View Related

Changing Server Names

Jan 23, 2008

I changed the name of a server that runs SQL Server 2005 and Reporting Services web site. I can't connect back to reporting services now using the new server name. I had to do some things to get SQL Server and Analysis Services to work, but I can't find any information on getting Reporting Services to run, I found something about changing config files, but no direction on what those files are.

Thanks for any help,
JB

View 4 Replies View Related

Changing Field Names Is SQL Server 2000

May 23, 2007

Why is it that when you change a field name is SQL Server it sometimes completely messes things up. I renamed a field in one of my tables from Emp# to EmpNumber. I had a view based on this table and naturally I knew I would have to change a view I had based on the table. I opened the view and changed the field from Emp# to EmpNumber but when I tried to open the view I got an error “Invalid column Name EMP#”. I have not been able to fix this. I have dropped and recreated the view, refreshed all the objects using enterprise manager, refreshed all the objects using Query Analyzer, shut down and restarted my computer, taken my database offline and put it back on line. The field name EMP# is not in any tables in my database and not referenced any views or procs . I am just starting on this database so I could verify this very easily because I only have a few views and procs.

Has anyone had this problem or more importantly does anyone know why this is happening or how to fix it?

View 9 Replies View Related

Syntax To Extract A List Of All Table Names On Linked Server

Aug 9, 2013

I'm using the following syntax to extract a list of all the table names on a linked server:

EXEC sp_tables_ex
@table_server = MY_SERVER_NAME

It outputs a list of tables into 4 columns in the result window.Is there a way an can use this as a 'SELECT * FROM ... " command so that I can organize records, insert into, etc etc ?

View 3 Replies View Related

Changing Field Names

Jan 27, 2008

This is a followup to my last post. If a field name is changed in the database, what is the easiest way to determine what stored procedures and triggers that reference that field are now broken?

View 3 Replies View Related

Changing Machine Names MSDE

Mar 11, 2006

I have a local install of MSDE on my workstation. I have also defined alinked server with another SQL Server on our network. I accepted all thedefaults when I installed MSDE and the server got named my machine name.Everything is working great.Our IT department now needs to change my machine name. What effect willthis have on my current SQL installation?Help and suggestions appreciated.Thanks,Frank*** Sent via Developersdex http://www.developersdex.com ***

View 1 Replies View Related

Table Names Are Not Changing With Change In Schema Name

Aug 8, 2007

Hello Everyone,

I am working on a dtsx package wherein i am sending the data from OLE DB Source (SQL Server) to OLE DB Destination (Oracle). For development purpose i use DEVLOPMENT environment on oracle but for unit testing i have to use QA or Some other Schema. when i use DEVELOPMENT Schema in ole db destination, tables are accessed under Schema name eg. "DEVELOPMENT"."EMPLOYEE", but when i m chenging schema name to QA table names are not changing as "QA"."EMPLOYEE". Data Flow Task is pushing the data to DEVELOPMENT environment only.


Can Anyone suggest me any remedy for it ?
Or this is one more BUG in SQL Server 2005.


Advice and suggestions are highly appreciated !

Thanks

View 3 Replies View Related

SQL 2012 :: Extract All Tables Names And Their Row Counts From Linked Server Tables

Oct 7, 2015

I am using the following select statement to get the row count from SQL linked server table.

SELECT Count(*) FROM OPENQUERY (CMSPROD, 'Select * From MHDLIB.MHSERV0P')

MHDLIB is the library name in IBM DB2 database. The above query gives me only the row count of table MHSERV0P. However, I need to get the names, rowcounts, and sizes of all tables that exist in MHDLIB librray. Is it possible at all?

View 1 Replies View Related

Exporting A Table With Changing Column Names To An Excel File

Oct 25, 2006

I'm trying to write an SSIS package that exports a table that has changing column names to an excel file. The column names change due to the fact that the table is created by a pivot daily. the only thing I'm missing is the ability to dynamically map the tables' columns to the excel destination. Is this possible?

I read in another thread that
"It is not possible to create packages or new objects within packages using SSIS."
I also read in the books online that "The input and the input columns of the Excel destination have no custom
properties." To me this means that I cannot programmatically create or remove columns in the excel destination. Please tell me I'm wrong.
So, to summarize my research so far. In writing an SSIS package, I cannot programmatically create a new excel destination object and I can't manipulate an existing one. I hope I'm wrong. Can anyone help me? (and please correct any wrong assumptions I may have stated)

View 2 Replies View Related

How Do I Create A Package That Imports An Excel File Where Column Names Are Changing.

Sep 29, 2006

Hi,

Our company wants to allow our customers the ability to import employee data. Each customer's employee data changes depending on things like organisation structure etc. so the format of the data to be imported needs to change. We can do a lot of this with dynamic SQL, but are looking at moving it to SSIS as we think it will save us a lot of pain later on and for other features in SSIS.

We're stuck at a fairly early part of the process as we don't know how to dynamically import our spreadsheet. So far our best idea is to connect to the excel connection as the only step in the data task and then to use a script task on the control task, write code to connect to the excel source (set the excel source to not treat the first row as headers so we can do a 'select top 1 *...' ) then create a dynamic sql command to create the table.

Once this is done we would then have another data task that actually puts the data into the newly created table. This all sounds very difficult though. What are the options for doing what we want to do... have a feeling that we're missing something basic.

Any help appreciated,
TIA, Anthony.

View 4 Replies View Related

IIS & SQL Server Environments

Sep 15, 1999

Hi,

Right now, we have the production and development databases and ASP pages on one server. This is causing a strain on the performance,
of course.
Well, the finally, the customer agreed to get 2 less powerful servers. This is what we are planning to do with the 2 extra servers.

Server 1 : Original Server (fast)
We will only have the Production Database (NO IIS)

Server 2: New Machine23 (faster box than Server 2)
Offload IIS away from the production Database so we can allow more memory for Database processing.

Server 3: New Machine 3 (slower box we just got)
Move the entire development environment to one server (SQL Server Database + IIS with all the ASP pages)

Does this sound OK?
or should we have IIS sitting on one box (holding pages for Development and production) and the other machine just holds the
Development database.

I would like to hear other opinions/stories on different IIS & SQL Server configurations to maximize performance.

Thanx!
Angel

View 1 Replies View Related

Creating Test SQL Server Environments

Nov 5, 2007

Hi,

I was wondering if anyone has a neat (preferably automated) method of creating small testing databases from large production instances.
My requirement would be to copy the schema and a subset of configuration data from a production database into a test database. The subset of data would be a full copy of a subset of tables, rather than a subset of data within one or more tables. There is a mixture of SQL2000 and SQL2005 servers involved in this requirement. I'm familar with the scripting mechanisms of Enterprise Manager and Management studio and DTS packages, sufficent to perform a process like this manually, but want to productionise and schedule this process to be performed automatically.
I'm sure this must be a commonly performed task, so I'm interested to know if anyone has a "best practice" for this requirement.

Thanks,

Bill

View 3 Replies View Related

Hosting Multiple Environments On One Report Server

Sep 17, 2007



All,

Is there a way to simulate hosting three environments on one Report Server. Due to resource limitations, I would like to set up three environments DEV, TEST, STAGE on one report server such that the data source for each environment would be different. Can I use a different folder structure for each and then deploy the reports by providing server url accordingly?

e.g.
http://servername/DEV_Reports or should it be (http://servername/ReportServer/DEV_Reports)

http://servername/TEST_Reports
http://servername/STAGE_Reports

and then in each of the above define a datasource that has connections to appropriate database on db server. Can we do something like this?

Thanks.

View 2 Replies View Related

Oracle/Unix Environments --&&> SQL Server 2005/Windows 2003 Server

May 8, 2007

I was a Oracle Developer / DBA on Unix Environments all along my career, Very recently iam starting to manage a SQL Server 2005/Windows 2003 Server setup.

Part of my new job is to automate to load Huge Data files/Flat Files (3/4 GB in size) into SQL Server 2005 DB.

Have these initial questions..
Since the files are too large to open at once... What sort of Command Line Interfaces people use on the Windows Boxes.. like doing a "wc" (Word Count) / GREP 'ng Files / Massaging Data Files one line at a time (Like using SED / AWK Commands).. Etc

Any Input / Direction is appreciated...

View 4 Replies View Related

SQL Server 2012 :: Stored Proc Execution Time Diff Between Environments

Jul 3, 2015

I have a stored proc that is executing in 2 sec on production and test database. It is taking more than a min on dev environment.

I have verified sqlserver version is same on both of the server.Prod is running on 2012Sp1 however dev don't have sp1. I am downloading it.

Both are 64bit, has same collation and compatibility level.I have confirmed that sp on both servers has same execution plan. I have reset and import stats from prod too.

View 8 Replies View Related

DB Mirroring: Different Server Names With Same Instance Names

Jan 31, 2008

I'm going to be setting up DB mirroring between two SQL Server 2005 boxes. Since these are on two different servers, can the instance names be the same? Is there any reason NOT to do so if the mirror server is going to be used exclusively for DB mirroring?

For example: if the my primary DB is located on SERVER1INSTANCE1, can the mirror be SERVER2INSTANCE1 or do the instance names have to be different even though they're on different boxes.

Thanks!

View 4 Replies View Related

How Can I Get All Server Names And Catalogs Names For Specific Server

Mar 4, 2008



hii all,can any one help me to get this information.

i am using sql server 2000 and i want to know:

1- all names of servers

2- all database names (catalogs) at specific server and only which the user created .

3- user name and password for each server.


thanks.

View 2 Replies View Related

Server Names Or Instance Names

Aug 3, 2006

Hello there. I'm trying to populate a drop down box with a list of all available instances of SQL server (express or not) available on a network. To list all instances I'm using EnumAvailableServers() in SmoApplication.

The issue is that the Instance column in the returned data table is always empty, and both the Name and the Server columns contain the same string -- the name of the computer the SQL server is installed. Locally I have SSE installed, the instance name is <computer_name>SQLEXPRESS, however, using Smo I can't seem to get to the either full instance name or just the instance name. I can't assume SQLEXPRESS, since there may be more than one installed.

Alternately I used EnumRegisteredServers() in SmoApplication.SqlServerRegistrations and that, while returning instance information (can be retrieved from the RegisteredServer in the returned collection), doesn't always return the remote SQL servers in the list.

Any idea how can this be done? Maybe I'm going at it the wrong way, maybe there's another class / method I need to use to retrieve all instances?

Thank you

View 6 Replies View Related

Linked Server ( Not Able To Access Any Tables Under LINKED SERVER From My DESKTOP Enterprise Manager

Mar 25, 2002

Hi ,
On my Desktop i registered Production Server in Enterprise Manager
on that Server if i go to SecurityLinked Servers
There is another Server is already mapped, when i am trying to see the Tables under that one of the
Linked Server i am getting the Error message saying that
"Error 17 SQL Server does not exist or access denied"

if i went to Production Server location and if i try to see the tables i am able to see properly, no problems
why i am not able to see from my Desk top
i am using the sa user while mapping the Production Server on my DESKTOP using (ENTERPRISE MANAGER)

And i check the Client Network Utility in the Alias using Named Pipe only, i changed to TCP/IP still same problem
What might the Problem how can i see the Tables in Linked Server from my DESKTOP

Thanks

View 5 Replies View Related

DB Engine :: How To Point Linked Server To Specific Database / Rename Linked Server

Apr 24, 2015

I am using Linked Server in SQL Server 2008R2 connecting to a couple of Linked Servers.

I was able to connect Linked Servers, but I cannot point to a specific database in a Linked Server, also, I cannot rename Linked Server's name.

How to point the linked server to a specific database? How to rename the Linked Server?

The following is the code that I am using right now:

USE [master]
GO
EXEC master.dbo.sp_addlinkedserver
    @server = N'Machine123Instance456',
    @srvproduct=N'SQL Server' ;
GO
EXEC sp_addlinkedsrvlogin 'Machine123Instance456', 'false', NULL, 'username', 'password'  

View 6 Replies View Related

Scripting Stored Procedure Add With Linked Server Reference When Linked Server Is Not Available

Jul 18, 2006

Is there a way to bypass the syntax checking when adding a stored procedure via a script?

I have a script that has a LINKed server reference (see below) .

INSERT
INTO ACTDMSLINKED.ACTDMS.DBO.COILS ..etc.

ACTDMSLINKED does not exist at the time I need to add the stored procedure that references it.

PLEASE to not tell me to add the LINK and then run the script. This is not an option in this scenerio.

Thanks,

Terry

View 4 Replies View Related

Comparing 2 Database Environments

Aug 27, 2013

How can i compare 2 database environments (Dev vs Prod) without using third party software (IF IT IS POSSIBLE).

View 3 Replies View Related

Variable Paths For Different Environments

May 22, 2007

This has probably been covered in other posts. I have been working with SSIS for the past month and I am trying to follow best practices on various items. Having worked with a different ETL tool prior to this, I am wondering what is the best approach to use for Connections and File Paths.



What I would normally do with DataStage for this would be to assign a Job Variable (and eventually Sequence Variable) of the type: Path. So, if I was developing a job I would create SourceFilePath, ErrorFilePath, etc. I would use these variables in a FlatFile or Dataset Stage. For instance I would assign a filename for a source as: #SourceFilePath#SourceFile1.txt. During execution the job would load the variable and then the filename would be: C:MyDocumentsDatafilesSourceFile1.txt.



When its time to move to another environment, I don't have to worry about changing values for file connections because it is managed dynamically by a config file or whatever method.



What is the best practice that emulates this behaviour for SSIS? I've been thick and can't get my head around this. Any direction to blogs or user sites would be great. Examples, even better!



Thanks in advance.

View 5 Replies View Related

SSIS Configuration In Different Environments

Jul 5, 2006

Hello,

I want to store each SQL Server's (prod, test, etc) connection string in XML to make deployment & configuration easy. However, the connection string must be encrypted. Does anyone have any ideas or suggestions on how to accomplish both. I know how to encrypt it but I dont think SSIS can work with it.

Any help would be appreciated.

View 6 Replies View Related

Homogenous VS Heterogenous Enterprise Environments

Feb 21, 2008

Another DBA on my team is trying to tell me that it is a widely accepted best practice to only have a single version of SQL server in the enterprise environment. This seems counter intuitive to me and I cannot find a confirming source for this assertion.

I would think that it largely depends on your environment but that once a new version of SQL server has been decided on for a given application, for whatever reasons, that new version should be used moving forward on all new development.

It also seems like that as other databases grow and hardware comes to its end of life that older databases be either migrated or ported to the new version as seems appropriate.

Is there any reason an enterprise should always be on X version and only X version?

View 5 Replies View Related

Binary_checksum And Validated Software Environments

Jul 23, 2005

Hi,It appears that binary_checksum can give the same checksum fordifferent strings, which is a bit worrying. (I guess the algorithm isthe problem in the context of a repeating pattern.)e.g.select binary_checksum('A'),binary_checksum('AAAAAAAAAAAAAAAAA'),binary_checksum('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A'),binary_checksum('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAA')My question...Is this approach to generating checksums adequate for managing theobject scripts in the SQL Server to ensure that they haven't changed. Iguess that the probability of somebody making a change to a script andending up with the same checksum is almost negligible. Has anybody usedthis approach in an FDA validated production environment, i.e. 'no ifs,no buts'? Would it stand up to scrutiny?Any experiences, thoughts?RegardsLiam

View 5 Replies View Related

RS - Multiple Development Environments On One Machine

Jul 23, 2005

We have multiple development environments on one machine for our VisualStudio .net projects.These are web applications so we have organized them by IP Address andHost Headers.When I installed Reporting Services, it installed into my default website (localhost) and that is fine.However, we want to be able to create our reports in our different .netprojects. The only projects that will allow me to create reports arethe projects using the default website.When I right click to create a new project, the Business Intelligenceprojects (reports) type is not there.Can I do this? If so, how do I configure it?

View 1 Replies View Related

Mixed Environments - SQL 2000 Standard && Enterprise??

Oct 6, 2005

We are upgrading a production database server to new hardware. The server is currently running SQL Server 2000 Standard Edition. We are thinking about installing SQL Server 2000 Enterprise Edition, however that would mean the test server (2000 Standard) and production server (2000 Enterprise) have different edtions of SQL Server. How much of a risk does this present? Later in the year we would upgrade test to SQL Server 2000 EE, but for a couple of months the environments would be different.

Thanks, Dave

View 3 Replies View Related

Integration Services :: Deploying A Package In Different Environments

Apr 23, 2015

I modified an existing package created by someone (who left the organization). Its a ftp bulk insert from flat files to the tables. The need was to updates 2 tables out of 9 with additional columns. I made the changes to the package and it runs successfully on my laptop.

After that I build the package and tested it on the development server, although the package runs successfully but the data is written to my DB tables in my laptop instead of development server DB tables!.I see "." in the place of the connection manager server name. The DB name is the same in all the three environment (local, development & production). There is a configuration table used in the package.

View 5 Replies View Related

SSIS Behaves Differently In Different Environments Even Though The Code Is Same

Oct 9, 2007

Hi,

SSIS is behaving differently in different environments but the code is same.

One thing is nor working correctly that is I am converting a string data type column to float data type in data conversion. In our local environments the package is working fine but in production environments it is not working correclty. It is unable to convert the data it is throwing an error.

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

Can anybody help me please?

View 5 Replies View Related

Power Pivot :: How To Config Environments In VS Tabular

Jun 21, 2015

Is it possible to config environments ( dev,tst,prd ) in  VS Tabular solution , like it is done in SSIS ?  i find Variable tab , but i dont find the way to set a connection (string) to be change dynamically between the environments.

View 4 Replies View Related

Dynamically Pass Table Names And File Names To IS Package

Mar 1, 2015

I am designing a package to export staging tables into a flat file.The names of the tables will be: TableAStaging_YYYYMM and TableBStaging_YYYYMM. As you can see the names of the tables will be changing each month.

The flat files will have similar naming: C:MyPathFlatFileTableAStaging__YYYYMM and C:MyPathFlatFileTableAStaging__YYYYMM.I want to run the package as an sql job in two steps, one for each table.I need to dynamically pass the table names and file names (together with the path) to the IS package.

View 1 Replies View Related







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