SQL 2012 :: What If We Locked Down All Databases To A Single Interface

Aug 30, 2015

Would this go a long way towards securing the data?

Database.Store(this)
Database.Delete(this)
Database.Load(this)

Where "this" is a single object mapped to a single stored procedure.

Two parameters are recommended: one to identify user, and one to specify an "action" or different SP.

View 2 Replies


ADVERTISEMENT

SQL 2012 :: Mirroring Multiple Databases On Single Instance?

Jun 10, 2014

I have to mirror 3 DBs on my sql server instance . I have restored there full backups and log backups on mirror.I have also created endpoints on principal and mirror using default ports 5022 and 5023.

know if i can use the same endpoint for the databases on principal instance ?

View 3 Replies View Related

Will A Single Row Be Locked Or The Entire Table?

Feb 19, 2006

I am giving the following statement outside the begin tran block in a stored procedure:
select * from table1 with (holdlock) where column1 = @colValue
I have the following two questions regarding above situation:

Being outside the begin tran block, will the select statement cause a lock to be held or it has to be within the begin tran block for the lock to be held?
Will the select statement hold a lock only on the row or rows matching the where clause, or it may lock a page or even the entire table in this situation?
Thanks

View 3 Replies View Related

SQL 2000 Locked In Single User Mode

Oct 20, 2006

I have gotten my production version of SQL locked into single user mode. We recently upgraded to a clustered configeration and when I went to pause the system to get control I was told Pause was not available in a clustered environment. I restarted the service with -m [single user] but couldn't run Enterprise Manager as it appeared to take the only user slot and not give me one. Then I hit on startingup with Query Analyzer and that worked but now how do I get it back into multi-user mode. I placed the -m in the settings using Enterprise manager; could I stop the service and restart at the cmd prompt using -f [minimal config] and get Enterprise manager running? Any assistance appreciated.

View 4 Replies View Related

SQL 2012 :: TDE Encrypted Databases On 2 Different Server To Be Restored On Single Dev Server

Apr 29, 2015

have a Prod Server A having TDE enabled on 2 of those databases. I have a Prod Server B having TDE enabled on 3 of those databases. Now I have to create a single Dev server Server C for all the above 5 databases residing on the two servers. So how can I restore all the 5 database backup files on server C.

Does it mean that I need to copy the certificates and Keys from both the Prod server to this Dev Box and then restore the backup files. Once done, I can enable the encryption ON on those 5 database on Dev box or is there any different approach.Also how will tempdb behave in this scenario.

View 5 Replies View Related

SQL 2012 :: Identifying User With Row Locked

Feb 3, 2015

Is there a way to identify what user has a locked row in a table?

View 2 Replies View Related

Single ID Access 2 Databases

Mar 27, 2006

Is it possible to have an ID that can access 2 databases? If it's possible, I have to create the same ID and password under each database?

View 6 Replies View Related

How Many Databases Are There In A Single Server

Sep 28, 2007

Hi all,
How to find out how many databases are there in a
single server.
example: server name 172.16.9.33 i want to find out how many
databases are there in this server.
Any solution for this plz help me.



Thanks&Regards,

Msrs

View 3 Replies View Related

DTS: Single SELECT From 2 Databases Possible?

Jul 19, 2006

Just wondering, in DTS, can I run a SELECT script that selects from 2 different databases (both on the same server)?

I can run this in Sql Query Analyzer, but in a DTS, it doesnt accept my database name prefixes:

SELECT
a.something
FROM
DB_ONE.dbo.product a, DB_ONE.dbo.mp_brand b, DB_TWO.dbo.lk_pcat_cutover c
WHERE
a.PCat <> c.Pcat

(where DB_ONE and DB_TWO are the 2 different db names)

I have one connection to DB_ONE... does this mean I cant access DB_TWO when using this connection? I want to try and avoid using a temporay table for storing DB_TWO's data in DB_ONE... Is this possible?



Thanks,

Andre

View 1 Replies View Related

Restoring Multiple Databases From Single BAK?

Oct 24, 2013

I have a single .bak file containing full backups of 20+ databases.

Whats the best way of creating and restoring these database onto an instance on a separate server.

note that this is to migrate the whole instance of sql server onto a newly build server.

