I will have a group of developers creating objects in a database. Currently they all
create them with the SA account. I would like to have them mapped to the dbo or some method
that when they create objects all objects are dbo.object name and not h1fed99.object name.
Is there a good methor or practice to handle this
My website host allows me to create DB and DB users from its control panel and then I am able to use SQL server Management studio to Manage My DB. Therefore I create My DB (TBC20) and create a user for it(Tony) from Host Panel. When I want to Export My Local copy DB data to the remote DB using Import/Export wizard and set the It won’t Generate any DB objects. Even When I use aspnet_regsql Command I encounter Following error: SQL error number is 262 and the SqlException message is: CREATE DATABASE permiss ion denied in database 'master'. Creating the TBC20 database... ------------------------------------------------------ When I View permissions in Database properties window No Permission is Grant for user: Tony. Only some permission Grant for Grantor: dbo. When I check Boxes to Grant Permission for user Tony None of permissions will be grant to this user. How could I allow this user ti take ownership of DB and create DB objects
Hi, can we use sqlcmd.exe (successsor to osql) to run sql scripts against a compact edition database? Would like to use the output from Visual Studio Team Edition for Software Professionals to build the database structure on compact edition database.
Hi All, I have a SQL script which has creation of some table variables. When I run this query in Query Analyzer, I get proper results. But, when I use the same script to execute from VB Script, it is not running at all. I tried a simple select statement which works fine; but with the one I want to run, it fails to run. I am trying to print the SQL script from VB script, and it appears to be fine. I think the creation of DB objects is where it is getting stuck. Any help here please??
Below is the SQL Script.
Code Block DECLARE @COMPSINGRP TABLE (NAME VARCHAR(100)) INSERT INTO @COMPSINGRP SELECT NAME FROM COMPUTER WHERE IDCOMPUTER IN (SELECT INSTANCEID FROM [FN_COMPUTERSINGROUPLIKENAME] ('UBS: APPLICATIONS - DEALAXIS') ) DECLARE @COMPRESTARTS TABLE (NAME VARCHAR(100)) INSERT INTO @COMPRESTARTS SELECT COMPUTER FROM ( SELECT C.Name AS COMPUTER, --- FIRST COLUMN (SELECT AC.Description FROM Computer CC INNER JOIN [fn_ComputersInGroupLikeName] ('UBS: Applications - DealAxis') CCG ON CC.idComputer = CCG.InstanceID INNER JOIN Alert AC ON CCG.InstanceID = AC.idComputer WHERE (AC.Description Like '%down on a scheduled maintenance%') AND CC.Name = C.Name AND (CONVERT(NVARCHAR(12),A.TimeOfLastEvent,111) = CONVERT(NVARCHAR(12),GETDATE(),111) )) AS DOWN_DESCRIPTION, --- SECOND COLUMN (SELECT AC.Description FROM Computer CC INNER JOIN [fn_ComputersInGroupLikeName] ('UBS: Applications - DealAxis') CCG ON CC.idComputer = CCG.InstanceID INNER JOIN Alert AC ON CCG.InstanceID = AC.idComputer WHERE (AC.Description Like '%successfully up now after a scheduled reboot%' ) AND CC.Name = C.Name AND (CONVERT(NVARCHAR(12),A.TimeOfLastEvent,111) = CONVERT(NVARCHAR(12),GETDATE(),111) ) ) AS UP_DESCRIPTION --- THIRD COLUMN FROM Computer C INNER JOIN [fn_ComputersInGroupLikeName] ('UBS: Applications - DealAxis') CG ON C.idComputer = CG.InstanceID INNER JOIN Alert A ON CG.InstanceID = A.idComputer WHERE (CONVERT (NVARCHAR(12),A.TimeOfLastEvent,111) = CONVERT(NVARCHAR(12),GETDATE(),111) ) --ORDER BY C.NAME ) AS RESTARTS DECLARE @NOCLUE TABLE (NAME VARCHAR(100)) SELECT 'The Server '+ NAME+' did not have any restart information. Please Check.' FROM @COMPSINGRP WHERE NAME NOT IN (SELECT NAME FROM @COMPRESTARTS)
Any help or suggestion would help me out. Thanks a lot.
How to SQL server save information about create/drop objects action. How can I get this? Example for, a lot of objects(sp) in my database has been dropped, how I know who was dropped them (user login & time)?
I just upgraded our existing 6.5 installation with the new SQL server 7.0. I can't get any of the existing stored procedures which I imported from 6.5 into 7.0 to allow me to edit them. I do all of my design from Visual InterDev and the SQL Server 6.5 version would allow me to create and edit stored procedures. It would also allow me to create/design new tables.
With SQL Server 7.0 I do not have an option to edit or create any of these items. I have created a new login, assigned it a password, given it admin rights/roles and I am still unable to remotely create these items. What am I doing wrong?
Hi,I have to prepare an ER diagram for the objects in my SQL Serverdatabase. I have used the option "DIAGRAMS" in EnterPrise Manager ofSQL Server 2000. It is creating the diagram for the selected tables(but the diagram contains only the table which i have selected. It isnot displaying its depended tables). But i am not able to export it toany of the flat file like MS WORD or paint. I want this diagram to beuploaded to one Flat file and send to my customer for his reference.Could anyone suggest me how to create the ER Diagram for the SQL 2000database and export it to a flat file.Thanks for your help in advance.-Rao
MySql has a statement like: SHOW CREATE TABLE tablename;
that returns the precise CREATE TABLE statement for the specified tablename.
Sql Management Studio also allows scripting Create Statement for any object by right-clicking it. But I want to do this programatically, and fetch CREATE statements for Tables, Procedures & Views.
How can I retrive CREATE statements for Database objects progrmatically in Sql Server???
Is there a way to give someone the right to create only views and no other objects in a database? Currently I have given the individual ddladmin database rose, but would rather be more restrictive?
I use SQL code snippet to attach the CLR assembly (dll) to the SQL Server Express
CREATE ASSEMBLY [DatabaseAndImages] AUTHORIZATION [dbo] FROM 'C:CLR_File.dll' WITH PERMISSION_SET = SAFE
That file content CRL Codes for 10 Stored Procedures & 3 UDT & 5 Functions & 6 Triggers As you can see it's content large amount of DB objects !!
My Question is .. Is there any simple way can I use it to extract or automatic create all that Objects in the Database without use separate SQL Statement for each one ??
By Example , I will use this SQL statement to create the sp_AddImage that already located inside the CLR dll file
CREATE PROCEDURE [dbo].[sp_AddImage] @ImageID [uniqueidentifier], @ImageFileName [nvarchar](max), @Image [varbinary](max) WITH EXECUTE AS CALLER AS EXTERNAL NAME [DatabaseAndImages].[StoredProcedures].[sp_AddImage]
But as you know .. I have many objects .. and I am in development phase and I will do change to that object many time and also may I will add much more €¦
I thing it's not good to write SQL Statement for each object and do changes every time when I change the object definition
Is there any one line of SQL statement can I use it to automatically create and extract all the objects inside the assembly ?? Or is there any way to do that Issue by simple operation ??
We are in the process of trying to automate our production releases (what a concept ;-)
The database is SQL server 2005 All objects are being stored in VSS Using Nant and Cruise Control for the actual migrations. I have two directories - Create (for a brandnew database) and Change (db object changes)
In my 'Change' script, I do the following -
1 - Take backup of database 2 - Migrate objects from 'change' directory to production 3 - Script out all objects of database and save in the 'Create' directory
For the #3, I was hoping I could create an SSIS package that would script out all database objects and save them on the VSS server.
I'm new to SSIS and want to verify it's something that can be done before I start down that path. If anyone has any examples or references, it would be much appreciated.
I create a logon trigger on a sql server 2008 r2 instance,the trigger is very simple,like this:
CREATE TRIGGER tg_login ON ALL SERVER FOR LOGON AS IF ORIGINAL_LOGIN() IN('sa') AND HOST_NAME()='TestHost1'
[Code] ...
I use master.dbo.LoginRecord table to record the bad logon. When the trigger is working ,latches produced sometimes,wait type is PAGELATCH_UP and wait resource is 2:1:3. At this time, a large number of logon failed ,error message is "Logon failed for login 'login name' due to trigger execution."
I think logon trigger create internal temporary objects maybe,it is right?
please help newbieI need to create a lot of objects the same type (let's say: schemas)I wish to use paramerized block in loop to do so.- how to put names of my objects to such control-flow?belss you for help
We will be moving 2 different databases (SS2005 & SS2008) to a new SS2014 SQL Server.  Currently our codes looks something like Server1DBInstance1... & Server2DBInstance2... Is it possible to move the objects from these 2 instances to Server3DBInstance3 and then use an alias to reference the objects?  Or does Server3 need to have DBInstance1 & DBIstance2?  Basically, is the alias just for the database or for the instance too?  Can I create an alias "Server1DBInstance1' on Server3DBInstance3 and assign objects to that alias?
passing serialised objects to a stored procedure for the purpose of data inserts. I see this as being a way to handle multiple row inserts efficiently.
However, in my limited use of XML data I am not so sure how to link the data when I have a dependency on another "object" within the serialised XML.
Below is a code snippet showing what I have so far.
The first insert statement works fine - but how to retrieve the identifier created by the DB - I want to use an SQL statement that finds the record in the table based on the XML representation (of the PluginInfo), allowing me to insert the ConfigurationInfo with the correct reference to the PluginInfo
DECLARE @Config NVARCHAR(MAX) DECLARE @Handle AS INT DECLARE @TransactionCount AS INT SELECT @Config = ' <ConfigurationDirectory > <ConfigurationInfo groupKey="Notifications" sectionKey="App.Customization.PluginInfo"
I'm really new to MSDE so I just want to know...Is SQL Server 2000 a prerequisite for MSDE particularly for developers? If yes, then is it(SQL Server 2000) a prerequisite for clients?
The thing is, I can't find a tool where I can create databases after installing MSDE...the only way I can think of is also installing SQL Server 2000 and create the database from there...
Hi, I've just released Nautilus v1.0.6. I would apreciatte your opinion and comments. With Nautilus you can: -search tables without tipying the exact name. -browse records, filter and locate records -"Pivot" records to see it's related records (folowing the Foreign keys). -Generate scripts: create table, insert into, delete, update. -Build dynamic diagrams.
OMNI GROUPJoin Bytes!T-SQL/ CONTRACT TO PERM/ ATLANTAI'm looking for 1-2 TSQL developers for a 4 month contract to hirerole in Atlanta, GA. Ideally the candidate would be local or regional and aUS Citizen with 2-4 years of Microsoft TSQL development experience.Salary in the $55,000--$60,000 or so. annual range. Contract rate would beApproximately $36 hr W2 or 39hr 1099. One is responsible for their ownexpenses.Once perm, the company offers full benefits.If interested and qualified, answer the six questions below. EmailanswersWITH a resume to: Join Bytes!1. TSQL experience-------------------yrs2. MS SQL experience---------------yrs3. OO Languages----------------------4. Citizenship Status------------------5. Availability--------------------------6. Contract Rate ---------------pr hr..
New to SQL so please be patient. I'd like to give my developers "See All/Do Nothing" rights to my production server. I want them be able to see everyting that I do, as SA, but not be able to change anything. Is this possible?
I'm currently trying to obtain an aggregate function from a table to provide a cumulative monthly value. I would like to create a view to obtian this from the underlying table i.e month=1 ,month=1,2 , month=1,2,3 Etc.
Always looking for people who are strong with microsoft technology for new oppurtunities in the Seattle area. If you are good, we can help you find your ideal next position.
I am looking for mid to senior level SQL developers for some sweet companies here in Seattle. A chance to work in a dynamic envirnoment with bleeding edge Microsoft technologies. Are you good? then we can help.
I am looking for strong SQL developers and/or DBA's for some really sweet companies here in Seattle. Anyone interested that is good and wants to hear about new oppurtunities? I would love to help you out.
This may be an intuitively obvious question, and if so, I apologize.
Speaking in terms of best practices here, what is the preferred method for allowing developers to work with databases in SQL Server? If they use Management Studio, then they have access to tools for perhaps messing with other databases, etc. that they should not (assuming it is not correctly secured). Likewise with Enterprise Manager. I can see where they would use Query Analyzer, but these two are now combined in Management Studio.
I'm just inquiring into how other DBA's do this. I realize there are DBA's that are developers and vice-versa, but what if there is a clear line of distinction and you want to keep the tools used in these roles separate?
Hi,I have just started a business and I was wondering if I could get someadvice about product selection. I am currently buiding my websiteusing asp.net connecting to sql server database.My question: Am I only required to purchase a SQL Server DevelopersLicence? I won't be hosting the site so I think this is correct butthought I should check.Cheers,Jack
I just bought a copy of SQL Server 2000 (with service pack 3a) that Iintended to install and run on XP Pro. My concern is that the requirementslist on the box do not include XP or XP Pro. Will SQL Server 2000 developeredition run on XP Pro?
Were looking from some feedback, thoughts, comments, suggestions on a permissions issue in our SQL Server 2005 environment. We have a Development (stand-alone server) and Production (activepassive cluster). Both running SP2. We're looking for the best way to manage permissions for the developers without giving them dbo privileges.
As background information, here's a note / response from a developer outlining the permission they need.
-----------------------------------------
"Our team needs enough permissions on DB database to:
Create and modify DB object such as tables, stored procedures, keys, triggers, views, ...
Be able to execute stored procedures and other basic DB objects
One of the issue I had when working on DatabaseA which was never resolved was that I could create tables, but had no rights to modify them once created.
I could modify them via scripts, but not via graphical interface which is a pain.
I think we should have full permissions to dev DB other than to drop DB, and modify system DB settings.
So that we can work within the created DB shell completely."
-----------------------------------------
Previous to supporting the current SQL Server 2005 environment, the developersapp owners had db_owner for their databases. Definitely not a best practice as with 2005 db_owner is ablke to delete databases. Moving away from this, we thought we would scale them back and only grant them the following database roles:
db_datareader
db_datawriter
db_ddladmin
With these roles, they were able to create the tables, views, stored procedures, etc...... but problems arose when they tried to modify the objects they created as well as execute stored procedures. It's going to be a pain to grant permissions on each stored procedure. More of a mystery is allowing them to make design changes within Studio Manager. Given they can already do this using scripts but not the GUI.
So there is an issue with using GUI tools to design the tables.
Here's a thread we found that tries to explain the reason why they can't use the GUI to make design changes.
Even if you have CREATE TABLE permission, there are limitations to the modifications you can make. Remember, as you modify an existing table or design a new one, your work can induce attendant modifications in other tables. For example, if you change the data type of a foreign-key column, the corresponding column in the primary-key table will be automatically modified by the Visual Database Tools. If you do not own the primary-key table, and you are not logged in as the system administrator, database owner, or a user that is a member of the db_owner role, your modification will fail.
When we created the accounts, we assigned the default schema to be 'dbo'. This was thought to simplify administration of the objects. In SQL Server 2000, this was a best practice. Now, in SQL Server 2005, they changed everything with the user schema separation.
So we have a developer (devuser) - created with default schema (dbo). Any object that are being created are owned by dbo. (ie... dbo.table1, dbo.storedproc1, etc..) So dbo owns the objects, not the user.
Does anyone have any ideas? Do we create a new schema and assign permissions? Do we create a new fixed database role for the developers? I'm curious as to how others are assigning permissions to developers on development and production servers.
What is the best practice in managing an SSIS development with multiple developers.
For example, we have 2 guys that will be developing various SSIS packages for a common data warehouse. We are most likely going to divide up the unit of work by the tables that need to get loaded. So, one guy will develop packages to load tables 1 thru 5 and the other guy will develop packages to load tables 6 thru 10.
Should each person work within his own project? (Not sure what a difference between a solution and a project is, so I may be thinking of a solution.) If so, can multiple people open the same project? I don't think you can.
I'm very new to SSIS and this would be the first time I'm doing something like this. I haven't even deployed a package to the server yet so I'm not even sure what implications/consideration I have before I take on this development effort I'm about to.