How To Declare Objects In Master Database

Jan 16, 2015

I am trying to register our CLR assembly as an unsafe assembly without having to make the database trustworthy.  Since making the database is_trustworthy_on = 1 is not a best practice, and would cause some of our customers (and our development process) a little bit of grief..

The reason the assembly is 'Unsafe' is because it is calling the TimeZoneInfo class to convert between timezones, since we are not yet on UTC dates.  We plan to in the future but that's a big project.

We are also not using the 'SQLCLR' but rather have written our own class library and just have a project reference to it, which works just the same, but we have found to be better for the C# programmers.

I am playing with signing the assembly using an SNK file and have figured out what I need to do, including 1) creating a master key, 2) creating an asymmetric key using the same SNK file that signed the assembly, 3) creating a login for the asymmetric key, and 4) granting unsafe assembly to the login.

When I do all that with straight SQL, it actually works!  But I am having trouble fitting this into our SSDT world. Should I create a separate SSDT project for items #1 through #4 above, and reference it, and check 'Include composite objects' in our publishing options?  As stated in this blog post though, I'm terrified of messing up the master database, and I'm not excited about the overhead of another project, a 2nd dacpac, etc.

[URL] ...

Since we do use a common set of deployment options in a deployment tool we wrote, which does set the 'block on data loss' to false, and the 'drop objects not in source' to true, b/c we drop tables all the time during the course of refactoring, etc. 

I don't want to drop anything in master though, and I don't want to have to publish it separately if we didn't have to. 

I suppose I could just have some dynamic SQL in a pre-deployment script that takes care of the master database, but I was trying to do it the 'right' way, in a declarative style, but struggling.

So, in short, what's the recommended approach for getting an 'unsafe' CLR assembly into an SSDT project?

The error that started all this was:

CREATE ASSEMBLY for assembly *** failed because assembly *** is not authorized for PERMISSION_SET = UNSAFE. 

The assembly is authorized when either of the following is true:

the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on;
or
the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission.

View 4 Replies


ADVERTISEMENT

Where Can I Find These Objects Associated With These Permissions In Master?

Nov 8, 2007

I'm trying to identify the objects in master that the role public has select permissions on, but when I run this query, I get 4 results where the default schema is null and the major_id column does not correspond to any records in the sys.all_objects table. Where else can I look to find what objects these are. DBO is listed as the grantor.

I appreciate your help.

SELECT *
FROM SYS.DATABASE_PERMISSIONS P,
SYS.DATABASE_PRINCIPALS R
WHERE P.GRANTEE_PRINCIPAL_ID=R.PRINCIPAL_ID and
permission_name='SELECT' and class_desc='OBJECT_OR_COLUMN' and
r.name='public'
order by r.name desc

View 9 Replies View Related

Updating Data In Database VB Code Problem, Must Declare Scalar Variable

Feb 18, 2008

I get a Must Declare Scalar Variable for CompanyName error. Please help. Thank you. datasource.ConnectionString = ConfigurationManager.ConnectionStrings("ConnString").ToString()
datasource.UpdateCommand = ("UPDATE Company SET [CompanyName] = @CompanyName), = @Email, [PhoneNumber] = @PhoneNumber, [WebsiteName] = @WebsiteName WHERE ([CompanyID] = " & Request.QueryString("CID"))datasource.UpdateParameters.Add("@CompanyName", txtName.Text)
datasource.UpdateParameters.Add("@Email", txtEmail.Text)datasource.UpdateParameters.Add("@PhoneNumber", txtPhoneNumber.Text)
datasource.UpdateParameters.Add("@WebsiteName", txtWebsite.Text)
datasource.Update()

View 4 Replies View Related

Help With Inserting A New Record Into Database - Error Must Declare The Scalar Variable @BookMarkArrayA.

Mar 24, 2006

Hi,
Can anybody help me with this, I've got a simple program to add a new record to a table (2 items ID - Integer and Program - String) that matches all examples I can find, but when I run it I get the error :
Must declare the scalar variable "@BookMarkArrayA".
when it reaches the .insert command, I've tried using a local variable temp in place of the array element and .ToString , but still get the same error  
This is the code :
Public Sub NewCustomer()
Dim temp As String = " "
Dim ID As Integer = 1
'Restore the array from the view state
BookMarkArrayA = Me.ViewState("BookMarkArrayA")