View 1 Replies View Related

How To Make A Single Database From Two Databases ....

Nov 8, 2006

Hi ...

I have two separete databases, what Ineed is that I want to make a single database of the two. Although all the table definitions of both the database are same.

I will be glad to know "how to make a single database from two" and i will be happy to see the query to insert the values from one database to another one.

Abdul Ghaffar

View 1 Replies View Related

Single Endpoint Multiple Databases

Apr 17, 2007

I'm building an app that will data stored in multiple databases. I have an endpoint with a single webmethod like so:



CREATE ENDPOINT [Rosters_Endpoint]

AUTHORIZATION [ADHEadministrator]

STATE=STARTED

AS HTTP (PATH=N'/SQL/Rosters', PORTS = (CLEAR), AUTHENTICATION = (DIGEST, NTLM, KERBEROS, INTEGRATED), SITE=N'10.0.1.116', CLEAR_PORT = 8080, COMPRESSION=DISABLED)

FOR SOAP (

WEBMETHOD 'GetACSStudents'( NAME=N'[fadb].[dbo].[GetACSStudents]'

, SCHEMA=DEFAULT

, FORMAT=ALL_RESULTS), BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]', SESSIONS=DISABLED, SESSION_TIMEOUT=60, DATABASE=N'fadb', NAMESPACE=N'http://tempUri.org/', SCHEMA=STANDARD, CHARACTER_SET=XML)



Each webmethod will be accessed thru a multiview on the page.



It would seem to me that I can describe the webmethods using a fully qualified stored proc name and that wouldn't cause a big problem. But, my question is what does that DATABASE=N'fadb' clause do?



Does anybody see a problem with using a single endpoint to access multiple databases?



Any advice would be greatly appreciated as this is my first web app using this data access method.



Thanks.

View 1 Replies View Related

Multiple Databases In Single Linked Server ?

Apr 25, 2008

HI Guys,

I just need to add multiple catalogs to the same linked server, in Sql Server 2000 or Sql Server 2005. Here i need only to add 3 databases in to a single linked server name.


Thanks In Advance,
Krishna

View 1 Replies View Related

Multiple Small Databases Vs Single Big Databas

Jun 17, 2008

Hi, I'm planning to develop a project on .NET using Sql server 2005. Just stuck at a point where I need to decide that Should I use 2 or 3 huge databases with a lot of tables and data into it or should i create a lot of databases which would contain small chunks of data. Please let me know which option would give me a better performance. Thanks in advance

God is great. We are not God. But we still can be great.

View 2 Replies View Related

Creating Multiple Databases From A Single Backup F

Nov 9, 2006

Hi,
I want to create two databases by restoring from a
single backup file in sql server. I am using 2005-sqlexpress .Is it possible?

Thanx in advance..

View 3 Replies View Related

Restoring Multiple Databases From A Single Backup

Jan 16, 2008

I have a backup that contains multiple databases. I am restoring it to a different server. How do I restore each database? Tried to restore under SQL Server Management Studio, but can only restore one of many from the backup (it appears it has only 1 logical file name in the backup) If you can refer me to a web page that would be great. I tried googling the topic but nothing seems to come up.

View 5 Replies View Related

Mirroring Multiple Databases On A Single Instance

Jul 7, 2007

Can someone explain what does this mean? This is from http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx



<quote>However, all these techniques for coordinating client redirection with a database mirroring have an important limitation. Database mirroring occurs only at the database level, not the server level. Be careful if your application relies on querying several databases on a server, or uses multi-part object names to query across several databases. When several databases reside on one server, and they are mirrored to a standby server, it is possible that one of several databases might fail over to the standby but the others remain on the original server. In that case, you might need one connection per database that you are querying, so that you do not attempt cross-database queries on a standby server where only one database is a principal and the remaining are mirrors.</quote>

Also I read somewhere that if one mirrored DB fails, all other mirrored DB should also be transferred to the mirror.

For example: Let's say Srv1 (principle) and Srv2 (mirror) and Srv3(witness) are SQL servers with only default instances. The SQL instance has 4 DBs (DB1, DB2, DB3, DB4) and all of them are mirrored to Srv2.

