I just deleted a stored procedure in order to replace it with a corrected version (DotNetNuke).
Now I had the following problem : When I try to create the SP with the following :
IF EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'{databaseOwner}{objectQualifier}GetUserRolesByUsername') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE {databaseOwner}{objectQualifier}GetUserRolesByUsername
GO
IF @UserName Is Null
BEGIN
SELECTR.*,
U.DisplayName As FullName,
UR.UserRoleID,
UR.UserID,
UR.EffectiveDate,
UR.ExpiryDate,
UR.IsTrialUsed
FROM{databaseOwner}{objectQualifier}UserRoles UR
INNER JOIN {databaseOwner}{objectQualifier}Users U ON UR.UserID = U.UserID
INNER JOIN {databaseOwner}{objectQualifier}Roles R ON R.RoleID = UR.RoleID
WHERE R.PortalId = @PortalId
AND (R.Rolename = @Rolename or @RoleName is NULL)
END
ELSE
BEGIN
IF @RoleName Is NULL
BEGIN
SELECTR.*,
U.DisplayName As FullName,
UR.UserRoleID,
UR.UserID,
UR.EffectiveDate,
UR.ExpiryDate,
UR.IsTrialUsed
FROM{databaseOwner}{objectQualifier}UserRoles UR
INNER JOIN {databaseOwner}{objectQualifier}Users U ON UR.UserID = U.UserID
INNER JOIN {databaseOwner}{objectQualifier}Roles R ON R.RoleID = UR.RoleID
WHERE R.PortalId = @PortalId
AND (U.Username = @Username or @Username is NULL)
END
ELSE
BEGIN
SELECTR.*,
U.DisplayName As FullName,
UR.UserRoleID,
UR.UserID,
UR.EffectiveDate,
UR.ExpiryDate,
UR.IsTrialUsed
FROM{databaseOwner}{objectQualifier}UserRoles UR
INNER JOIN {databaseOwner}{objectQualifier}Users U ON UR.UserID = U.UserID
INNER JOIN {databaseOwner}{objectQualifier}Roles R ON R.RoleID = UR.RoleID
WHERE R.PortalId = @PortalId
AND (R.Rolename = @Rolename or @RoleName is NULL)
AND (U.Username = @Username or @Username is NULL)
END
END
GO
I get the following error :
"Syntax error, permission violation, or other nonspecific error"
I am attempting to create a Test db from a full backup of the production db. With 2012, I cannot do it the the way i had done it in previous versions (and now i understand why because of Logical names).
The Test db runs in the same instance as Prod db.
I attempted to run this but come up with errors. This is what i executed:
RESTORE DATABASE TEST FROM DISK = 'E:<path>FULL.BAK' WITH REPLACE, RECOVERY, MOVE 'PROD' TO 'E:<path>TEST.MDF';
The errors are all cannot execute due to PROD is in use.
How easy it is to deploy a solution that uses SQL Express on Development, but a MS SQL database on the production server (host)I am using the membership provider of ASP.net 2.0 Many thanks.
Is there such a thing as a Production DBA in the SQL Server world or is this an outdated concept? Is there a market for people who specialize in database administration as distinct from software development or general network admin? I believe there are such people in the Oracle world, is the SQL Server world different in this regard? Can anyone give me suggestions about how to go about filling such a position?
I am a New York City area employer seeking to fill a position that I think would be ideal for a DBA with 3-5 years of experience in a production environment. The salary would be somewhere between $50K and $60K.
The position involves administering a SQL Server cluster and SAN running our core business application, plus several ancillary SQL Server installations. The application that we are implementing is a third-party product, so no real development is being done at our site. It is, however, fairly complex and requires customization and we do have significant reporting and EDI requirements, so strong T-SQL skills are required.
We are a medium-sized operation, with 900 employees and an eight person IT Dept; the organization’s main focus is insurance not IT, so candidates with a lot of experience might not find it challenging enough, but I think it would be an excellent opportunity for a candidate who might be stuck in the back of a large IT Dept. who wants to move up to a more visible position in a smaller organization.
I would think that there would be a lot of people in this category and, indeed, we have received a lot of resumes, but few of them are from the type of candidate that I had in mind. Most of the resumes are from people whose main focus is development or, if they have had experience in a production environment, have had 10+ years and are seeking salaries way beyond what we can pay. As for the former, I would not automatically reject someone whose prior experience was as a developer—and these skills would certainly be useful to us--I would just be worried that they wouldn’t be happy if they weren’t spending all of their time developing.
We have developed a project with many SSIS packages. Now we are in a stage where we are deploying this into production.
The operaitons team has asked us what are the things they need to known and do to make sure that the production system of SSIS keeps running.
Can you help me in comming up with a detailed list which I can give to the operations/admin folks so that they can ensure that this project keeps running?
I must release a new Db on 4/1 into an isolated small network (pier workgroup) and my choices are MSDE or Express. I'm new to both (MSDE yesterday, Express today). I am familiar with SQL Server and prefer using the tools with Express, but is it stable enough to use in this type of production environment?
Everything works well in development mode when I click on Preview, the report is shown as I want.
But In Production this is how my report is shown
My Report
Public
Private
Total
Category
SubCategory
x
x
x
SubCategory
x
x
x
Total
x
x
X
I don€™t understand why the Total column returns false for the InScope("SubCategory")," statement and that only when my report is deployed on the production server.
Hi all, I have a asp .net 1.1 application running on the intranet which uses SQL Server 2000. The application is in production and everytime I want to do some changes, i do the changes on my development machine then I copy the application dll on the server. The problem is that I'm using Stored Procedures for all my Select, Insert and Delete statements. These stored procedures are live on the server so I can't do the modifications locally and test them then copy to the server.
How can I do modifications without affecting the production server and the users ??? thanks.
I will be hosting my website in the next few months and doing more testing and I was having trouble finding a place to host the site that allows enough space for my sqlserver2005 database. I am estimating that the database will be around 40-50GB. Most hosting companies only give about 500MB for the database. Does anyone know of a company that provides more space? Also, is SQL Express production ready, or is it just for developing applications? If it is production ready, is there any "major" performace impact in using it over the full version. The reason I am asking is because hosting companies only give 500MB for a database, but alot more space for the web page. If I can put the SQLExpress file in the App_Data folder, then I will have more space. Does this even sound like it will work? Opinions are appreciated!
ok ok, stop laughing. for real, is there any programatic way of doing this? whom ever created this database i inherited (SQL 2000) created the LDF and DATA files on the same drive and in the same folder for that matter. just trying to do a little disaster magament.
we have a situation where modifications to the stored procs and views keep happening in the development databse environ while there is a live production database also up and running.
periodically we need to ensure that the development and the production are in synch where all changes made to dev are transferred to prod. however the entire prod database obviously cannot be overwritten as it contains production data. therefore what we need to do is to transfer all SPs and Views from the development to prodn. ( we do not prefer incremental transfers as there are many SPs and views and we can never really be sure that all changes have been transferred )
the obvious way is to script out all SPs and views in dev and run the scripts in prodn. but what we encountered was the enterprise manager does not script out the objects in heirarchical sequence - ie parent objects first and then the objects that refer the parent objects. this leads to errors when running the scripts as the objects required for the creation of a SP, say another SP run from within that SP , may not have been generated by then as the "contained" SP is lower in the alphabetical order in which SQL server scripted out the objects.
finally we had to look at each and every error and manually set the process right.
moreover in the way we did things the "sysdepends" table got all screwed up and therefore we can no longer depend on enterprise manager to show dependencies within the database.
is there any elegant way of going about this ? we also tried transfer manager in DTS but it also gave the same error. moreover can the sysdepends table be rebuilt from scratch ?
I am interested in hearing from those who are using SQL7 in production. Please include size of database, number of users, implementation date and experiences to date - good bad or indifferent. Thank-you, Leo
This feels like a silly question, but I`m going to ask it anyway...
I have limited SQL Server experience, but have run into a wall with a client`s Web/Access combination. I need to upgrade to SQL Server. I have Beta3 installed on a development box and am very happy with it. Is anyone running this thing in a production environment? This isn`t going to be experience huge loads, so I`m tempted. Tell me if I`m crazy for wanting to try it.
Sould one has a seperated environment for production and test system? How do you do it on a same server? Install two instance? How do you seperate test DBs from the production DBs? Please advise...Thank you
I have a brand new database server with system databases. I need to copy like four production database from another server to this new server. Can i do restore of the last production backups and restore them on the new server without creating the empty databases on the new server.If any one has better approach i will appreciate
I have a database db1 on server1 and server2.The Db On server1 is a production db and the Db on server2 is a staging Db.All the new data will be coming into production Db.And i wanted to update the data and database structures on staging Db from production Db on weekly basis.So how can I reflect the data and datastructures on my staging Db from my production Db.
Was wondering, when performance changes have been made to existing code and deployed to a production environment, should anything be done regarding clearing old cache?
Is there a risk of the new code picking up cold or wrong cached query plans etc?
I know you can't clear the cache for the full system as it will affect everything else. But are the ways to target the changes? I.E run the new code with an OPTION (RECOMPILE) few times to build up new clean plans for it to use?
Or will the update stats see it is using bad plans and then start creating new clean ones over time?
This is probably an easy solution for some of you seasoned DBA Vets but here is my problem.
I have to take production data and scramble certain sensitive columns such as SSN, DOB, Address, First Name so that our Management team can use it as demo material. Is there a quick solution to this issue?
1.First issue The port number already allocated was 2059. We have changed that into the default port 1433 in the node. Now we are able to connect the node from the client application. But we are not able to see the configuration manager in any of the environment now.
2. 2nd issue Cluster Environment
Error while executing the Package The connection details are not loaded in the connection manager tag
OK, I'm troubleshooting a performance issue on one of our production servers, but I really can't t-shoot and tweak in real-time, so I took a snapshot of "a day in the life of" my production server using the profiler.
I want to run the sql commands I collected on another server I set up identical to production, and play around there.
Does anyone know of a good tool to "replay" those captured commands onot another server?
I have production server 2000. The server gets disconnected sometime by itself and sometime it is working fine.Sometimes it even doesn't get restarted. Is there any problem with service packs and some performance issues. Can you SQL guru give me best suggestion and how should i proceed.
I'm totally new to SQL. I have a SQL 2005 server with 3 sets of mirrors - 1 for the OS, 1 for the logs and 1 for the DB. SQL had already been installed and DB's put into production before I knew the logs and DB's were all on 1 mirrored set. I need to move the logs to their own drive. How do I accomplish this?
Hello faculties,We've a production database that is being used by one of our clientsas a backend for his website. The database size is around 1GB.Recently we added some tables to our local database which is areplica of the production database. Now we need to apply the samechanges at the production one aslo.I've no clue about what steps should i implement.Please guide me!Thanks in advanceDebian*** Sent via Developersdex http://www.developersdex.com ***
We will soon have 200 + production instances. In an effort to be morepro active, I am looking for a way to monitor jobs, both failed andlong running, Disk space, and other such things like CPU load etc.I would appreicate any suggestions you might have on accomplishingthis. For instance, is there anything in reporting services that mighthelp accomplish this ? Most of the instances are 2k, but we also havesome 2k5.Best RegardsSGB
Hi,I ran test data on my development machine and it took 1 minute toinsert the data. Ran the same set of data on the server and took 5minutes.Check both database and everything is the same. I even copied theproduction DB on my machine and it was taking still about 1 minute.Look at the fragmentation, and all the numbers are better on the serverthan my development machine so it should be faster.In the application I put some timer and discover that the insert istaking 0.015 ms on the server and 0 on the development. So the problemis on the insert.It is a Web application using ASP.NET.Here are the spec of the computers:Development: P4 HT 3.2GHz 1gig memory running WIN XPServer: Xeon 2.8GHz 1.5Gig memory running WIN 2000 serverAny idea how I to pinpoint the problem? I'm not at the point ofthinking that it can be the hardware, but how to verify that?ThanksFrank
We often have to migrate changes to sql server 2000 databases fromdevelopment to production. Normally we dump the sql from Enterprise Managerfor production and development and do a diff (using CSDiff - downloadable forfree).From the diff information we create some scripts to add new tables or alterexisting tables as required. This is time consuming and error-prone.I am now trying the following:1. Backup up the Development database2. Delete the Development database3. Restore the Development database as Development_Backup3. Use the the sql script to create the new Development databasestructure from scratch4. Use Data Transformation Services to migrate the data fromDevelopment_BackupThe problem is that many of the 'sys' tables are empty. For example table'sysforeignkeys' is empty.Is there an easy way to rebuild the data in the 'sys' tables?Thanks
Hi,Our DBA group is debating production release methodology. We alwaysperfect our deployment package (typically a script) against thedatabase in a Staging environment, before executing the packageagainst Production. One side argues that the safest approach is tocreate a script containing all schema changes, data changes, storedprocs, functions, etc. Run that script against Staging until it iserror-free. Then, when you run it against Production on Release Nightyou know it will also be error-free, since Staging is a copy ofProduction. However, any changes to the deployment, such as updatesto procs (and there are always a bunch in the pre-deployment period)must be manually implemented on the script.The other side wants to take advantage of the .NET environment. Wekeep all procs, views, and functions in a Release folder on VSS,execute a Get Latest Version (Recursive) from VisualStudio, and runagainst Staging/Production. Any changes to the procs areautomatically propagated from VSS to VS, and there is no manualediting of the script. You still need a script for table and datachanges. The "script everything" side of the debate feels this methodis not as reliable, especially since when views are nested, you willget compile errors and must execute the run-on several times until allthe views compile. The "script" side feels that any errors areunacceptable in a Production environment.What is the opinion out there?Thanks!
We are installing an application with MSSQL database at our users place.Now we have two instances of the same database:- developing database, on which we are working at- production database, which is at our user's place.That 2 databases would have to be syncronised.Users will of course enter some data into production database. How can wechange the production database do reflect changes we have made on thedeveloping database?D.--
I want to make some steps towards securing production database.
1. Give limited rights to Developers, i.e. db reaonly, db writedeny 2. Make strong password for local and Domain 3. Use Windows authentication 4. Enable log for 'Failed Login' attempts.