temp = BookMarkArrayA(6)
Dim Customer As SqlDataSource = New SqlDataSource()

Customer.ConnectionString = ConfigurationManager.ConnectionStrings("CustomerConnectionString").ToString()
Customer.InsertCommand = "INSERT INTO [Table1] ([ID],[Program]) VALUES (@ID, @BookMarkArrayA(6))"
Customer.InsertParameters.Add ("ID", ID)
Customer.InsertParameters.Add ("Program", @BookMarkArrayA(6))
Customer.Insert()    

End Sub
Cheers
Ken
 

View 11 Replies View Related

Coping Database Objects From One Database To Another Blank Database.

Aug 18, 2005

I want to create a duplicate database   in sql 2000 using asp.net from a webform
I created a database using CREATE DATABASE .......

But how to copy tables, views, stored procedures to newly created
database from old using asp.net from webform

Is there any another method to create a duplicate database with another name
from existing database on same server ?

View 5 Replies View Related

SQL Server 2008 :: How To Update The Database Physical File Location In Master Database

Mar 8, 2015

I had to to relocate the database log file and I issued an Alter database command but by mistake I put a space in the file name as below. The space is at the beginning file name. Now I am unable get the database loaded to SQL Server. The database has 2 replications configured, so deleting and re-attaching the database means the replication needs to be re-configured. Is there an alternative way to issue a command to update the database FILENAME ? Not sure if this can be edited in master database (sys files).

ALTER DATABASE [User_DB]
MODIFY FILE (NAME = User_DB_log, FILENAME = 'I:SQLLogs User_DB_log.ldf')
GO

View 1 Replies View Related