An ASP.NET application has four seperate connection strings like:
objConn1 --> Data Source=Srv1;Failover Partner=Srv2;Initial Catalog=DB1;Integrated Security=True;
objConn1.connect();

objConn2 --> Data Source=Srv1;Failover Partner=Srv2;Initial Catalog=DB2;Integrated Security=True;
objConn2.connect();

objConn3 --> Data Source=Srv1;Failover Partner=Srv2;Initial Catalog=DB3;Integrated Security=True;
objConn3.connect();

objConn4 --> Data Source=Srv1;Failover Partner=Srv2;Initial Catalog=DB4;Integrated Security=True;
objConn4.connect();

If DB2 failsover to Srv2 (mirror), why should all other DBs be failedover?

Thanks

View 10 Replies View Related

Connecting To 2 Diffrent Sql Servers Databases From Single Web Application

Oct 31, 2007

i am having 2 sql servers one is web sql server  server and other server is my local sql server. i am making web application through which i want to connect both sql servers at a time and by selecting data from web server i want to insert it into my local sql server both having same database on which i want to work , i want to know how it can be done
my idea as follows in  web.config  i specify 2 connection string and by selecting data from  websql server database table i going to store it in dataset and then i return dataset to another function which connects to local sqlserver database.but database records are much large. can any body guide me .
i am going to place my web application on local server (C# asp.net 2.0) .
thank you,
 
i tried this code
c# file
 public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
Uupdatedata();

}
public void Uupdatedata()
{
string constr1=ConfigurationSettings.AppSettings["abccon1"];
string constr2 = ConfigurationSettings.AppSettings["abccon2"];
System.Data.SqlClient.SqlConnection dbcon1 = new System.Data.SqlClient.SqlConnection(constr1);
dbcon1.Open();
System.Data.SqlClient.SqlConnection dbcon2 = new System.Data.SqlClient.SqlConnection(constr2);
dbcon2.Open();

SqlDataReader dr;
SqlCommand cmd = new SqlCommand("select * from Unit_Master",dbcon1);
dr = cmd.ExecuteReader();
while (dr.Read())
{
string Sql = "insert into Table1(Unit_Id,Unit_Desc) values(" + dr.GetInt32(0).ToString() + "," + dr.GetString(1) + ")";

SqlCommand cmd1=new SqlCommand (Sql,dbcon2);
//cmd1.EndExecuteNonQuery ();

}

//dr.Close();
//dbcon2.Close();
}
 web.config<configuration>
<appSettings>
<add key="abccon1" value="Data Source=comp01;Initial Catalog=abc;User Id=sa ; Password=sa"/>
<add key="abccon2" value="Data Source=comp01;Initial Catalog=abctest;User Id=sa ; Password=sa"/>
</appSettings>
<connectionStrings/>
 this 2 databases are from single my loacl server
it wont work it gives exception
please healp me.

View 4 Replies View Related

Recovery :: How Many Databases Can Be Configured In Log Shipping From A Single Instance

May 1, 2015

SQL Server 2012: Out of all the databases in the instance we have a requirement in which we need to maintain a high availability for the databases around (128). Our team believed log shipping will apt for this requirement but not sure on it's limitations, how many databases are allowed or supports this log shipping from a single instance.

View 7 Replies View Related

Reporting Services :: Interface Code Compatibility Between Custom Delivery Extension Of SSRS 2008R2 And SSRS 2012?

Sep 3, 2015

Currently we are using Custom Delivery Extension for SSRS 2008R2 We are planning to move it SSRS2012

My Question is: Whether we can use the same Code used for SSRS2008R2 to SSRS2012?

if not what code changes we should do?

View 3 Replies View Related

T-SQL (SS2K8) :: Multiple Databases - Return A Single Table With Three Columns

Jan 13, 2015

I have multiple databases in the server and all my databases have tables: stdVersions, stdChangeLog. The stdVersions table have field called DatabaseVersion which stored the version of the database. The stdChangeLog table have a field called ChangedOn which stored the date of any change made in the database.

I need to write a query/stored procedure/function that will return all the database names, version and the date changed on. The results should look something like this:

DatabaseName DatabaseVersion DateChangedOn
OK5_AAGLASS 5.10.1.2 2015/01/12
OK5_SHOPRITE 5.9.1.6 2015/01/10
OK5_SALDANHA 5.10.1.2 2014/12/23