Create Database Permision Denied In Database ' Master' (MS SQL SERVER, ERROR 262

Feb 17, 2007

Cn not do anything with my sql server, everything i trt to do i get this message, user does not have permision, etc, ,

I am running windows Vista Business, SQL SERVER 2005

so what going on here

View 23 Replies View Related

CREATE DATABASE Permission Denied In Database 'master'. Error

Feb 1, 2007

got rid of my error about user login rights, it was all working yesterday. but for some reason i now get this error  CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
  i have this in my web.config file     <connectionStrings>        <add name="ConnectionStringTest" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf;Integrated Security=SSPI;Connect Timeout=30;User Instance=False"            providerName="System.Data.SqlClient" />    </connectionStrings>    <appSettings />         <system.web>        <!--             Set compilation debug="true" to insert debugging symbols into the compiled page.            Because this affects performance, set this value to true only during development.        -->      <compilation debug="true" />      <identity impersonate="true"/>  and my asp connection string is         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringTest %>"            SelectCommand="SELECT [entryID], [compID], [emailAddy], [answer] FROM [entry]"></asp:SqlDataSource>  if i set user instance to true i get a user permission error.  it says on sql server management that i have dbo rights on my database, but it wont let me put datareader or write on this login. any ideas? its driving me insane 

View 4 Replies View Related

SQL Security :: CREATE DATABASE Permission Denied In Database (Master)

Oct 26, 2015

I have installed new SQLServer2012 instance and my domain user have sysadmin privileges on this instance. I have a restore procedure and it will execute WITH EXECUTE AS 'domainmy username', for all the developers have exec permissions to this procedure. But newly installed server this procedure was failing with the following message. But the same procedure executing fine on other servers.

Msg 262, Level 14, State 1, Line 1
CREATE DATABASE permission denied in database 'master'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

View 7 Replies View Related

Setting SQL Database So That Cold Fusion Will Go To New Database Instead Of Master

Apr 17, 2001

whenenver i run cold fusion, it automatically gets my tables out of the master database instead of the new one i have created. i've added a user that has a default to the new database instead of the master, but i need to know how to use that new user correctly, and what i will need to do once i start adding more databases so that cold fusion will go to the appropriate database and not to the master.

View 3 Replies View Related

CREATE DATABASE Permission Denied In Database 'master'

Dec 20, 2006

Hi,

I'm using Visual Studio 2005 Pro and SQLExpress that comes with it.

I have my program running fine in XP Pro OS using a window user "Glen" (Computer administrator) with Administrator rights. This means that I installed VS 2005 using this window user "Glen"

I created another windows user "TestUser" (Limited account) in the same physical PC.

I tried to run the program and on the part that I need to access SQL table, I got the error [CREATE DATABASE permission denied in database 'master']

At the same time while using "TestUser" and running sqlcmd (to check if I can connect to SQL), I also got error HResult 0x2, Level 16, State 1.

I read alot on MSDN discussions and related links but it seems that I can't get the solution that I need.

SO HERE ARE MY QUESTIONS :

1. Am I allowed to run my program using user "TestUser" since SQL is installed using "Glen" windows user?

2. Do I need to add access rights to "TestUser" to allow the user to have CREATE rights? (Note : for security reason, I can add other access rights except Administrator)

Thanks in advance for all you help.







View 19 Replies View Related

Putting Names Of Objects To Control-flow Loop Creating Objects

Dec 27, 2006

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

View 5 Replies View Related

SQL 2012 :: Restore Master Database For A New Database?

Jul 29, 2014

Sometime during the night last night some user account permissions were "lost". Am I right to think that restoring the master database would be the way to go? We have a 2 node 2012 cluster and I stop the cluster resource and start the db in single user mode from the active node. Somehow the sharepoint farm is still trying to connect so I can't get logged in single user. What method could I use to stop users from connecting when I don't have access to the sharepoint farm.

View 8 Replies View Related

SQL Server 2012 :: Select Data From XML - Objects Within Objects?

Nov 20, 2013

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"

[code]....

View 1 Replies View Related

A Script To Get De DDL Of My Database Objects

Mar 3, 2005

Hello,

I would be grateful if you could mail/point me to a TSQL script that can show me the Data Definitions of my SQLserver database objects. In fact, I have found a Visual Basic script that may be of help but it demands the installation of the Visual Basic software, which I do not possess.
Thanks,

Albert.

View 2 Replies View Related

Drop All Objects In Database?

Feb 14, 2006

I'd like to write a stored procedure to drop all objects in a SQL Server 2000 database owned by a particular uid. Originally I'd hoped to use these two stored proc built-ins for the task: sp_MScheck_uid_owns_anything (to get a list of all objects owned by a uid) and sp_MSdrop_object (to drop the objects). I've run into a few problems along the way:

1. If I run this command

EXEC sp_MScheck_uid_owns_anything 5

I get this weird error message:

"The user owns objects in the database and cannot be dropped."

Not sure why that is since I'm just trying to list the objects, not drop them.

2. I tried running a simple query to get the objects from the system table instead:

SELECT * from [dbo].[sysobjects] where uid = 5

This returns a resultSet as you'd expect. When I wrote a stored procedure to loop through these and use sp_MSdrop_object it seemed to fail whenever it encountered a foreign key object. Here is the error message:

The request for procedure 'name of foreign key' failed because 'name of foreign key' is a unknown type object.

Can anyone give advice as to the best way to go about doing this? I'd really prefer not to have to drop the entire database and recreate it. Thanks!


-Cliff

View 7 Replies View Related

Loop Through Different Objects In A Database?

Dec 27, 2011

I have an ActiveX script which I need to convert to a T-SQL Stored Procedure. As a part of it, I need to loop through all the tables in a Database and check whether the particular Table/View exists? If doesn't exist, I need to create one with Primary Key, Foreign Keys, Indexes (Clustered & Non-Clustered), and Check Constraints.

Here is the ActiveX Script I have:

Code:
Dim sNextMonthTable
Dim oServerName
Dim oTables
Dim CheckDate
sNextMonthTable = "Jan_2012"

[Code] .....

View 12 Replies View Related

Creating Objects In Other Database

Sep 25, 2005

Hi

There are 2 databases A and B.How can I create a procedure in database A so that the procedure works with contains tables in Database B.
IS IT POSSIBLE

vic


Vicky

View 1 Replies View Related

Drop All Database Objects

Feb 3, 2006

Does anyone happen to have a script that will drop all database objects?

I'm looking for something generic that will work with any SQL Server 2000 database. I can write one myself, but I thought I would check here first.

Thanks in advance

John

View 2 Replies View Related

Transfer Database Objects & Data 6.5 To 7.0

May 22, 2000

What is the best approach when transferring all database objects & data from a SQL Server 6.5 database to SQL Server 7.0 database running on different servers.

Thanks in adavance for your tips
Cheers,
Phil

View 1 Replies View Related

Change Owner Of Database Objects

Feb 23, 2001

I am in the process of cleaning up the security on one of our production databases. SA is already the owner of the database.

On this SQL server, there is a login that has access to this database that needs to be removed. When I uncheck this users access to this database I receive the following error message:
"Error 15183. The user owns objects in the database and cannot be dropped".

How can i find out what objects this logins has ownership of and how can I change the ownership of these objects to SA?

Thanks in advance,

Philip Talavera

View 1 Replies View Related

How To Find Invalid Objects In Database

Apr 24, 2014

I need to find all the invalid objects means which will throw error on execution in a particular DB.

View 1 Replies View Related

Find Database Objects That Contain A String

May 5, 2006

-- This stored procedure will let you search through your database
-- to find various objects that contain a particular string.
-- For example, you may want to see all tables and views that contain
-- a particular column.


use master
IF (object_id('sp_FindReferences') IS NOT NULL)
BEGIN
PRINT 'Dropping: sp_FindReferences'
DROP procedure sp_FindReferences
END
PRINT 'Creating: sp_FindReferences'
GO
CREATE PROCEDURE sp_FindReferences
(
@string varchar(1000) = '',
@ShowReferences char(1) = 'N'
)
AS
/****************************************************************************/
/* */
/* TITLE: sp_FindReferences */
/* */
/* DATE: 18 February, 2004 */
/* */
/* AUTHOR: WILLIAM MCEVOY */
/* */
/****************************************************************************/
/* */
/* DESCRIPTION: SEARCH SYSCOMMENTS FOR INPUT STRING, OUTPUT NAME OF OBJECT */
/* */
/****************************************************************************/
set nocount on

declare @errnum int ,
@errors char(1) ,
@rowcnt int ,
@output varchar(255)

select @errnum = 0 ,
@errors = 'N' ,
@rowcnt = 0 ,
@output = ''

/****************************************************************************/
/* INPUT DATA VALIDATION */
/****************************************************************************/


/****************************************************************************/
/* M A I N P R O C E S S I N G */
/****************************************************************************/

-- Create temp table to hold results
create table #Results
(
Name varchar(55),
Type varchar(12),
DateCreated datetime,
ProcLine varchar(4000)
)


IF (@ShowReferences = 'N')
BEGIN
insert into #Results
select distinct
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
''
from sysobjects SO
join syscomments SC on SC.id = SO.id
where SC.text like '%' + @string + '%'
union
select distinct
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
''
from sysobjects SO
where SO.name like '%' + @string + '%'
union
select distinct
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
''
from sysobjects SO
join syscolumns SC on SC.id = SO.ID
where SC.name like '%' + @string + '%'
order by 2,1
END
ELSE
BEGIN
insert into #Results
select
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
'Proc Line' = text
from sysobjects SO
join syscomments SC on SC.id = SO.id
where SC.text like '%' + @string + '%'
union
select
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
'Proc Line' = ''
from sysobjects SO
where SO.name like '%' + @string + '%'
union
select
'Name' = convert(varchar(55),SO.name),
'Type' = SO.type,
crdate,
'Proc Line' = ''
from sysobjects SO
join syscolumns SC on SC.id = SO.ID
where SC.name like '%' + @string + '%'
order by 2,1
END


IF (@ShowReferences = 'N')
BEGIN
select Name,
'Type' = Case (Type)
when 'P' then 'Procedure'
when 'TR' then 'Trigger'
when 'X' then 'Xtended Proc'
when 'U' then 'Table'
when 'C' then 'Check Constraint'
when 'D' then 'Default'
when 'F' then 'Foreign Key'
when 'K' then 'Primary Key'
when 'V' then 'View'
else Type
end,
DateCreated
from #Results
order by 2,1
END
ELSE
BEGIN
select Name,
'Type' = Case (Type)
when 'P' then 'Procedure'
when 'TR' then 'Trigger'
when 'X' then 'Xtended Proc'
when 'U' then 'Table'
when 'C' then 'Check Constraint'
when 'D' then 'Default'
when 'F' then 'Foreign Key'
when 'K' then 'Primary Key'
when 'V' then 'View'
else Type
end,
DateCreated,
ProcLine
from #Results
order by 2,1
END

drop table #Results

GO
IF (object_id('sp_FindReferences') IS NOT NULL)
PRINT 'Procedure created.'
ELSE
PRINT 'Procedure NOT created.'
GO

View 4 Replies View Related

Get Alert On Modification Of Database Objects

May 31, 2007

Hi All,

We having the SQL SERVER 2000 Production server. We need to cofigure the alert on the production server that if any objects schema or SP got changed then server should fire the alert to all of DBA mailid.


Is there any way to sent the alert.

Thanks in advance.

BPG

View 10 Replies View Related

Saving A SQL Server Database And Objects

Aug 7, 2007

Hi

Would anyone be able to tell me how to save a database and all its objects e.g. Procedures and views etc. onto a CD and then open it on another SQL Server? For SQL Server 7.0 and 2000.

Thanks

View 2 Replies View Related

Could Not Allocate Space For Objects In Database '

Dec 30, 2007

I have received below alert:

Could not allocate space for objects in database 'abc'
And I have added 1 GB(1024 MB) of free space to primary file system of 'abc'. However now the primary file system of 'abc' database is 120 GB and the file properties are : Automatically grow file is checked, By percent 1 and restrict file growth: 121024 MB
Still the database is showing as space avialable is 0.00, the total size is : 132186 MB

As of now I have't got any other alert, Please let me know if I get in the near future how to proceed??

One DTS package is running contunuously on this DB

View 2 Replies View Related

Delete All Sql Database User Objects

Jan 3, 2007

Good afternoon,

I have a little trouble with sql server 2005 express database:

customer need install new web application to hosting, but at hosting is currently exist other web application and it's using DB what I must use. DB contains a big number of tables, views, functions, etc.

I need delete all user objects from this DB, it must be as new created one.

Is any query whitch can do this?

PS: I know, best way for this is delete DB and create new one, but i haven't permissions for these.

Thank's for reply.

View 3 Replies View Related

Could Not Allocate Space For Objects In Database

Dec 31, 2007

I have received below alert:

Could not allocate space for objects in database 'abc'
And I have added 1 GB(1024 MB) of free space to primary file system of 'abc'. However now the primary file system of 'abc' database is 120 GB and the file properties are : Automatically grow file is checked, By percent 1 and restrict file growth: 121024 MB
Still the database is showing as space avialable is 0.00, the total size is : 132186 MB

As of now I have't got any other alert, Please let me know if I get in the near future how to proceed??

One DTS package is running contunuously on this DB

View 4 Replies View Related

Dropping All Database Objects Through Script

May 28, 2008

Does anyone have a script that will iterate through a database and drop all objects in order of dependencies? I need a way recreate all objects in database through SQL script in a development environment without having to recreate the actual database. Therefore I need a way to clear out the current database objects first without running into a problem with dependencies. This needs to be dynamic so that if a object is added, it is automatically included in the drop scripts.

View 5 Replies View Related

Replicate Database Objects That Are Not Dbo Ownership

Aug 25, 2006

I have a database called sky and its tables, views, procs and functions owned by sky. I need to replicate the sky database to another server. I had problem because those objects have ownership sky not dbo. I can not change ownership when replicate the database. How do I replicate database objects that are not owned by dbo? Is this possible or I have to change ownership from sky to dbo before replicate the database?



Thank you very much for your input and suggestions.

View 1 Replies View Related

Adding Descriptions To Database Objects

May 16, 2008

Is there an easy way to add descriptions or comments to database objects? So, for instance, I might have a table that a number of analysts are using, and I'd like an easy way to save comments or descriptive data about each of the columns in the table. That way, all consumers of the DB can easily look up the meaning of each column, table, stored procedure, etc. I could maintain all of this information in a system separate from my RDBMS, but I'm wondering if there are existing ways to do this already built into SQL Server. I've seen something similar to this built into Oracle systems.

Thanks!

View 2 Replies View Related

Master Database

Jan 23, 2008

Hi Y'all,
 What are the advantages of placing stored procedures in the master database? Can i always use all the database-names on the instance?
Thanks!

View 5 Replies View Related

Master Database

Jul 9, 2001

Hi,
I have a question regarding master database.I know if a master database is
corrupt we need to rebuild the master.One of the guys suggested us to
maintain a copy of master data file and log file in diffrent directory and
when master database is corrupt we can copy the files to the actual location
and restart the sql server and this should fix the issue and by this method we can save the time of rebuilding the master database.I don't know if this works.Can anyone please tell me if this works and also disadvantages if any with this method?
thanks
Mohan

View 5 Replies View Related







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