The results should be ordered by DateChangedOn.

View 4 Replies View Related

Merging Two Different SQL Server 2000 Databases With Same Schemas In A Single Database

Jan 7, 2008

Hi,

I have two databases lets say DB1 and DB2.
Schemas for both databases is same.
In both database schemas there are tables which has identity columns as primary key.
Now i want to merge these two databases in a single database say DB3.
It may also possible that some master records in both databases are common so they should not repeat in DB3

Is there any way so that i can do it quickly and as soon as possible.

Thanks in advance
Rohit

View 1 Replies View Related

Sync/Merge Local Sql Compact Databases To Single Global Database

Jun 23, 2007

Hi, I have compact sql databases which will be local on multiple users
devices. Due to space constraints, for one of the tables i have had to use
auto incrementing integer which works fine for the local database but i
would like to merge all of the users databases into a global database. The
table format can be seen below:




Code SnippetCREATE TABLE Players
(
ID UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
FirstName NVARCHAR(32),
LastName NVARCHAR(32)
);

CREATE TABLE Sessions
(
ID INTEGER NOT NULL IDENTITY,
PlayerID UNIQUEIDENTIFIER ,
SessionDateTime DATETIME,
CONSTRAINT pkSessions PRIMARY KEY (ID),
CONSTRAINT fkPlayerID FOREIGN KEY (PlayerID) REFERENCES Players(ID)
);

CREATE TABLE SessionDetail
(
SessionID INTEGER,
Time real,
Power real,
CONSTRAINT pkSessionDetail PRIMARY KEY (SessionID,StrokeTime),
CONSTRAINT fkSessionID FOREIGN KEY (SessionID) REFERENCES Sessions(ID)
);



The Players table will merge fine as GUIDs are used. However, how will the
sync capabilities of compact SQL handle the sessions table? When it pushes
the local data to the remote database will it change the Sessions.ID column
to a unique field (as no doubt lots of people will have 1, 2, 3 in their
local databases and the global database must have a unique ID), and then
transfer this changed ID back to the local database? Furthermore, if it
changes the Sessions.ID column during the merge it will also need to update
the SessionDetail.SessionID foreign key to maintain referential integrity,
is this also handled?

So my question is, how much of this sync and data merge is automated and are
there any good examples or pointers for my scenario? I cannot reasonably use
a GUID for Session.ID as there will be lots of SessionDetail entries and the
size would be far too much.

Many thanks,

Chris

View 7 Replies View Related

SQL 2012 :: Track All Logins Onto A Single Database?

Oct 17, 2014

We have a particular database sat on SQL Server 2012 box along with about 20 other databases.

What I require is a method/Script/Audit that will simply track anyone who logs (successfully / unsuccessful) into this one particular database on the server (The single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.

View 1 Replies View Related

SQL 2012 :: Master Database To Single Mode

Jan 29, 2015

Is it possible to put master database to single mode, if yes then whats the procedure. The reason behind the scenario is to restore master database from backup for which its strictly recommended to put the database in single mode. But I m not able to do so.

View 5 Replies View Related

SQL Server 2012 :: All Permutations Of A Single String

Sep 20, 2015

How to retrieve all possible sets of values from a table, with each set having a unique identifier.

Here's sample data, where any number of rows can be in the "animal" set:

select animal.name
from (
select 'Cat' as name
union all select 'Dog'
union all select 'Bird'
) animalHere's what I'm trying to get:

[Code] ....

It'd be an easy task if I knew how many rows were in the set, but without knowing how many (and being able to do x number of cross joins and CUBE/ROLLUP to produce the list of permutations) or writing a horrid complex of while loops, I'm at a loss.

A single column. All permutations of the values in a single column. Perhaps I should stay off here nearer the end of the day .

View 2 Replies View Related

SQL 2012 :: Lockdown All Databases Except One

Sep 14, 2015

Our sql server 2012 contains 10+ databases. I need to let a developer work only with one specific and tempdb databases, and nothing else. I don't want them to see any of the other databases. When they login, they should only see tempdb and their assigned database. If I were to login with sa, then all databases should be available.

I created a "Test" user the developer will use for their work. I tried several settings, but could not get the desires results. I was able to get the "Test" user to login and ALL databases were hidden, including the one that the user has perms to.

View 9 Replies View Related

SQL 2012 :: Dumping Fields In A Single Column Of Database?

Apr 3, 2014

While working with a vast variety of support projects, i find a sql design where all the fields in a single form (say about 100 fields which are dump data as they are not related to any reports and searching criteria) are dumped in a sql database column in a XML format. See below an example

<?xml version="1.0" encoding="utf-8"?><FormBuilder><ClientID>0</ClientID><SiteID>0</SiteID><IncidentType></IncidentType><IncidentCategory></IncidentCategory><IncidentSubCategory></IncidentSubCategory><CreatedBy>2</CreatedBy><CreatedOn>Wednesday, April 02, 2014</CreatedOn><ModifiedOn /><ModifiedBy /><Section SectionID="ASD" SectionDisplayName="ASD" ColumnType="1" IsDeleted="0" SectionPosition="1"><SectionField FieldName="Bro" Section="ASD" ModuleID="0" Length="" PickData="" ChkData="" RadioData="" ListData="" FieldType="Text" Checked="false" ColumnType="1" IsDeleted="0" CoulmnOrder="0" FieldID="1" IsPrimary="" IsMandatory="" SystemMandatory="" RowPosition="1" FullRow="" /></Section></FormBuilder>

Just want to know the comments how far is this design feasible.....

What are the pros and cons of such a design...

Where we should use such type of db design where are the fields are dumped in a single column...

View 9 Replies View Related

SQL 2012 :: Symmetrically Encrypt A Single Node In XML Field

Apr 30, 2014

How do I reliably symmetrically encrypt a single node in an XML field in my SQL Server 2012 database? I know I cannot use SQL Server encryption to encrypt an XML field and I have been getting unpredictable results with a home grown solution.

View 9 Replies View Related

SQL Server 2012 :: Comma Separated In A Single Result

May 30, 2014

I have the following table

CREATE Table #Table1
(
ID INT, Name VARCHAR(50), Class VARCHAR(10)
)
INSERT INTO #Table1
Select 1, 'name1', 'a' UNION ALL
Select 2, 'name1', 'a' UNION ALL

[Code] ....

Is it possible to have each name and its corresponding class in a single line separated by commas to give a result like the one below in #table2 ?

CREATE Table #Table2
(
ID INT, CommaSeparated VARCHAR(100)
)
INSERT INTO #Table2
Select 1, 'name1, a' UNION ALL

[Code] ...

What I have

Select * FROM #Table1

Final Result
Select * FROM #Table2

Note that I still want to see all the IDs regardless.

If that is not possible to see all the IDs, I think the results below in #Table3 should suffice.

CREATE Table #Table3
(
CommaSeparated VARCHAR(100)
)
INSERT INTO #Table3
Select 'name1, a' UNION ALL
Select 'name2, b, c, d' UNION ALL
Select 'name3, e, f'
Select * FROM #Table3

View 3 Replies View Related

SQL Server 2012 :: Encoding With Single Apostrophes In FOR XML PATH

Oct 16, 2014

Here is my problem:-

declare @test as varchar(32)
declare @test2 as varchar(32)

set @test='today''s problem'
set @test2='my <string> '

select @test as '@attribute' for xml path ('myrow')
select @test2 as '@attribute' for xml path ('myrow')

I want for xml path to correctly encode the single apostrophe as &apos but the single apostrophe doesn't get encoded. In the second example the greater and less than does get encoded.

View 4 Replies View Related

SQL Server 2012 :: Query For Single Entry Record Only?

May 26, 2015

I have records like below, single query to get result below, basically records that has single entry only, which has type '0'

table : temp_test
idtype
c10
c25
c30
c40
c47
c59
c64
c60
c77
c80
c90

Result out of query

idtype
c10
c30
c80
c90

View 4 Replies View Related

SQL 2012 :: High CXPACKET On Single CPU Database Instance

Jul 2, 2015

Why would I see high CXPACKET waits on a database instance with only one CPU? Since the server only has 1 CPU parallelism can't be used, or are I'm missing something here!?

SQL version
Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
May 14 2014 18:34:29
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

max degree of parallelism is set to 0

View 5 Replies View Related







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